diff --git a/CMakeLists.txt b/CMakeLists.txt index bb61f89dbf..e10f04aa90 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,8 +100,6 @@ add_library(wildmeshing_toolkit) add_library(wmtk::toolkit ALIAS wildmeshing_toolkit) target_link_libraries(wildmeshing_toolkit PUBLIC wmtk_coverage_config) - -set_property(TARGET wildmeshing_toolkit PROPERTY COMPILE_WARNING_AS_ERROR ON) add_subdirectory(src) # Group source files for IDEs diff --git a/src/wmtk/SimplicialComplex.hpp b/src/wmtk/SimplicialComplex.hpp index b32d0ab977..1085afcd6c 100644 --- a/src/wmtk/SimplicialComplex.hpp +++ b/src/wmtk/SimplicialComplex.hpp @@ -61,7 +61,7 @@ class SimplicialComplex bool operator==(const SimplicialComplex& other) const; - SimplicialComplex& operator=(const SimplicialComplex&) = default; + // SimplicialComplex& operator=(const SimplicialComplex&) = default; SimplicialComplex(const Mesh& mm) : _slf(mm) @@ -112,9 +112,10 @@ class SimplicialComplex * @brief check if the intersection of simplices with their boundary is an empty set */ static bool simplices_w_boundary_intersect(const Mesh& m, const Simplex& s1, const Simplex& s2); - + /** - * @brief get all the the top_simplex of m which is a coface of Simplex s, this function can be used in computing closed_star and open_star + * @brief get all the the top_simplex of m which is a coface of Simplex s, this function can be + * used in computing closed_star and open_star */ static SimplicialComplex top_coface_simplex(const Mesh& m, const Simplex& s); /** diff --git a/src/wmtk/TetMesh.cpp b/src/wmtk/TetMesh.cpp index 867eb4dca8..7dece0d195 100644 --- a/src/wmtk/TetMesh.cpp +++ b/src/wmtk/TetMesh.cpp @@ -336,7 +336,9 @@ Tuple TetMesh::switch_tuple(const Tuple& tuple, PrimitiveType type) const assert(is_valid_slow(res)); return res; } - default: return autogen::tet_mesh::local_switch_tuple(tuple, type); + case PrimitiveType::Vertex: + case PrimitiveType::Edge: + case PrimitiveType::Face: return autogen::tet_mesh::local_switch_tuple(tuple, type); } } diff --git a/src/wmtk/TriMesh.cpp b/src/wmtk/TriMesh.cpp index a795653587..5d876d9754 100644 --- a/src/wmtk/TriMesh.cpp +++ b/src/wmtk/TriMesh.cpp @@ -137,7 +137,9 @@ Tuple TriMesh::switch_tuple(const Tuple& tuple, PrimitiveType type) const assert(is_valid(res, hash_accessor)); return res; } - default: return autogen::tri_mesh::local_switch_tuple(tuple, type); + case PrimitiveType::Vertex: + case PrimitiveType::Edge: return autogen::tri_mesh::local_switch_tuple(tuple, type); + case PrimitiveType::Tetrahedron: assert(false); } } diff --git a/src/wmtk/TriMeshOperationExecutor.cpp b/src/wmtk/TriMeshOperationExecutor.cpp index 6940a37fec..11ccf8f716 100644 --- a/src/wmtk/TriMeshOperationExecutor.cpp +++ b/src/wmtk/TriMeshOperationExecutor.cpp @@ -5,10 +5,10 @@ namespace wmtk { auto TriMesh::TriMeshOperationExecutor::get_incident_face_data(Tuple t) -> IncidentFaceData { - // / \ + // / \ // ear1 / \ ear2 - // / \ - // / \ + // / \ + // / \ // X----t---- // make sure that edge and vertex of the tuple are the same diff --git a/src/wmtk/attribute/AttributeScopeStack.hpp b/src/wmtk/attribute/AttributeScopeStack.hpp index 8678b5473b..f0a390c1ce 100644 --- a/src/wmtk/attribute/AttributeScopeStack.hpp +++ b/src/wmtk/attribute/AttributeScopeStack.hpp @@ -16,8 +16,9 @@ struct AttributeManager; template -struct AttributeScopeStack +class AttributeScopeStack { +public: // stack is implemented by a parent pointing graph, so we track a pointer // to the leaf AttributeScopeStack(); diff --git a/src/wmtk/attribute/PerThreadAttributeScopeStacks.hpp b/src/wmtk/attribute/PerThreadAttributeScopeStacks.hpp index 5f61f69d90..4d39023442 100644 --- a/src/wmtk/attribute/PerThreadAttributeScopeStacks.hpp +++ b/src/wmtk/attribute/PerThreadAttributeScopeStacks.hpp @@ -6,8 +6,9 @@ namespace wmtk::attribute { template -struct PerThreadAttributeScopeStacks +class PerThreadAttributeScopeStacks { +public: AttributeScopeStack& local() { return m_stacks.local(); } const AttributeScopeStack& local() const { return m_stacks.local(); } mutable tbb::enumerable_thread_specific> m_stacks; diff --git a/src/wmtk/operations/Operation.hpp b/src/wmtk/operations/Operation.hpp index 167373080f..8d3af5fa54 100644 --- a/src/wmtk/operations/Operation.hpp +++ b/src/wmtk/operations/Operation.hpp @@ -12,7 +12,7 @@ class InvariantCollection; namespace operations { template -struct OperationSettings +class OperationSettings { }; diff --git a/src/wmtk/operations/tri_mesh/VertexAttributesUpdateBase.cpp b/src/wmtk/operations/tri_mesh/VertexAttributesUpdateBase.cpp index 93fd19a5af..f28bd0e84e 100644 --- a/src/wmtk/operations/tri_mesh/VertexAttributesUpdateBase.cpp +++ b/src/wmtk/operations/tri_mesh/VertexAttributesUpdateBase.cpp @@ -18,7 +18,7 @@ VertexAttributesUpdateBase::VertexAttributesUpdateBase( const OperationSettings& settings) : TriMeshOperation(m) , TupleOperation(settings.invariants, t) - , m_settings{settings} +//, m_settings(settings) {} std::string VertexAttributesUpdateBase::name() const diff --git a/src/wmtk/operations/tri_mesh/VertexAttributesUpdateBase.hpp b/src/wmtk/operations/tri_mesh/VertexAttributesUpdateBase.hpp index 41f2e22c1a..4e65339e27 100644 --- a/src/wmtk/operations/tri_mesh/VertexAttributesUpdateBase.hpp +++ b/src/wmtk/operations/tri_mesh/VertexAttributesUpdateBase.hpp @@ -36,7 +36,7 @@ class VertexAttributesUpdateBase : public TriMeshOperation, protected TupleOpera private: Tuple m_output_tuple; - const OperationSettings& m_settings; + // const OperationSettings& m_settings; }; } // namespace tri_mesh diff --git a/src/wmtk/simplex/top_level_cofaces.cpp b/src/wmtk/simplex/top_level_cofaces.cpp index ba12b02e35..eaa1cb064a 100644 --- a/src/wmtk/simplex/top_level_cofaces.cpp +++ b/src/wmtk/simplex/top_level_cofaces.cpp @@ -15,13 +15,13 @@ namespace wmtk::simplex { namespace { -std::vector top_level_cofaces_tuples_vertex(const TriMesh& mesh, const Tuple& t) +std::vector top_level_cofaces_tuples_vertex(const TriMesh& mesh, const Tuple& t_in) { std::vector collection; std::set touched_cells; std::queue q; - q.push(t); + q.push(t_in); while (!q.empty()) { const Tuple t = q.front(); q.pop(); @@ -60,12 +60,12 @@ std::vector top_level_cofaces_tuples_face(const TriMesh& mesh, const Tupl return {t}; } -std::vector top_level_cofaces_tuples_vertex(const TetMesh& mesh, const Tuple& t) +std::vector top_level_cofaces_tuples_vertex(const TetMesh& mesh, const Tuple& t_in) { std::vector collection; std::set touched_cells; std::queue q; - q.push(t); + q.push(t_in); while (!q.empty()) { const Tuple t = q.front(); q.pop(); @@ -96,12 +96,12 @@ std::vector top_level_cofaces_tuples_vertex(const TetMesh& mesh, const Tu } return collection; } -std::vector top_level_cofaces_tuples_edge(const TetMesh& mesh, const Tuple& t) +std::vector top_level_cofaces_tuples_edge(const TetMesh& mesh, const Tuple& t_in) { std::vector collection; std::set touched_cells; std::queue q; - q.push(t); + q.push(t_in); while (!q.empty()) { const Tuple t = q.front(); q.pop(); @@ -163,7 +163,7 @@ std::vector top_level_cofaces_tuples(const TriMesh& mesh, const Simplex& collection = top_level_cofaces_tuples_face(mesh, simplex.tuple()); break; } - default: assert(false); break; + case PrimitiveType::Tetrahedron: assert(false); break; } @@ -205,7 +205,8 @@ std::vector top_level_cofaces_tuples(const Mesh& mesh, const Simplex& sim return top_level_cofaces_tuples(static_cast(mesh), simplex); case PrimitiveType::Tetrahedron: return top_level_cofaces_tuples(static_cast(mesh), simplex); - default: assert(false); throw "unknown mesh type in top_level_cofaces_tuples"; + case PrimitiveType::Vertex: + case PrimitiveType::Edge: assert(false); throw "unknown mesh type in top_level_cofaces_tuples"; } } diff --git a/src/wmtk/utils/TupleCellLessThanFunctor.hpp b/src/wmtk/utils/TupleCellLessThanFunctor.hpp index 97654be8c2..0e6907244e 100644 --- a/src/wmtk/utils/TupleCellLessThanFunctor.hpp +++ b/src/wmtk/utils/TupleCellLessThanFunctor.hpp @@ -2,9 +2,12 @@ #include namespace wmtk::utils { - struct TupleCellLessThan { - bool operator()(const Tuple& a, const Tuple& b) const { - return a.m_global_cid < b.m_global_cid; - } - }; -} +class TupleCellLessThan +{ +public: + bool operator()(const Tuple& a, const Tuple& b) const + { + return a.m_global_cid < b.m_global_cid; + } +}; +} // namespace wmtk::utils diff --git a/src/wmtk/utils/TupleInspector.hpp b/src/wmtk/utils/TupleInspector.hpp index de9e0f1412..d89d8b6da2 100644 --- a/src/wmtk/utils/TupleInspector.hpp +++ b/src/wmtk/utils/TupleInspector.hpp @@ -4,8 +4,9 @@ namespace wmtk::utils { // NOTE: this is just for helping with autogen accessing tuple intenrals. DO NOT USE ELSEWHERE -struct TupleInspector +class TupleInspector { +public: static long local_vid(const Tuple& t) { return t.m_local_vid; } static long local_eid(const Tuple& t) { return t.m_local_eid; } static long local_fid(const Tuple& t) { return t.m_local_fid; } @@ -13,4 +14,4 @@ struct TupleInspector static long global_cid(const Tuple& t) { return t.m_global_cid; } static long hash(const Tuple& t) { return t.m_hash; } }; -} // namespace wmtk::autogen::utils +} // namespace wmtk::utils diff --git a/tests/components/test_component_isotropic_remeshing.cpp b/tests/components/test_component_isotropic_remeshing.cpp index 3ee561e187..61ac661da3 100644 --- a/tests/components/test_component_isotropic_remeshing.cpp +++ b/tests/components/test_component_isotropic_remeshing.cpp @@ -111,7 +111,7 @@ TEST_CASE("smoothing_simple_examples", "[components][isotropic_remeshing][2D]") for (size_t i = 0; i < 10; ++i) { scheduler.run_operation_on_all(PrimitiveType::Vertex, "vertex_smooth"); v4 = mesh.tuple_from_id(PrimitiveType::Vertex, 4); - Eigen::Vector3d p4_after_smooth = pos.vector_attribute(v4); + /*Eigen::Vector3d p4_after_smooth =*/pos.vector_attribute(v4); } Eigen::Vector3d p4_after_smooth = pos.vector_attribute(v4); diff --git a/tests/test_2d_operation_construction.cpp b/tests/test_2d_operation_construction.cpp index 1fbae22455..3a1dd24d9a 100644 --- a/tests/test_2d_operation_construction.cpp +++ b/tests/test_2d_operation_construction.cpp @@ -17,7 +17,7 @@ namespace { constexpr PrimitiveType PV = PrimitiveType::Vertex; constexpr PrimitiveType PE = PrimitiveType::Edge; -constexpr PrimitiveType PF = PrimitiveType::Face; +// constexpr PrimitiveType PF = PrimitiveType::Face; // because TriMesh::split_edge isn'ta waare of preconditions we need to tell the system whether // something should succeed diff --git a/tests/test_3d_operations.cpp b/tests/test_3d_operations.cpp index 858f987cb6..a995e7272e 100644 --- a/tests/test_3d_operations.cpp +++ b/tests/test_3d_operations.cpp @@ -18,7 +18,6 @@ using TMOE = decltype(std::declval().get_tmoe( wmtk::Tuple(), std::declval&>())); -constexpr PrimitiveType PV = PrimitiveType::Vertex; constexpr PrimitiveType PE = PrimitiveType::Edge; constexpr PrimitiveType PF = PrimitiveType::Face; constexpr PrimitiveType PT = PrimitiveType::Tetrahedron; diff --git a/tests/test_multi_mesh.cpp b/tests/test_multi_mesh.cpp index ec8868cc26..49f987a579 100644 --- a/tests/test_multi_mesh.cpp +++ b/tests/test_multi_mesh.cpp @@ -56,8 +56,8 @@ TEST_CASE("test_register_child_mesh", "[multimesh][2D]") // test id computation REQUIRE(parent.absolute_multi_mesh_id().empty()); - REQUIRE(child0.absolute_multi_mesh_id() == std::vector{{0}}); - REQUIRE(child1.absolute_multi_mesh_id() == std::vector{{1}}); + REQUIRE(child0.absolute_multi_mesh_id() == std::vector{0}); + REQUIRE(child1.absolute_multi_mesh_id() == std::vector{1}); // test attribute contents { diff --git a/tests/test_simplex_collection.cpp b/tests/test_simplex_collection.cpp index af2c9a2b31..3002665030 100644 --- a/tests/test_simplex_collection.cpp +++ b/tests/test_simplex_collection.cpp @@ -22,7 +22,7 @@ using namespace simplex; constexpr PrimitiveType PV = PrimitiveType::Vertex; constexpr PrimitiveType PE = PrimitiveType::Edge; constexpr PrimitiveType PF = PrimitiveType::Face; -constexpr PrimitiveType PT = PrimitiveType::Tetrahedron; +// constexpr PrimitiveType PT = PrimitiveType::Tetrahedron; namespace { template // use a DEBUG mesh type void check_match_below_simplex_type(const MeshType& mesh, const Simplex& a, const Simplex& b)