From: David Wells Date: Wed, 18 Apr 2018 03:35:33 +0000 (-0400) Subject: Fix a test by using two new manifold descriptions. X-Git-Tag: v9.0.0-rc1~154^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=245296fcda8362d476567b0cb0a30137e2e8cba7;p=dealii.git Fix a test by using two new manifold descriptions. Since we shift the location of the inner circle we need to use a new inner boundary manifold description and no manifold descriptions can be easily extended into the volume. --- diff --git a/tests/grid/grid_transform.cc b/tests/grid/grid_transform.cc index ba3d89abf6..06c9beae37 100644 --- a/tests/grid/grid_transform.cc +++ b/tests/grid/grid_transform.cc @@ -38,10 +38,13 @@ int main () const double inner_radius=1.; const double outer_radius=5.; GridGenerator::hyper_shell(tria, origin, inner_radius, outer_radius, 8); - GridTools::copy_boundary_to_manifold_id(tria); - SphericalManifold boundary(origin); - tria.set_manifold(0, boundary); + // restore compatibility with the pre-9.0 version of GridGenerator by resetting manifolds + tria.set_all_manifold_ids(numbers::flat_manifold_id); + tria.set_all_manifold_ids_on_boundary(0); tria.refine_global(2); + // We will move the boundary faces below in the laplace smoothing algorithm: + // for now reset all manifold IDs. + tria.set_all_manifold_ids(numbers::flat_manifold_id); // build up a map of vertex indices // of boundary vertices to the new @@ -74,6 +77,7 @@ int main () // they are. new_points.insert(std::pair > ( face->vertex_index(vertex_no), v)); + face->set_manifold_id(0); } else if (std::fabs(std::sqrt(v.square())-inner_radius)<1e-12) { @@ -88,7 +92,7 @@ int main () // circle. new_points.insert(std::pair > ( face->vertex_index(vertex_no), n_radius/inner_radius*v+n_center)); - face->set_boundary_id(1); + face->set_manifold_id(1); } else Assert(false, ExcInternalError()); @@ -96,12 +100,14 @@ int main () } } GridTools::copy_boundary_to_manifold_id(tria); - GridTools::laplace_transform (new_points, tria); SphericalManifold inner_ball(n_center); tria.set_manifold(1, inner_ball); + SphericalManifold outer_ball(origin); + tria.set_manifold(0, outer_ball); + GridTools::laplace_transform (new_points, tria); - GridOut grid_out; std::ofstream eps_stream2("output"); + GridOut grid_out; grid_out.write_eps(tria, eps_stream2, &mapping); tria.clear(); diff --git a/tests/grid/grid_transform.output b/tests/grid/grid_transform.output index 255ad180fc..718ef2d7ad 100644 --- a/tests/grid/grid_transform.output +++ b/tests/grid/grid_transform.output @@ -470,18 +470,18 @@ b 279.907 224.994 m 274.72 233.336 x b 274.72 233.336 m 268.999 241.32 x b 268.999 241.32 m 262.78 248.896 x b 262.78 248.896 m 256.066 256.066 x -b 165 120 m 164.968 120.982 x -b 164.968 120.982 m 164.872 121.957 x -b 164.872 121.957 m 164.712 122.926 x -b 164.712 122.926 m 164.489 123.883 x -b 164.489 123.883 m 164.204 124.821 x -b 164.204 124.821 m 163.858 125.74 x -b 163.858 125.74 m 163.453 126.635 x -b 163.453 126.635 m 162.991 127.499 x -b 162.991 127.499 m 162.472 128.334 x -b 162.472 128.334 m 161.9 129.132 x -b 161.9 129.132 m 161.278 129.89 x -b 161.278 129.89 m 160.607 130.607 x +b 165 120 m 164.924 120.981 x +b 164.924 120.981 m 164.828 121.957 x +b 164.828 121.957 m 164.712 122.926 x +b 164.712 122.926 m 164.44 123.87 x +b 164.44 123.87 m 164.155 124.808 x +b 164.155 124.808 m 163.858 125.74 x +b 163.858 125.74 m 163.398 126.606 x +b 163.398 126.606 m 162.936 127.47 x +b 162.936 127.47 m 162.472 128.334 x +b 162.472 128.334 m 161.839 129.083 x +b 161.839 129.083 m 161.217 129.841 x +b 161.217 129.841 m 160.607 130.607 x b 256.066 256.066 m 248.896 262.78 x b 248.896 262.78 m 241.32 268.999 x b 241.32 268.999 m 233.336 274.72 x @@ -494,18 +494,18 @@ b 188.83 294.887 m 179.264 297.118 x b 179.264 297.118 m 169.572 298.717 x b 169.572 298.717 m 159.817 299.678 x b 159.817 299.678 m 150 300 x -b 160.607 130.607 m 159.89 131.278 x -b 159.89 131.278 m 159.132 131.9 x -b 159.132 131.9 m 158.334 132.472 x -b 158.334 132.472 m 157.499 132.991 x -b 157.499 132.991 m 156.635 133.453 x -b 156.635 133.453 m 155.74 133.858 x -b 155.74 133.858 m 154.821 134.204 x -b 154.821 134.204 m 153.883 134.489 x -b 153.883 134.489 m 152.926 134.712 x -b 152.926 134.712 m 151.957 134.872 x -b 151.957 134.872 m 150.982 134.968 x -b 150.982 134.968 m 150 135 x +b 160.607 130.607 m 159.822 131.206 x +b 159.822 131.206 m 159.064 131.828 x +b 159.064 131.828 m 158.334 132.472 x +b 158.334 132.472 m 157.43 132.895 x +b 157.43 132.895 m 156.565 133.357 x +b 156.565 133.357 m 155.74 133.858 x +b 155.74 133.858 m 154.762 134.088 x +b 154.762 134.088 m 153.824 134.373 x +b 153.824 134.373 m 152.926 134.712 x +b 152.926 134.712 m 151.933 134.745 x +b 151.933 134.745 m 150.958 134.841 x +b 150.958 134.841 m 150 135 x b 150 300 m 140.183 299.678 x b 140.183 299.678 m 130.428 298.717 x b 130.428 298.717 m 120.736 297.118 x @@ -518,18 +518,18 @@ b 75.0062 279.907 m 66.6645 274.72 x b 66.6645 274.72 m 58.6803 268.999 x b 58.6803 268.999 m 51.1035 262.78 x b 51.1035 262.78 m 43.934 256.066 x -b 150 135 m 149.018 134.968 x -b 149.018 134.968 m 148.043 134.872 x -b 148.043 134.872 m 147.074 134.712 x -b 147.074 134.712 m 146.117 134.489 x -b 146.117 134.489 m 145.179 134.204 x -b 145.179 134.204 m 144.26 133.858 x -b 144.26 133.858 m 143.365 133.453 x -b 143.365 133.453 m 142.501 132.991 x -b 142.501 132.991 m 141.666 132.472 x -b 141.666 132.472 m 140.868 131.9 x -b 140.868 131.9 m 140.11 131.278 x -b 140.11 131.278 m 139.393 130.607 x +b 150 135 m 149.042 134.841 x +b 149.042 134.841 m 148.067 134.745 x +b 148.067 134.745 m 147.074 134.712 x +b 147.074 134.712 m 146.176 134.373 x +b 146.176 134.373 m 145.238 134.088 x +b 145.238 134.088 m 144.26 133.858 x +b 144.26 133.858 m 143.435 133.357 x +b 143.435 133.357 m 142.57 132.895 x +b 142.57 132.895 m 141.666 132.472 x +b 141.666 132.472 m 140.936 131.828 x +b 140.936 131.828 m 140.178 131.206 x +b 140.178 131.206 m 139.393 130.607 x b 43.934 256.066 m 37.2195 248.896 x b 37.2195 248.896 m 31.0014 241.32 x b 31.0014 241.32 m 25.2796 233.336 x @@ -542,18 +542,18 @@ b 5.1131 188.83 m 2.88221 179.264 x b 2.88221 179.264 m 1.28253 169.572 x b 1.28253 169.572 m 0.321791 159.817 x b 0.321791 159.817 m 0 150 x -b 139.393 130.607 m 138.722 129.89 x -b 138.722 129.89 m 138.1 129.132 x -b 138.1 129.132 m 137.528 128.334 x -b 137.528 128.334 m 137.009 127.499 x -b 137.009 127.499 m 136.547 126.635 x -b 136.547 126.635 m 136.142 125.74 x -b 136.142 125.74 m 135.796 124.821 x -b 135.796 124.821 m 135.511 123.883 x -b 135.511 123.883 m 135.288 122.926 x -b 135.288 122.926 m 135.128 121.957 x -b 135.128 121.957 m 135.032 120.982 x -b 135.032 120.982 m 135 120 x +b 139.393 130.607 m 138.783 129.841 x +b 138.783 129.841 m 138.161 129.083 x +b 138.161 129.083 m 137.528 128.334 x +b 137.528 128.334 m 137.064 127.47 x +b 137.064 127.47 m 136.602 126.606 x +b 136.602 126.606 m 136.142 125.74 x +b 136.142 125.74 m 135.845 124.808 x +b 135.845 124.808 m 135.56 123.87 x +b 135.56 123.87 m 135.288 122.926 x +b 135.288 122.926 m 135.172 121.957 x +b 135.172 121.957 m 135.076 120.981 x +b 135.076 120.981 m 135 120 x b 0 150 m 0.321791 140.183 x b 0.321791 140.183 m 1.28253 130.428 x b 1.28253 130.428 m 2.88221 120.736 x @@ -566,18 +566,18 @@ b 20.0928 75.0062 m 25.2796 66.6645 x b 25.2796 66.6645 m 31.0014 58.6803 x b 31.0014 58.6803 m 37.2195 51.1035 x b 37.2195 51.1035 m 43.934 43.934 x -b 135 120 m 135.032 119.018 x -b 135.032 119.018 m 135.128 118.043 x -b 135.128 118.043 m 135.288 117.074 x -b 135.288 117.074 m 135.511 116.117 x -b 135.511 116.117 m 135.796 115.179 x -b 135.796 115.179 m 136.142 114.26 x -b 136.142 114.26 m 136.547 113.365 x -b 136.547 113.365 m 137.009 112.501 x -b 137.009 112.501 m 137.528 111.666 x -b 137.528 111.666 m 138.1 110.868 x -b 138.1 110.868 m 138.722 110.11 x -b 138.722 110.11 m 139.393 109.393 x +b 135 120 m 135.071 119.028 x +b 135.071 119.028 m 135.167 118.053 x +b 135.167 118.053 m 135.288 117.074 x +b 135.288 117.074 m 135.545 116.136 x +b 135.545 116.136 m 135.83 115.198 x +b 135.83 115.198 m 136.142 114.26 x +b 136.142 114.26 m 136.576 113.391 x +b 136.576 113.391 m 137.038 112.526 x +b 137.038 112.526 m 137.528 111.666 x +b 137.528 111.666 m 138.124 110.9 x +b 138.124 110.9 m 138.746 110.142 x +b 138.746 110.142 m 139.393 109.393 x b 43.934 43.934 m 51.1035 37.2195 x b 51.1035 37.2195 m 58.6803 31.0014 x b 58.6803 31.0014 m 66.6645 25.2796 x @@ -590,18 +590,18 @@ b 111.17 5.1131 m 120.736 2.88221 x b 120.736 2.88221 m 130.428 1.28253 x b 130.428 1.28253 m 140.183 0.321791 x b 140.183 0.321791 m 150 0 x -b 139.393 109.393 m 140.11 108.722 x -b 140.11 108.722 m 140.868 108.1 x -b 140.868 108.1 m 141.666 107.528 x -b 141.666 107.528 m 142.501 107.009 x -b 142.501 107.009 m 143.365 106.547 x -b 143.365 106.547 m 144.26 106.142 x -b 144.26 106.142 m 145.179 105.796 x -b 145.179 105.796 m 146.117 105.511 x -b 146.117 105.511 m 147.074 105.288 x -b 147.074 105.288 m 148.043 105.128 x -b 148.043 105.128 m 149.018 105.032 x -b 149.018 105.032 m 150 105 x +b 139.393 109.393 m 140.13 108.758 x +b 140.13 108.758 m 140.887 108.136 x +b 140.887 108.136 m 141.666 107.528 x +b 141.666 107.528 m 142.514 107.049 x +b 142.514 107.049 m 143.379 106.587 x +b 143.379 106.587 m 144.26 106.142 x +b 144.26 106.142 m 145.187 105.837 x +b 145.187 105.837 m 146.125 105.553 x +b 146.125 105.553 m 147.074 105.288 x +b 147.074 105.288 m 148.046 105.171 x +b 148.046 105.171 m 149.021 105.075 x +b 149.021 105.075 m 150 105 x b 150 0 m 159.817 0.321791 x b 159.817 0.321791 m 169.572 1.28253 x b 169.572 1.28253 m 179.264 2.88221 x @@ -614,18 +614,18 @@ b 224.994 20.0928 m 233.336 25.2796 x b 233.336 25.2796 m 241.32 31.0014 x b 241.32 31.0014 m 248.896 37.2195 x b 248.896 37.2195 m 256.066 43.934 x -b 150 105 m 150.982 105.032 x -b 150.982 105.032 m 151.957 105.128 x -b 151.957 105.128 m 152.926 105.288 x -b 152.926 105.288 m 153.883 105.511 x -b 153.883 105.511 m 154.821 105.796 x -b 154.821 105.796 m 155.74 106.142 x -b 155.74 106.142 m 156.635 106.547 x -b 156.635 106.547 m 157.499 107.009 x -b 157.499 107.009 m 158.334 107.528 x -b 158.334 107.528 m 159.132 108.1 x -b 159.132 108.1 m 159.89 108.722 x -b 159.89 108.722 m 160.607 109.393 x +b 150 105 m 150.979 105.075 x +b 150.979 105.075 m 151.954 105.171 x +b 151.954 105.171 m 152.926 105.288 x +b 152.926 105.288 m 153.875 105.553 x +b 153.875 105.553 m 154.813 105.837 x +b 154.813 105.837 m 155.74 106.142 x +b 155.74 106.142 m 156.621 106.587 x +b 156.621 106.587 m 157.486 107.049 x +b 157.486 107.049 m 158.334 107.528 x +b 158.334 107.528 m 159.113 108.136 x +b 159.113 108.136 m 159.87 108.758 x +b 159.87 108.758 m 160.607 109.393 x b 256.066 43.934 m 262.78 51.1035 x b 262.78 51.1035 m 268.999 58.6803 x b 268.999 58.6803 m 274.72 66.6645 x @@ -638,16 +638,16 @@ b 294.887 111.17 m 297.118 120.736 x b 297.118 120.736 m 298.717 130.428 x b 298.717 130.428 m 299.678 140.183 x b 299.678 140.183 m 300 150 x -b 160.607 109.393 m 161.278 110.11 x -b 161.278 110.11 m 161.9 110.868 x -b 161.9 110.868 m 162.472 111.666 x -b 162.472 111.666 m 162.991 112.501 x -b 162.991 112.501 m 163.453 113.365 x -b 163.453 113.365 m 163.858 114.26 x -b 163.858 114.26 m 164.204 115.179 x -b 164.204 115.179 m 164.489 116.117 x -b 164.489 116.117 m 164.712 117.074 x -b 164.712 117.074 m 164.872 118.043 x -b 164.872 118.043 m 164.968 119.018 x -b 164.968 119.018 m 165 120 x +b 160.607 109.393 m 161.254 110.142 x +b 161.254 110.142 m 161.876 110.9 x +b 161.876 110.9 m 162.472 111.666 x +b 162.472 111.666 m 162.962 112.526 x +b 162.962 112.526 m 163.424 113.391 x +b 163.424 113.391 m 163.858 114.26 x +b 163.858 114.26 m 164.17 115.198 x +b 164.17 115.198 m 164.455 116.136 x +b 164.455 116.136 m 164.712 117.074 x +b 164.712 117.074 m 164.833 118.053 x +b 164.833 118.053 m 164.929 119.028 x +b 164.929 119.028 m 165 120 x showpage