From 58caffe439ae07e8c01f3dfdad008b7fdb11f21f Mon Sep 17 00:00:00 2001 From: Bruno Date: Wed, 12 May 2021 13:02:00 -0400 Subject: [PATCH] Add eccentric_hyper_shell to generator_from_name --- source/grid/grid_generator_from_name.cc | 9 ++ ...rid_generator_from_name_and_argument_01.cc | 3 + ...generator_from_name_and_argument_01.output | 84 +++++++++++++++++++ 3 files changed, 96 insertions(+) diff --git a/source/grid/grid_generator_from_name.cc b/source/grid/grid_generator_from_name.cc index 203c89f257..1ac0314e93 100644 --- a/source/grid/grid_generator_from_name.cc +++ b/source/grid/grid_generator_from_name.cc @@ -188,6 +188,15 @@ namespace GridGenerator unsigned int, bool>(quarter_hyper_shell, arguments, tria); + else if (name == "eccentric_hyper_shell") + parse_and_create &, + const Point &, + double, + double, + unsigned int>(eccentric_hyper_shell, arguments, tria); + else if (name == "cylinder_shell") parse_and_create("hyper_cube", "0: 1: true"); test<2, 3>("hyper_cube", "0: 1: true"); test<3, 3>("hyper_cube", "0: 1: true"); + + test<2, 2>("eccentric_hyper_shell", "0, 0, : 0.2, 0 : 0.5 : 1 : 10"); + test<3, 3>("eccentric_hyper_shell", "0, 0, 0 : 0.2, 0, 0: 0.5 : 1 : 12"); } diff --git a/tests/grid/grid_generator_from_name_and_argument_01.output b/tests/grid/grid_generator_from_name_and_argument_01.output index 8d95886650..cc678e2e0b 100644 --- a/tests/grid/grid_generator_from_name_and_argument_01.output +++ b/tests/grid/grid_generator_from_name_and_argument_01.output @@ -1109,3 +1109,87 @@ $ELM 1 1 5 0 0 8 1 2 6 5 3 4 8 7 $ENDELM +DEAL::Generating Triangulation<2, 2> : eccentric_hyper_shell(0, 0, : 0.2, 0 : 0.5 : 1 : 10) +$NOD +20 +1 1.20000 0.00000 0 +2 1.00902 0.587785 0 +3 0.509017 0.951057 0 +4 -0.109017 0.951057 0 +5 -0.609017 0.587785 0 +6 -0.800000 1.22465e-16 0 +7 -0.609017 -0.587785 0 +8 -0.109017 -0.951057 0 +9 0.509017 -0.951057 0 +10 1.00902 -0.587785 0 +11 0.500000 0.00000 0 +12 0.404508 0.293893 0 +13 0.154508 0.475528 0 +14 -0.154508 0.475528 0 +15 -0.404508 0.293893 0 +16 -0.500000 6.12323e-17 0 +17 -0.404508 -0.293893 0 +18 -0.154508 -0.475528 0 +19 0.154508 -0.475528 0 +20 0.404508 -0.293893 0 +$ENDNOD +$ELM +10 +1 3 0 0 4 1 2 12 11 +2 3 0 0 4 2 3 13 12 +3 3 0 0 4 3 4 14 13 +4 3 0 0 4 4 5 15 14 +5 3 0 0 4 5 6 16 15 +6 3 0 0 4 6 7 17 16 +7 3 0 0 4 7 8 18 17 +8 3 0 0 4 8 9 19 18 +9 3 0 0 4 9 10 20 19 +10 3 0 0 4 10 1 11 20 +$ENDELM +DEAL::Generating Triangulation<3, 3> : eccentric_hyper_shell(0, 0, 0 : 0.2, 0, 0: 0.5 : 1 : 12) +$NOD +28 +1 -0.288675 -0.288675 -0.288675 +2 0.288675 -0.288675 -0.288675 +3 -0.288675 0.288675 -0.288675 +4 0.288675 0.288675 -0.288675 +5 -0.288675 -0.288675 0.288675 +6 0.288675 -0.288675 0.288675 +7 -0.288675 0.288675 0.288675 +8 0.288675 0.288675 0.288675 +9 -0.500000 0.00000 0.00000 +10 0.500000 0.00000 0.00000 +11 0.00000 -0.500000 0.00000 +12 0.00000 0.500000 0.00000 +13 0.00000 0.00000 -0.500000 +14 0.00000 0.00000 0.500000 +15 -0.377350 -0.577350 -0.577350 +16 0.777350 -0.577350 -0.577350 +17 -0.377350 0.577350 -0.577350 +18 0.777350 0.577350 -0.577350 +19 -0.377350 -0.577350 0.577350 +20 0.777350 -0.577350 0.577350 +21 -0.377350 0.577350 0.577350 +22 0.777350 0.577350 0.577350 +23 -0.800000 0.00000 0.00000 +24 1.20000 0.00000 0.00000 +25 0.200000 -1.00000 0.00000 +26 0.200000 1.00000 0.00000 +27 0.200000 0.00000 -1.00000 +28 0.200000 0.00000 1.00000 +$ENDNOD +$ELM +12 +1 5 0 0 8 11 5 19 25 1 9 23 15 +2 5 0 0 8 5 14 28 19 9 7 21 23 +3 5 0 0 8 11 6 20 25 5 14 28 19 +4 5 0 0 8 2 10 24 16 11 6 20 25 +5 5 0 0 8 10 8 22 24 6 14 28 20 +6 5 0 0 8 8 12 26 22 14 7 21 28 +7 5 0 0 8 10 4 18 24 8 12 26 22 +8 5 0 0 8 2 13 27 16 10 4 18 24 +9 5 0 0 8 13 3 17 27 4 12 26 18 +10 5 0 0 8 3 9 23 17 12 7 21 26 +11 5 0 0 8 13 1 15 27 3 9 23 17 +12 5 0 0 8 2 11 25 16 13 1 15 27 +$ENDELM -- 2.39.5