Skip to content

Commit 4392743

Browse files
authored
Merge pull request #854 from wildmeshing/mtao/pruned_attribute
Cleaning attribute folder
2 parents e65c6cd + 3c78a72 commit 4392743

File tree

127 files changed

+2545
-3049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+2545
-3049
lines changed

CMakeLists.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ if(WMTK_WITH_CCACHE AND CCACHE_PROGRAM)
4040
endforeach()
4141
endif()
4242

43+
option(WMTK_USE_DEV_MODE "Changes to make compilation faster when developing" OFF)
44+
if(WMTK_USE_DEV_MODE)
45+
set(WMTK_LIBRARY_TYPE SHARED)
46+
else()
47+
set(WMTK_LIBRARY_TYPE STATIC)
48+
endif()
49+
50+
4351
# ###############################################################################
4452
project(WildMeshingToolkit DESCRIPTION "A mesh optimization toolkit" LANGUAGES C CXX)
4553

@@ -100,7 +108,7 @@ include(CLI11)
100108
include(CDT)
101109

102110
# Core library
103-
add_library(wildmeshing_toolkit)
111+
add_library(wildmeshing_toolkit ${WMTK_LIBRARY_TYPE})
104112
add_library(wmtk::toolkit ALIAS wildmeshing_toolkit)
105113
target_link_libraries(wildmeshing_toolkit PUBLIC wmtk_coverage_config)
106114
set_property(TARGET wildmeshing_toolkit PROPERTY COMPILE_WARNING_AS_ERROR ON)
@@ -118,14 +126,19 @@ target_compile_definitions(wildmeshing_toolkit PUBLIC _USE_MATH_DEFINES)
118126
target_compile_definitions(wildmeshing_toolkit PUBLIC NOMINMAX)
119127

120128
# C++ standard
121-
option(WMTK_USE_CXX20 "Sets WMTK to use C++20, defaults to C++17")
129+
option(WMTK_USE_CXX20 "Sets WMTK to use C++20, defaults to C++17" OFF)
122130
if(WMTK_USE_CXX20)
123131
target_compile_features(wildmeshing_toolkit PUBLIC cxx_std_20)
124132
target_compile_definitions(wildmeshing_toolkit PUBLIC -DWMTK_ENABLED_CPP20)
125133
else()
126134
target_compile_features(wildmeshing_toolkit PUBLIC cxx_std_17)
127135
endif()
128136

137+
if(WMTK_USE_DEV_MODE)
138+
target_compile_definitions(wildmeshing_toolkit PUBLIC -DWMTK_ENABLED_DEV_MODE)
139+
set(BUILD_SHARED_LIBS ON) # we globally want to disable this option due to use of TBB
140+
endif()
141+
129142
#target_compile_options(wildmeshing_toolkit PUBLIC -fconcepts)
130143

131144
# the max dimension an attribute can be - default is to be any size (a dynamic size), but this can be set to a number like 6

cmake/recipes/predicates.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ message(STATUS "Third-party: creating target 'predicates::predicates'")
77
include(CPM)
88
CPMAddPackage(
99
NAME predicates
10-
GITHUB_REPOSITORY libigl/libigl-predicates
11-
GIT_TAG 488242fa2b1f98a9c5bd1441297fb4a99a6a9ae4
10+
GITHUB_REPOSITORY wildmeshing/libigl-predicates
11+
GIT_TAG f1fcce5d20d5a8e887cb694dc6aeaafab9ca1e29
1212
)
1313

1414
FetchContent_MakeAvailable(predicates)

components/delaunay/wmtk/components/delaunay/delaunay.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
#pragma once
2+
#include <string>
3+
#include <memory>
24

3-
#include <wmtk/Mesh.hpp>
45

6+
namespace wmtk {
7+
class Mesh;
8+
class PointMesh;
9+
namespace attribute {
10+
class MeshAttributeHandle;
11+
}
12+
}
513
namespace wmtk::components {
614

715
std::shared_ptr<Mesh> delaunay(

components/edge_insertion/wmtk/components/edge_insertion/edge_insertion.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
#pragma once
22

3-
#include <wmtk/Mesh.hpp>
3+
#include <memory>
44

55
namespace wmtk {
6+
class TriMesh;
7+
class Mesh;
8+
class EdgeMesh;
69
namespace components {
710

811
struct EdgeInsertionMeshes

components/marching/wmtk/components/marching/internal/Marching.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,8 @@ void Marching::process()
286286
}
287287
}
288288
}
289-
#if defined(WMTK_ENABLE_HASH_UPDATE)
290-
assert(m_mesh.is_valid_with_hash(v0));
291-
assert(m_mesh.is_valid_with_hash(v1));
292-
#else
293289
assert(m_mesh.is_valid(v0));
294290
assert(m_mesh.is_valid(v1));
295-
#endif
296291
const auto p0 = pos_acc.const_vector_attribute(v0);
297292
const auto p1 = pos_acc.const_vector_attribute(v1);
298293
const double sf0 = sf_acc.const_scalar_attribute(v0);

components/simplicial_embedding/wmtk/components/simplicial_embedding/internal/SimplicialEmbedding.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ void SimplicialEmbedding::regularize_tags(bool generate_simplicial_embedding)
279279

280280
break;
281281
}
282+
case PrimitiveType::Vertex: { // edge split
283+
log_and_throw_error("Cannot split point mesh");
284+
break;
285+
}
282286
default: log_and_throw_error("unknown primitive type"); break;
283287
}
284288

@@ -308,4 +312,4 @@ void SimplicialEmbedding::regularize_tags(bool generate_simplicial_embedding)
308312
}
309313

310314

311-
} // namespace wmtk::components::internal
315+
} // namespace wmtk::components::internal

components/to_points/wmtk/components/to_points/to_points.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "to_points.hpp"
2+
#include <Eigen/Geometry>
23

34

45
#include <bitset>

components/to_points/wmtk/components/to_points/to_points.hpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#pragma once
22

33

4-
#include <wmtk/Mesh.hpp>
4+
#include <string>
5+
#include <memory>
6+
7+
namespace wmtk {
8+
class Mesh;
9+
class PointMesh;
10+
namespace attribute {
11+
class MeshAttributeHandle;
12+
}
13+
}
514

615
namespace wmtk::components {
716

components/triangle_insertion/wmtk/components/triangle_insertion/triangle_insertion.hpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
#pragma once
22

3-
#include <wmtk/Mesh.hpp>
3+
#include <string>
4+
#include <tuple>
5+
#include <memory>
6+
#include <vector>
7+
8+
namespace wmtk {
9+
class Mesh;
10+
class TriMesh;
11+
class TetMesh;
12+
namespace attribute {
13+
class MeshAttributeHandle;
14+
}
15+
}
416

517
namespace wmtk::components::triangle_insertion {
618

@@ -23,4 +35,4 @@ std::tuple<std::shared_ptr<wmtk::TetMesh>, ChildMeshes> triangle_insertion(
2335
bool track_submeshes = true,
2436
bool make_child_free = false);
2537

26-
} // namespace wmtk::components::triangle_insertion
38+
} // namespace wmtk::components::triangle_insertion

src/wmtk/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ set(SRC_FILES
3232
Types.hpp
3333
Scheduler.hpp
3434
Scheduler.cpp
35-
MultiMeshManager.hpp
3635
)
3736
target_sources(wildmeshing_toolkit PRIVATE ${SRC_FILES})
3837

0 commit comments

Comments
 (0)