Skip to content

Commit

Permalink
Merge pull request #673 from wildmeshing/mm-envelope
Browse files Browse the repository at this point in the history
refactoing proj and envelope
  • Loading branch information
teseoch authored Jan 18, 2024
2 parents 23da13d + f7ffe47 commit a798eaf
Show file tree
Hide file tree
Showing 28 changed files with 380 additions and 604 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ docs/latex
*.hdf
*.hdf5
*.msh
*.vtu

components/spec_include.hpp
components/components_include.hpp
components/components_map.hpp
components/components.json
components/components.json
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ target_link_libraries(wildmeshing_toolkit PUBLIC

)


if(MSVC)
target_compile_options(wildmeshing_toolkit PUBLIC /MP)
target_compile_options(wildmeshing_toolkit PUBLIC $<$<CONFIG:RELWITHDEBINFO>:/GL>)
endif()

add_subdirectory(components)


Expand Down Expand Up @@ -209,5 +215,13 @@ if(WILDMESHING_TOOLKIT_TOPLEVEL_PROJECT)
jse::jse
)


if(MSVC)
target_compile_options(wmtk_app PUBLIC /MP)
target_compile_options(wmtk_app PUBLIC $<$<CONFIG:RELWITHDEBINFO>:/GL>)
target_link_options(wmtk_app PRIVATE $<$<CONFIG:RELWITHDEBINFO>:/LTCG>)
target_link_options(wmtk_app PRIVATE $<$<CONFIG:RELWITHDEBINFO>:/INCREMENTAL:NO>)
endif()

target_compile_definitions(wmtk_app PUBLIC WMTK_APP_INPUT_SPEC="${CMAKE_SOURCE_DIR}/components/wmtk_spec.json")
endif()
2 changes: 1 addition & 1 deletion cmake/recipes/bvh.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include(CPM)
CPMAddPackage(
NAME simple_bvh
GITHUB_REPOSITORY geometryprocessing/SimpleBVH
GIT_TAG df8812b0c876376886cf73cc64d29e3a7e7be83c
GIT_TAG 995e179142cc30799464b8124b02ff509709bf06
)

set_target_properties(simple_bvh PROPERTIES FOLDER third_party)
Expand Down
11 changes: 9 additions & 2 deletions cmake/recipes/fast_envelope.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ endif()

set(FAST_ENVELOPE_WITH_UNIT_TESTS OFF)
set(FAST_ENVELOPE_ENABLE_TBB OFF)
set(FAST_ENVELOPE_WITH_GEOGRAM_PREDICATES OFF)
set(FAST_ENVELOPE_WITH_GEOGRAM_PSM_PREDICATES ON)

# HACK because there is a linker error on Windows otherwise
if(WIN32)
set(FAST_ENVELOPE_WITH_GEOGRAM_PREDICATES ON)
set(FAST_ENVELOPE_WITH_GEOGRAM_PSM_PREDICATES OFF)
else()
set(FAST_ENVELOPE_WITH_GEOGRAM_PREDICATES OFF)
set(FAST_ENVELOPE_WITH_GEOGRAM_PSM_PREDICATES ON)
endif()


message(STATUS "Third-party: creating target 'FastEnvelope::FastEnvelope'")
Expand Down
2 changes: 1 addition & 1 deletion cmake/recipes/tests/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/data.git
GIT_TAG 6cfdde9b0928c6d8f1ade9890f1e128a3fd48e44
GIT_TAG c8e36c24a344e1b335eeca9460e78abfb80bf6dc

CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand Down
13 changes: 5 additions & 8 deletions components/tests/test_component_wildmeshing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ TEST_CASE("wildmeshing", "[components][wildmeshing][.]")
"passes": 10,
"input": "mesh",
"target_edge_length": 0.01,
"intermediate_output": false,
"intermediate_output": true,
"attributes": {"position": "vertices"},
"pass_through": [],
"output": "test",
"track_boundary_child_mesh": false
"output": "test"
})"_json;


CHECK_NOTHROW(wmtk::components::wildmeshing(Paths(), input, cache));
}

Expand All @@ -49,7 +47,8 @@ TEST_CASE("wildmeshing_3d", "[components][wildmeshing][.]")
{"name", "mesh"},
// {"input", data_dir / "sphere_coarse_.msh"},
// {"input", data_dir / "tet.msh"},
{"file", data_dir / "sphere_coarse_005_.msh"},
// {"file", data_dir / "sphere_coarse_005_.msh"},
{"file", data_dir / "cube_2.msh"},
{"ignore_z", false}};
wmtk::components::input(Paths(), input_component_json, cache);

Expand All @@ -58,10 +57,9 @@ TEST_CASE("wildmeshing_3d", "[components][wildmeshing][.]")
json input = {
{"passes", 10},
{"input", "mesh"},
{"target_edge_length", 0.1},
{"target_edge_length", 0.05},
{"intermediate_output", true},
{"output", "test_mm"},
{"track_boundary_child_mesh", false},
{"pass_through", std::vector<int64_t>()},
{"attributes", attributes}};

Expand Down Expand Up @@ -89,7 +87,6 @@ TEST_CASE("wildmeshing_3d_multimesh", "[components][wildmeshing][.]")
{"target_edge_length", 0.1},
{"intermediate_output", true},
{"output", "test_multimesh"},
{"track_boundary_child_mesh", true},
{"pass_through", std::vector<int64_t>()},
{"attributes", attributes}};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ struct WildmeshingOptions
int64_t passes;
double target_edge_length;
bool intermediate_output;
bool track_boundary_child_mesh;
};

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(
Expand All @@ -32,7 +31,6 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(
input,
target_edge_length,
intermediate_output,
output,
track_boundary_child_mesh);
output);

} // namespace wmtk::components
Loading

0 comments on commit a798eaf

Please sign in to comment.