diff --git a/components/multimesh/src/wmtk/components/multimesh/utils/AttributeDescription.hpp b/components/multimesh/src/wmtk/components/multimesh/utils/AttributeDescription.hpp index 4f64fb7d3c..05b0811889 100644 --- a/components/multimesh/src/wmtk/components/multimesh/utils/AttributeDescription.hpp +++ b/components/multimesh/src/wmtk/components/multimesh/utils/AttributeDescription.hpp @@ -10,6 +10,14 @@ namespace wmtk::components::multimesh::utils { // the minimal information to uniquely extract an attribute handle struct AttributeDescription { + // Avoiding defining any constructors to enable aggregate construction + //AttributeDescription() = default; + //AttributeDescription(const AttributeDescription&) = default; + //AttributeDescription(AttributeDescription&&) = default; + //AttributeDescription& operator=(const AttributeDescription&) = default; + //AttributeDescription& operator=(AttributeDescription&&) = default; + //~AttributeDescription() = default; + std::string path; uint8_t dimension; // internally the primitive type attribute::AttributeType type; diff --git a/components/multimesh/tests/named_multimesh.cpp b/components/multimesh/tests/named_multimesh.cpp index 85287a8b1f..0f6c05b723 100644 --- a/components/multimesh/tests/named_multimesh.cpp +++ b/components/multimesh/tests/named_multimesh.cpp @@ -156,12 +156,12 @@ TEST_CASE("named_multimesh_parse_attributes", "[components][multimesh]") using AT = wmtk::attribute::AttributeType; - +using AD = wmtk::components::multimesh::utils::AttributeDescription; { // double check that path extraction is working - std::vector double_ads; - double_ads.emplace_back("double_test", 0, AT::Double); - double_ads.emplace_back("/double_test", 0, AT::Double); - double_ads.emplace_back("roo/double_test", 0, AT::Double); + std::vector double_ads; + double_ads.emplace_back(AD{"double_test", 0, AT::Double}); + double_ads.emplace_back(AD{"/double_test", 0, AT::Double}); + double_ads.emplace_back(AD{"roo/double_test", 0, AT::Double}); for (const auto& ad : double_ads) { @@ -179,15 +179,15 @@ TEST_CASE("named_multimesh_parse_attributes", "[components][multimesh]") CHECK( rational_test_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"rational_test", 0, AT::Rational})); + AD{"rational_test", 0, AT::Rational})); CHECK( int_test_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"int_test", 0, AT::Int64})); + AD{"int_test", 0, AT::Int64})); CHECK( char_test_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"char_test", 0, AT::Char})); + AD{"char_test", 0, AT::Char})); } { // check that other simplex types work auto edge_handle = @@ -197,17 +197,18 @@ TEST_CASE("named_multimesh_parse_attributes", "[components][multimesh]") CHECK( edge_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"double_test", 1, AT::Double})); + AD{"double_test", 1, AT::Double})); CHECK( tri_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"double_test", 2, AT::Double})); + AD{"double_test", 2, AT::Double})); // TODO: lazy about testing tet } } { + using AD = wmtk::components::multimesh::utils::AttributeDescription; auto m = make_mesh(); auto children = make_child(*m, {0}); REQUIRE(children.size() == 1); @@ -231,23 +232,23 @@ TEST_CASE("named_multimesh_parse_attributes", "[components][multimesh]") CHECK( attr_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"double_test", 0, AT::Double})); + AD{"double_test", 0, AT::Double})); CHECK( attr_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"/double_test", 0, AT::Double})); + AD{"/double_test", 0, AT::Double})); CHECK( attr_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"roo/double_test", 0, AT::Double})); + AD{"roo/double_test", 0, AT::Double})); CHECK( child_attr_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {"roo.child/double_test", 0, AT::Double})); + AD{"roo.child/double_test", 0, AT::Double})); CHECK( child_attr_handle == wmtk::components::multimesh::utils::get_attribute( named_mm, - {".child/double_test", 0, AT::Double})); + AD{".child/double_test", 0, AT::Double})); } }