Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions app/pywmtk/pywmtk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
// components
#include "../components_include.hpp"

// std::map<std::string, std::function<void(nlohmann::json)>> components_map;
//// include auto-generated map
//#include "../components_map.hpp"

namespace py = pybind11;
using namespace pybind11::literals;

Expand Down Expand Up @@ -47,16 +43,5 @@ void wmtk_wrapper(const py::dict& obj)
PYBIND11_MODULE(pywmtk, m, py::mod_gil_not_used())
{
m.doc() = "Python bindings for the Wildmeshing-Toolkit"; // optional module docstring
// m.def("get_metrics", &meme::get_metrics, "Get mesh metrics");
// m.def("get_metric_names", &meme::get_metrics_names, "Get names for all mesh metrics");
// m.def("get_metrics_per_tri", &meme::get_metrics_per_tri, "Get mesh metrics per triangle");
// m.def(
// "get_metric_names_per_tri",
// &meme::get_metrics_names_per_tri,
// "Get names for all per-triangle metrics");
// m.def(
// "get_relative_edge_lenghts",
// &meme::get_relative_edge_lengths,
// "Get edge lengths realtive to bbox diagonal");
m.def("wmtk", &wmtk_wrapper, "Wildmeshing-Toolkit application");
}
2 changes: 1 addition & 1 deletion cmake/recipes/libigl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CPMAddPackage(
GIT_TAG 3ea7f9480967fcf6bf02ce9b993c0ea6d2fc45f6
OPTIONS
LIBIGL_PREDICATES ON
LIBIGL_COPYLEFT_TETGEN ON
# LIBIGL_COPYLEFT_TETGEN ON
)
# include(eigen)
FetchContent_MakeAvailable(libigl)
2 changes: 1 addition & 1 deletion cmake/wmtk_data.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ExternalProject_Add(
SOURCE_DIR ${WMTK_DATA_ROOT}

GIT_REPOSITORY https://github.com/wildmeshing/data2.git
GIT_TAG a97b2a974e80cc288624f86c9cc03eae7f050c4f
GIT_TAG f2bd8ed5e8af5a125ee4d92cd0af8f32cec60e02

CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,22 +579,31 @@ void ImageSimulationMesh::resolve_intersections(const std::vector<CellTag>& inte
m_envelope.reset();
}

void ImageSimulationMesh::replace_tags(const std::vector<CellTag>& tags_in, const CellTag& tag_out)
void ImageSimulationMesh::replace_tags(
const std::vector<CellTag>& tags_in,
const std::vector<CellTag>& tags_out)
{
for (const Tuple& t : get_tets()) {
CellTag& tags = m_tet_attribute[t.tid(*this)].tags;
bool found_some = false;
for (const CellTag& tag : tags_in) {
if (set_includes(tags, tag)) {
found_some = true;
// remove tag from tags
for (const size_t t : tag) {
tags.erase(t);
std::vector<bool> found_tags(tags_in.size(), false);
for (size_t i = 0; i < tags_in.size(); ++i) {
if (set_includes(tags, tags_in[i])) {
found_tags[i] = true;
}
}
// remove "tags_in" from tags
for (size_t i = 0; i < tags_in.size(); ++i) {
if (found_tags[i]) {
for (const int64_t tt : tags_in[i]) {
tags.erase(tt);
}
}
}
if (found_some) {
tags.insert(tag_out.begin(), tag_out.end());
// add "tags_out" to tags
for (size_t i = 0; i < tags_out.size(); ++i) {
if (found_tags[i]) {
tags.insert(tags_out[i].begin(), tags_out[i].end());
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,22 +535,29 @@ void ImageSimulationMeshTri::resolve_intersections(const std::vector<CellTag>& i

void ImageSimulationMeshTri::replace_tags(
const std::vector<CellTag>& tags_in,
const CellTag& tag_out)
const std::vector<CellTag>& tags_out)
{
for (const Tuple& t : get_faces()) {
CellTag& tags = m_face_attribute[t.fid(*this)].tags;
bool found_some = false;
for (const CellTag& tag : tags_in) {
if (set_includes(tags, tag)) {
found_some = true;
// remove tag from tags
for (const size_t t : tag) {
tags.erase(t);
std::vector<bool> found_tags(tags_in.size(), false);
for (size_t i = 0; i < tags_in.size(); ++i) {
if (set_includes(tags, tags_in[i])) {
found_tags[i] = true;
}
}
// remove "tags_in" from tags
for (size_t i = 0; i < tags_in.size(); ++i) {
if (found_tags[i]) {
for (const int64_t tt : tags_in[i]) {
tags.erase(tt);
}
}
}
if (found_some) {
tags.insert(tag_out.begin(), tag_out.end());
// add "tags_out" to tags
for (size_t i = 0; i < tags_out.size(); ++i) {
if (found_tags[i]) {
tags.insert(tags_out[i].begin(), tags_out[i].end());
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ set(SRC_FILES
ImageSimulationMesh.cpp
ImageSimulationMesh.h

extract_soup.hpp
extract_soup.cpp

EmbedSurface.hpp
EmbedSurface.cpp

Expand Down Expand Up @@ -54,7 +51,6 @@ target_link_libraries(wmtk_${COMPONENT_NAME} PUBLIC
wmtk::shortest_edge_collapse
VolumeRemesher::VolumeRemesher
jse::jse
igl_copyleft::tetgen
)

######################
Expand Down
Loading
Loading