@@ -98,7 +98,7 @@ TransformGenerator::generate()
9898 break ;
9999 }
100100
101- // MeshTools:: operations have already marked us as unprepared
101+ // The operations we've called should have already appropriately marked us as unprepared
102102 return dynamic_pointer_cast < MeshBase > (mesh );
103103}
104104
@@ -112,8 +112,12 @@ TransformGenerator::rotateExtrinsic(MeshBase & mesh,
112112 const auto R = RealTensorValue ::extrinsic_rotation_matrix (
113113 alpha , beta , gamma ); // this line is the only difference from rotate...
114114
115- if (beta )
116- mesh .set_spatial_dimension (3 );
115+ // Let's not try to guess what this did to our spatial dimension (it
116+ // could have reduced it, depending on the input mesh!), let's just
117+ // mark that it needs to be recomputed.
118+ // if (beta)
119+ // mesh.set_spatial_dimension(3);
120+ mesh .unset_has_cached_elem_data ();
117121
118122 for (auto & node : mesh .node_ptr_range ())
119123 {
@@ -132,7 +136,10 @@ TransformGenerator::rotateWithMatrix(MeshBase & mesh,
132136 const GenericRealTensorValue < false> & rotation_matrix )
133137{
134138#if LIBMESH_DIM == 3
135- mesh .set_spatial_dimension (3 );
139+ // Let's not try to guess what this did to our spatial dimension,
140+ // let's just mark that it needs to be recomputed.
141+ // mesh.set_spatial_dimension(3);
142+ mesh .unset_has_cached_elem_data ();
136143
137144 for (auto & node : mesh .node_ptr_range ())
138145 {
0 commit comments