@@ -77,18 +77,37 @@ TransformGenerator::generate()
7777 else
7878 vector_value = getParam < RealVectorValue > ("vector_value" );
7979
80+ // Any non-identity transform is going to invalidate any existing
81+ // point locator
82+ mesh -> clear_point_locator ();
83+
8084 switch (_transform )
8185 {
8286 case 1 :
8387 case 2 :
8488 case 3 :
8589 MeshTools ::Modification ::translate (* mesh , vector_value (0 ), vector_value (1 ), vector_value (2 ));
90+ // libMesh translate() fails to properly mark the spatial
91+ // dimension as unprepared in cases where we've displaced a 1D
92+ // mesh in y or z or a 2D mesh in z. Until that's fixed we work
93+ // around the bug.
94+ mesh -> unset_has_cached_elem_data ();
8695 break ;
8796 case 4 :
8897 MeshTools ::Modification ::rotate (* mesh , vector_value (0 ), vector_value (1 ), vector_value (2 ));
98+ // libMesh rotate() tries to set the spatial dimension properly,
99+ // and probably does for all realistic use cases, but there are
100+ // at least hypothetical cases where it could be wrong.
101+ //
102+ // Until that's fixed we work around it.
103+ mesh -> unset_has_cached_elem_data ();
89104 break ;
90105 case 5 :
91106 MeshTools ::Modification ::scale (* mesh , vector_value (0 ), vector_value (1 ), vector_value (2 ));
107+ // Is anybody using scale() to just squash a manifold's spatial
108+ // dimension down to its mesh dimension? Let's be safe until
109+ // libMesh is handling that case.
110+ mesh -> unset_has_cached_elem_data ();
92111 break ;
93112 case 6 :
94113 TransformGenerator ::rotateWithMatrix (* mesh , rotation_matrix );
0 commit comments