@@ -29,17 +29,19 @@ private:
2929 {
3030 // load input mesh
3131 ReplicatedMesh in_mesh (* TestCommWorld );
32- ExodusII_IO exii (in_mesh );
32+ ExodusII_IO in_exii (in_mesh );
3333 if (in_mesh .processor_id () == 0 )
34- exii .read (in_file );
34+ in_exii .read (in_file );
35+ in_mesh .allow_renumbering (false);
3536 MeshCommunication ().broadcast (in_mesh );
3637 in_mesh .prepare_for_use ();
3738
3839 // load gold file
3940 ReplicatedMesh gold_mesh (* TestCommWorld );
40- ExodusII_IO exii (gold_mesh );
41+ ExodusII_IO gold_exii (gold_mesh );
4142 if (gold_mesh .processor_id () == 0 )
42- exii .read (gold_file );
43+ gold_exii .read (gold_file );
44+ gold_mesh .allow_renumbering (false);
4345 MeshCommunication ().broadcast (gold_mesh );
4446 gold_mesh .prepare_for_use ();
4547
@@ -48,23 +50,40 @@ private:
4850 lms .smooth (100 );
4951
5052 // compare node positions
51- for (const auto & node : in_mesh .node_ref_range ())
52- {
53- Point a = node ;
54- Point b = gold_mesh .node_ref (node -> id ());
55- CPPUNIT_ASSERT ((a - b ).norm () < 1e-6 );
56- }
53+ for (const auto & node : in_mesh .node_ptr_range ())
54+ {
55+ Point a = * node ;
56+ Point b = gold_mesh .node_ref (node -> id ());
57+ std ::cout << a << " == " << b << " (" << (a - b ).norm () << ")\n" ;
58+ CPPUNIT_ASSERT ((a - b ).norm () < 1e-6 );
59+ }
5760 }
5861
5962public :
6063 void setUp () {}
6164
6265 void tearDown () {}
6366
64- void laplace_smooth_2d_fixed_boundary_nodes () { LOG_UNIT_TEST ; test ("meshes/smooth2d_in.e" , "smooth2d_nomove.e" , false); }
65- void laplace_smooth_2d_movable_boundary_nodes () { LOG_UNIT_TEST ; test ("meshes/smooth2d_in.e" , "smooth2d_move.e" , true); }
66- void laplace_smooth_3d_fixed_boundary_nodes () { LOG_UNIT_TEST ; test ("meshes/smooth3d_in.e" , "smooth3d_nomove.e" , false); }
67- void laplace_smooth_3d_movable_boundary_nodes () { LOG_UNIT_TEST ; test ("meshes/smooth3d_in.e" , "smooth3d_move.e" , true); }
67+ void laplace_smooth_2d_fixed_boundary_nodes ()
68+ {
69+ LOG_UNIT_TEST ;
70+ test ("meshes/smooth2d_in.e" , "meshes/smooth2d_nomove.e" , false);
71+ }
72+ void laplace_smooth_2d_movable_boundary_nodes ()
73+ {
74+ LOG_UNIT_TEST ;
75+ test ("meshes/smooth2d_in.e" , "meshes/smooth2d_move.e" , true);
76+ }
77+ void laplace_smooth_3d_fixed_boundary_nodes ()
78+ {
79+ LOG_UNIT_TEST ;
80+ test ("meshes/smooth3d_in.e" , "meshes/smooth3d_nomove.e" , false);
81+ }
82+ void laplace_smooth_3d_movable_boundary_nodes ()
83+ {
84+ LOG_UNIT_TEST ;
85+ test ("meshes/smooth3d_in.e" , "meshes/smooth3d_move.e" , true);
86+ }
6887};
6988
70- CPPUNIT_TEST_SUITE_REGISTRATION (CopyNodesAndElementsTest );
89+ CPPUNIT_TEST_SUITE_REGISTRATION (SmoothMeshTest );
0 commit comments