Beispiel #1
0
 def test_str_empty_attributes(self):
     mesh = self.mesh
     # Empty attributes dict on the node coord in the mesh.
     node_coord = mesh.coord(include_nodes=True, axis="x")
     node_coord.attributes.clear()
     # Make a new meshcoord, based on the modified mesh.
     meshcoord = sample_meshcoord(mesh=self.mesh)
     result = str(meshcoord)
     re_expected = self._expected_elements_regexp(attributes=False)
     self.assertRegex(result, re_expected)
Beispiel #2
0
 def test_str_no_long_name(self):
     mesh = self.mesh
     # Remove the long_name of the node coord in the mesh.
     node_coord = mesh.coord(include_nodes=True, axis="x")
     node_coord.long_name = None
     # Make a new meshcoord, based on the modified mesh.
     meshcoord = sample_meshcoord(mesh=self.mesh)
     result = str(meshcoord)
     re_expected = self._expected_elements_regexp(long_name=False)
     self.assertRegex(result, re_expected)
Beispiel #3
0
 def test_str_no_standard_name(self):
     mesh = self.mesh
     # Remove the standard_name of the node coord in the mesh.
     node_coord = mesh.coord(include_nodes=True, axis="x")
     node_coord.standard_name = None
     node_coord.axis = "x"  # This is required : but it's a kludge !!
     # Make a new meshcoord, based on the modified mesh.
     meshcoord = sample_meshcoord(mesh=self.mesh)
     result = str(meshcoord)
     re_expected = self._expected_elements_regexp(standard_name=False)
     self.assertRegex(result, re_expected)
Beispiel #4
0
 def fetch_sources_from_mesh():
     return (
         mesh.coord(include_nodes=True, axis="x"),
         mesh.coord(include_faces=True, axis="x"),
         mesh.face_node_connectivity,
     )