From d2b2602c94aa6aab7311fb57c7b36df499802bfc Mon Sep 17 00:00:00 2001 From: Johannes Markert Date: Wed, 30 Oct 2024 11:16:09 +0100 Subject: [PATCH 1/3] Fix wrong return value when checking tree geometry compat. --- .../t8_geometry_examples.hxx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx b/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx index 34aa2e98c4..7eeadbd91d 100644 --- a/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx +++ b/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx @@ -96,9 +96,9 @@ struct t8_geometry_quadrangulated_disk: public t8_geometry_with_vertices t8_productionf ("t8_geometry_quadrangulated_disk is not compatible with tree type %s\n" "It is only compatible with quad elements.\n", t8_eclass_to_string[active_tree_class]); - return true; + return false; } - return false; + return true; } /* Load tree data is inherited from t8_geometry_with_vertices. */ @@ -155,9 +155,9 @@ struct t8_geometry_triangulated_spherical_surface: public t8_geometry_with_verti t8_productionf ("t8_geometry_triangulated_spherical_surface is not compatible with tree type %s\n" "It is only compatible with triangle elements.\n", t8_eclass_to_string[active_tree_class]); - return true; + return false; } - return false; + return true; } /* Load tree data is inherited from t8_geometry_with_vertices. */ @@ -213,9 +213,9 @@ struct t8_geometry_tessellated_spherical_surface: public t8_geometry_with_vertic t8_productionf ("t8_geometry_quadrangulated_spherical_surface is not compatible with tree type %s\n" "It is only compatible with quad elements.\n", t8_eclass_to_string[active_tree_class]); - return true; + return false; } - return false; + return true; } /* Load tree data is inherited from t8_geometry_with_vertices. */ @@ -271,9 +271,9 @@ struct t8_geometry_cubed_spherical_shell: public t8_geometry_with_vertices t8_productionf ("t8_geometry_cubed_spherical_shell is not compatible with tree type %s\n" "It is only compatible with hex elements.\n", t8_eclass_to_string[active_tree_class]); - return true; + return false; } - return false; + return true; } /* Load tree data is inherited from t8_geometry_with_vertices. */ @@ -329,9 +329,9 @@ struct t8_geometry_prismed_spherical_shell: public t8_geometry_with_vertices t8_productionf ("t8_geometry_prismed_spherical_shell is not compatible with tree type %s\n" "It is only compatible with prism elements.\n", t8_eclass_to_string[active_tree_class]); - return true; + return false; } - return false; + return true; } /* Load tree data is inherited from t8_geometry_with_vertices. */ @@ -387,9 +387,9 @@ struct t8_geometry_cubed_sphere: public t8_geometry_with_vertices t8_productionf ("t8_geometry_cubed_sphere is not compatible with tree type %s\n" "It is only compatible with hex elements.\n", t8_eclass_to_string[active_tree_class]); - return true; + return false; } - return false; + return true; } /* Load tree data is inherited from t8_geometry_with_vertices. */ From 3b81ae89f2fae1e22524fee47e1ebffb2ce52fbe Mon Sep 17 00:00:00 2001 From: Johannes Markert Date: Wed, 30 Oct 2024 11:47:22 +0100 Subject: [PATCH 2/3] Added triangle element shape to compat test for tesselated sphere. --- .../t8_geometry_examples.hxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx b/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx index 7eeadbd91d..629e16d681 100644 --- a/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx +++ b/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx @@ -209,13 +209,15 @@ struct t8_geometry_tessellated_spherical_surface: public t8_geometry_with_vertic bool t8_geom_check_tree_compatibility () const { - if (active_tree_class != T8_ECLASS_QUAD) { - t8_productionf ("t8_geometry_quadrangulated_spherical_surface is not compatible with tree type %s\n" - "It is only compatible with quad elements.\n", - t8_eclass_to_string[active_tree_class]); - return false; + if (active_tree_class == T8_ECLASS_TRIANGLE || active_tree_class == T8_ECLASS_QUAD) { + return true; } - return true; + + t8_productionf ("t8_geometry_quadrangulated_spherical_surface is not compatible with tree type %s\n" + "It is only compatible with quad elements.\n", + t8_eclass_to_string[active_tree_class]); + + return false; } /* Load tree data is inherited from t8_geometry_with_vertices. */ From bd1a3daf4efc2ed53e0ca5056f4c0070d9c427bd Mon Sep 17 00:00:00 2001 From: Johannes Markert Date: Wed, 30 Oct 2024 15:36:36 +0100 Subject: [PATCH 3/3] Fixed typo. --- .../t8_geometry_implementations/t8_geometry_examples.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx b/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx index 629e16d681..e748c81960 100644 --- a/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx +++ b/src/t8_geometry/t8_geometry_implementations/t8_geometry_examples.hxx @@ -213,8 +213,8 @@ struct t8_geometry_tessellated_spherical_surface: public t8_geometry_with_vertic return true; } - t8_productionf ("t8_geometry_quadrangulated_spherical_surface is not compatible with tree type %s\n" - "It is only compatible with quad elements.\n", + t8_productionf ("t8_geometry_tessellated_spherical_surface is not compatible with tree type %s\n" + "It is only compatible with triangle and quad elements.\n", t8_eclass_to_string[active_tree_class]); return false;