From 40533cabbd6d40c280b9ca22302839995a61c076 Mon Sep 17 00:00:00 2001 From: Niklas Fehn Date: Wed, 16 Oct 2019 11:25:37 +0200 Subject: [PATCH] fix bug in GridGenerator::torus<3,3>() --- source/grid/grid_generator.cc | 2 +- tests/grid/torus_01.output | 146 +++++++++++++++++----------------- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 4375ebb00b..a335abc88a 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -827,7 +827,7 @@ namespace GridGenerator cell->set_all_manifold_ids(2); } tria.set_all_manifold_ids_on_boundary(1); - tria.set_manifold(1, TorusManifold<3>(2, 0.5)); + tria.set_manifold(1, TorusManifold<3>(R, r)); tria.set_manifold(2, CylindricalManifold<3>(Tensor<1, 3>({0., 1., 0.}), Point<3>())); diff --git a/tests/grid/torus_01.output b/tests/grid/torus_01.output index 046a698efb..4bb782ef28 100644 --- a/tests/grid/torus_01.output +++ b/tests/grid/torus_01.output @@ -15,13 +15,13 @@ set arrow from -0.441421, 0.117157, -0.764564 to -2.24442, 0.336571, 1.28981 set arrow from -0.641421, 0.282843, -1.11097 to -3.24168, 0.0317349, 1.90823 set arrow from 0.441421, -0.117157, -0.764564 to 1.50113, 0.189230, 1.46782 set arrow from 0.558579, 0.117157, -0.967487 to 2.30520, 0.178830, 1.15477 -set arrow from 1.00314, -0.304367, 0.00000 to 0.749141, -0.0878816, 1.26059 -set arrow from 1.20000, -0.200000, -8.81836e-16 to 0.419442, 0.253757, 1.50796 +set arrow from 1.00000, -0.400000, 0.00000 to 0.987358, -5.11243e-16, 1.25664 +set arrow from 1.20000, -0.200000, 9.40156e-17 to 0.419442, 0.253757, 1.50796 set arrow from 0.764564, -0.117157, 0.441421 to -0.774432, 0.189230, 0.300154 set arrow from 0.400000, -0.200000, 0.692820 to -0.489465, 0.523036, -0.512674 -set arrow from 0.868749, -0.304367, 0.501572 to 0.281103, -0.0878816, 1.01140 +set arrow from 0.866025, -0.400000, 0.500000 to 0.488558, -5.55652e-16, 1.12851 set arrow from 1.03923, -0.200000, 0.600000 to -0.0765756, 0.253757, 0.971517 -set arrow from 0.867387, -0.210762, 0.500786 to 0.0833099, -0.185357, 0.895870 +set arrow from 0.866025, -0.258579, 0.500000 to 0.186242, -0.141421, 0.953967 set view equal xyz splot '-' w l 0.882843 -0.117157 0.00000 0 0 @@ -721,139 +721,139 @@ splot '-' w l 1.11716 0.117157 0.00000 0 0 0.717157 -0.282843 0.00000 1 0 -1.00314 -0.304367 0.00000 1 0 -0.868749 -0.304367 0.501572 1 0 +1.00000 -0.400000 0.00000 1 0 +0.866025 -0.400000 0.500000 1 0 0.621076 -0.282843 0.358579 1 0 0.717157 -0.282843 0.00000 1 0 -0.800000 -0.200000 1.01888e-17 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 -0.867387 -0.210762 0.500786 1 0 +0.800000 -0.200000 1.49974e-14 1 0 +1.00000 -0.258579 1.79823e-14 1 0 +0.866025 -0.258579 0.500000 1 0 0.692820 -0.200000 0.400000 1 0 -0.800000 -0.200000 1.01888e-17 1 0 +0.800000 -0.200000 1.49974e-14 1 0 0.717157 -0.282843 0.00000 1 0 -0.800000 -0.200000 1.01888e-17 1 0 +0.800000 -0.200000 1.49974e-14 1 0 -1.00314 -0.304367 0.00000 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 +1.00000 -0.400000 0.00000 1 0 +1.00000 -0.258579 1.79823e-14 1 0 -0.868749 -0.304367 0.501572 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.400000 0.500000 1 0 +0.866025 -0.258579 0.500000 1 0 0.621076 -0.282843 0.358579 1 0 0.692820 -0.200000 0.400000 1 0 -1.00314 -0.304367 0.00000 1 0 +1.00000 -0.400000 0.00000 1 0 1.28284 -0.282843 0.00000 1 0 1.11097 -0.282843 0.641421 1 0 -0.868749 -0.304367 0.501572 1 0 -1.00314 -0.304367 0.00000 1 0 +0.866025 -0.400000 0.500000 1 0 +1.00000 -0.400000 0.00000 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 -1.20000 -0.200000 -8.81836e-16 1 0 +1.00000 -0.258579 1.79823e-14 1 0 +1.20000 -0.200000 9.40156e-17 1 0 1.03923 -0.200000 0.600000 1 0 -0.867387 -0.210762 0.500786 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 +0.866025 -0.258579 0.500000 1 0 +1.00000 -0.258579 1.79823e-14 1 0 -1.00314 -0.304367 0.00000 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 +1.00000 -0.400000 0.00000 1 0 +1.00000 -0.258579 1.79823e-14 1 0 1.28284 -0.282843 0.00000 1 0 -1.20000 -0.200000 -8.81836e-16 1 0 +1.20000 -0.200000 9.40156e-17 1 0 1.11097 -0.282843 0.641421 1 0 1.03923 -0.200000 0.600000 1 0 -0.868749 -0.304367 0.501572 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.400000 0.500000 1 0 +0.866025 -0.258579 0.500000 1 0 -0.800000 -0.200000 1.01888e-17 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 -0.867387 -0.210762 0.500786 1 0 +0.800000 -0.200000 1.49974e-14 1 0 +1.00000 -0.258579 1.79823e-14 1 0 +0.866025 -0.258579 0.500000 1 0 0.692820 -0.200000 0.400000 1 0 -0.800000 -0.200000 1.01888e-17 1 0 +0.800000 -0.200000 1.49974e-14 1 0 0.882843 -0.117157 0.00000 1 0 -1.00000 -0.117157 2.22045e-16 1 0 +1.00000 -0.117157 1.99673e-16 1 0 0.866025 -0.117157 0.500000 1 0 0.764564 -0.117157 0.441421 1 0 0.882843 -0.117157 0.00000 1 0 -0.800000 -0.200000 1.01888e-17 1 0 +0.800000 -0.200000 1.49974e-14 1 0 0.882843 -0.117157 0.00000 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 -1.00000 -0.117157 2.22045e-16 1 0 +1.00000 -0.258579 1.79823e-14 1 0 +1.00000 -0.117157 1.99673e-16 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.258579 0.500000 1 0 0.866025 -0.117157 0.500000 1 0 0.692820 -0.200000 0.400000 1 0 0.764564 -0.117157 0.441421 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 -1.20000 -0.200000 -8.81836e-16 1 0 +1.00000 -0.258579 1.79823e-14 1 0 +1.20000 -0.200000 9.40156e-17 1 0 1.03923 -0.200000 0.600000 1 0 -0.867387 -0.210762 0.500786 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 +0.866025 -0.258579 0.500000 1 0 +1.00000 -0.258579 1.79823e-14 1 0 -1.00000 -0.117157 2.22045e-16 1 0 +1.00000 -0.117157 1.99673e-16 1 0 1.11716 -0.117157 0.00000 1 0 0.967487 -0.117157 0.558579 1 0 0.866025 -0.117157 0.500000 1 0 -1.00000 -0.117157 2.22045e-16 1 0 +1.00000 -0.117157 1.99673e-16 1 0 -1.00157 -0.210762 -1.18275e-17 1 0 -1.00000 -0.117157 2.22045e-16 1 0 +1.00000 -0.258579 1.79823e-14 1 0 +1.00000 -0.117157 1.99673e-16 1 0 -1.20000 -0.200000 -8.81836e-16 1 0 +1.20000 -0.200000 9.40156e-17 1 0 1.11716 -0.117157 0.00000 1 0 1.03923 -0.200000 0.600000 1 0 0.967487 -0.117157 0.558579 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.258579 0.500000 1 0 0.866025 -0.117157 0.500000 1 0 0.621076 -0.282843 0.358579 1 0 -0.868749 -0.304367 0.501572 1 0 -0.501572 -0.304367 0.868749 1 0 +0.866025 -0.400000 0.500000 1 0 +0.500000 -0.400000 0.866025 1 0 0.358579 -0.282843 0.621076 1 0 0.621076 -0.282843 0.358579 1 0 0.692820 -0.200000 0.400000 1 0 -0.867387 -0.210762 0.500786 1 0 -0.500786 -0.210762 0.867387 1 0 +0.866025 -0.258579 0.500000 1 0 +0.500000 -0.258579 0.866025 1 0 0.400000 -0.200000 0.692820 1 0 0.692820 -0.200000 0.400000 1 0 0.621076 -0.282843 0.358579 1 0 0.692820 -0.200000 0.400000 1 0 -0.868749 -0.304367 0.501572 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.400000 0.500000 1 0 +0.866025 -0.258579 0.500000 1 0 -0.501572 -0.304367 0.868749 1 0 -0.500786 -0.210762 0.867387 1 0 +0.500000 -0.400000 0.866025 1 0 +0.500000 -0.258579 0.866025 1 0 0.358579 -0.282843 0.621076 1 0 0.400000 -0.200000 0.692820 1 0 -0.868749 -0.304367 0.501572 1 0 +0.866025 -0.400000 0.500000 1 0 1.11097 -0.282843 0.641421 1 0 0.641421 -0.282843 1.11097 1 0 -0.501572 -0.304367 0.868749 1 0 -0.868749 -0.304367 0.501572 1 0 +0.500000 -0.400000 0.866025 1 0 +0.866025 -0.400000 0.500000 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.258579 0.500000 1 0 1.03923 -0.200000 0.600000 1 0 0.600000 -0.200000 1.03923 1 0 -0.500786 -0.210762 0.867387 1 0 -0.867387 -0.210762 0.500786 1 0 +0.500000 -0.258579 0.866025 1 0 +0.866025 -0.258579 0.500000 1 0 -0.868749 -0.304367 0.501572 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.400000 0.500000 1 0 +0.866025 -0.258579 0.500000 1 0 1.11097 -0.282843 0.641421 1 0 1.03923 -0.200000 0.600000 1 0 @@ -861,12 +861,12 @@ splot '-' w l 0.641421 -0.282843 1.11097 1 0 0.600000 -0.200000 1.03923 1 0 -0.501572 -0.304367 0.868749 1 0 -0.500786 -0.210762 0.867387 1 0 +0.500000 -0.400000 0.866025 1 0 +0.500000 -0.258579 0.866025 1 0 0.692820 -0.200000 0.400000 1 0 -0.867387 -0.210762 0.500786 1 0 -0.500786 -0.210762 0.867387 1 0 +0.866025 -0.258579 0.500000 1 0 +0.500000 -0.258579 0.866025 1 0 0.400000 -0.200000 0.692820 1 0 0.692820 -0.200000 0.400000 1 0 @@ -879,20 +879,20 @@ splot '-' w l 0.692820 -0.200000 0.400000 1 0 0.764564 -0.117157 0.441421 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.258579 0.500000 1 0 0.866025 -0.117157 0.500000 1 0 -0.500786 -0.210762 0.867387 1 0 +0.500000 -0.258579 0.866025 1 0 0.500000 -0.117157 0.866025 1 0 0.400000 -0.200000 0.692820 1 0 0.441421 -0.117157 0.764564 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.258579 0.500000 1 0 1.03923 -0.200000 0.600000 1 0 0.600000 -0.200000 1.03923 1 0 -0.500786 -0.210762 0.867387 1 0 -0.867387 -0.210762 0.500786 1 0 +0.500000 -0.258579 0.866025 1 0 +0.866025 -0.258579 0.500000 1 0 0.866025 -0.117157 0.500000 1 0 0.967487 -0.117157 0.558579 1 0 @@ -900,7 +900,7 @@ splot '-' w l 0.500000 -0.117157 0.866025 1 0 0.866025 -0.117157 0.500000 1 0 -0.867387 -0.210762 0.500786 1 0 +0.866025 -0.258579 0.500000 1 0 0.866025 -0.117157 0.500000 1 0 1.03923 -0.200000 0.600000 1 0 @@ -909,7 +909,7 @@ splot '-' w l 0.600000 -0.200000 1.03923 1 0 0.558579 -0.117157 0.967487 1 0 -0.500786 -0.210762 0.867387 1 0 +0.500000 -0.258579 0.866025 1 0 0.500000 -0.117157 0.866025 1 0 e -- 2.39.5