From 67af518d192331dc16c9552273f75b9a6fc1d8d9 Mon Sep 17 00:00:00 2001 From: David Rudlstorfer Date: Mon, 19 May 2025 11:16:02 +0200 Subject: [PATCH 1/6] Utilize FourCIPP in MeshPy - The 4C input file now directly inherits from the FourCIPP input file - The dict and list comparison now also utilizes utilities from FourCIPP --- .github/actions/run_tests/action.yml | 2 +- .github/workflows/testing.yml | 8 +- src/meshpy/core/element_volume.py | 32 +- src/meshpy/core/geometry_set.py | 23 +- src/meshpy/core/node.py | 48 +-- src/meshpy/core/nurbs_patch.py | 112 +++--- src/meshpy/four_c/beam_potential.py | 12 +- src/meshpy/four_c/element_beam.py | 144 ++++---- src/meshpy/four_c/element_volume.py | 25 +- src/meshpy/four_c/header_functions.py | 142 +++----- src/meshpy/four_c/input_file.py | 254 ++++++------- src/meshpy/four_c/material.py | 26 +- src/meshpy/four_c/model_importer.py | 115 ++---- .../four_c/solid_shell_thickness_direction.py | 98 +++-- src/meshpy/four_c/yaml_dumper.py | 72 ---- src/meshpy/utils/environment.py | 12 - tests/conftest.py | 206 +++-------- tests/create_cubit_input.py | 2 +- .../4C_input_solid_cuboid.4C.yaml | 2 +- .../test_cosserat_curve_mesh.4C.yaml | 80 ++--- .../test_cosserat_curve_mesh_warp.4C.yaml | 80 ++--- ...warp_transform_boundary_conditions.4C.yaml | 80 ++--- ...ate_cubit_input_solid_shell_blocks.4C.yaml | 24 +- ...reate_cubit_input_solid_shell_dome.4C.yaml | 84 ++--- ...d_shell_direction_detection_blocks.4C.yaml | 24 +- ..._detection_dome_constant_direction.4C.yaml | 84 ++--- ...direction_detection_dome_thickness.4C.yaml | 84 ++--- .../test_meshpy_kirchhoff_beam.4C.yaml | 32 +- ...sh_transformations_with_solid_full.4C.yaml | 2 +- ...sh_transformations_with_solid_yaml.4C.yaml | 2 +- .../test_meshpy_nurbs_import.4C.yaml | 7 +- ...est_meshpy_nurbs_import_solid_mesh.4C.yaml | 7 +- ..._surface_to_surface_contact_import.4C.yaml | 4 +- ..._surface_contact_import_solid_mesh.4C.yaml | 4 +- ...y_vtk_writer_solid_elements_import.4C.yaml | 334 +++++++++--------- .../reference-files/test_nurbs_brick.4C.yaml | 48 +-- ...est_nurbs_cylindrical_shell_sector.4C.yaml | 30 +- .../test_nurbs_string_types.4C.yaml | 12 +- tests/test_four_c_simulation.py | 56 ++- tests/test_header_functions.py | 9 - tests/test_meshpy.py | 108 +++--- tests/test_nurbs.py | 89 +++-- tests/test_performance.py | 2 +- tutorial/tutorial.py | 2 +- 44 files changed, 1163 insertions(+), 1460 deletions(-) delete mode 100644 src/meshpy/four_c/yaml_dumper.py diff --git a/.github/actions/run_tests/action.yml b/.github/actions/run_tests/action.yml index b2f78b57..592faea8 100644 --- a/.github/actions/run_tests/action.yml +++ b/.github/actions/run_tests/action.yml @@ -4,7 +4,7 @@ inputs: install-command: description: Command to install MeshPy with pip required: false - default: ".[dev]" + default: ".[dev,fourc]" source-command: description: Command to source the virtual environment required: false diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d7fcd5d9..ba59b409 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -37,7 +37,7 @@ jobs: # non-editable installation and turn of coverage, because the coverage # only works in editable mode. install-command: >- - ${{ matrix.python-version == '3.10' && '-e .[dev]' || '.[dev]'}} + ${{ matrix.python-version == '3.10' && '-e .[dev,fourc]' || '.[dev,fourc]'}} # The single space in the empty string is required, otherwise GitHub # evaluates the if clause wrong. additional-pytest-flags: >- @@ -65,7 +65,7 @@ jobs: - name: Run the test suite uses: ./.github/actions/run_tests with: - install-command: ".[cubitpy,dev]" + install-command: ".[cubitpy,dev,fourc]" source-command: "source python-workflow-venv/bin/activate" additional-pytest-flags: "--CubitPy --no-cov" - name: Upload test results on failure @@ -96,7 +96,7 @@ jobs: uses: ./.github/actions/run_tests with: source-command: "source python-workflow-venv/bin/activate" - install-command: "-e .[dev]" + install-command: "-e .[dev,fourc]" additional-pytest-flags: "--4C --ArborX --cov-fail-under=92" - name: Upload test results on failure if: failure() @@ -124,7 +124,7 @@ jobs: - name: Run the test suite uses: ./.github/actions/run_tests with: - install-command: ".[cubitpy,dev]" + install-command: ".[cubitpy,dev,fourc]" source-command: "source python-workflow-venv/bin/activate" additional-pytest-flags: "--performance-tests --exclude-standard-tests -s --no-cov" - name: Upload test results on failure diff --git a/src/meshpy/core/element_volume.py b/src/meshpy/core/element_volume.py index 06564d10..68a27bb1 100644 --- a/src/meshpy/core/element_volume.py +++ b/src/meshpy/core/element_volume.py @@ -36,21 +36,21 @@ class VolumeElement(_Element): vtk_cell_type = None vtk_topology: list = [] - def __init__(self, nodes=None, string_pre_nodes="", string_post_nodes="", **kwargs): + def __init__(self, nodes=None, data={}, **kwargs): super().__init__(nodes=nodes, material=None, **kwargs) - self.string_pre_nodes = string_pre_nodes - self.string_post_nodes = string_post_nodes + self.data = data def dump_to_list(self): - """Return a list with the items representing this object (usually a - single item).""" + """Return a dict with the items representing this object.""" - # String with the node ids. - nodes_string = " ".join(str(node.i_global) for node in self.nodes) - - return [ - f"{self.i_global} {self.string_pre_nodes} {nodes_string} {self.string_post_nodes}" - ] + return { + "id": self.i_global, + "cell": { + "type": element_type_to_four_c_string[type(self)], + "connectivity": [node.i_global for node in self.nodes], + }, + "data": self.data, + } def get_vtk(self, vtk_writer_beam, vtk_writer_solid, **kwargs): """Add the representation of this element to the VTK writer as a @@ -170,3 +170,13 @@ class VolumeHEX27(VolumeElement): 25, 26, ] + + +element_type_to_four_c_string = { + VolumeHEX8: "HEX8", + VolumeHEX20: "HEX20", + VolumeHEX27: "HEX27", + VolumeTET4: "TET4", + VolumeTET10: "TET10", + VolumeWEDGE6: "WEDGE6", +} diff --git a/src/meshpy/core/geometry_set.py b/src/meshpy/core/geometry_set.py index 68f0e18d..37af3f02 100644 --- a/src/meshpy/core/geometry_set.py +++ b/src/meshpy/core/geometry_set.py @@ -22,14 +22,11 @@ """This module implements a basic class to manage geometry in the input file.""" -import numpy as _np - from meshpy.core.base_mesh_item import BaseMeshItem as _BaseMeshItem from meshpy.core.conf import mpy as _mpy from meshpy.core.container import ContainerBase as _ContainerBase from meshpy.core.element_beam import Beam as _Beam from meshpy.core.node import Node as _Node -from meshpy.utils.environment import fourcipp_is_available as _fourcipp_is_available class GeometrySetBase(_BaseMeshItem): @@ -123,21 +120,19 @@ def get_all_nodes(self): def dump_to_list(self): """Return a list with the legacy strings of this geometry set.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to dump the geometry set to a suitable data format" - ) + # Sort nodes based on their global index + nodes = sorted(self.get_all_nodes(), key=lambda n: n.i_global) - # Sort the nodes based on the node GID. - nodes = self.get_all_nodes() - if len(nodes) == 0: + if not nodes: raise ValueError("Writing empty geometry sets is not supported") - nodes_id = [node.i_global for node in nodes] - sort_indices = _np.argsort(nodes_id) - nodes = [nodes[i] for i in sort_indices] return [ - f"NODE {node.i_global} {self.geometry_set_names[self.geometry_type]} {self.i_global}" + { + "type": "NODE", + "node_id": node.i_global, + "d_type": self.geometry_set_names[self.geometry_type], + "d_id": self.i_global, + } for node in nodes ] diff --git a/src/meshpy/core/node.py b/src/meshpy/core/node.py index ced79515..91af99af 100644 --- a/src/meshpy/core/node.py +++ b/src/meshpy/core/node.py @@ -24,8 +24,6 @@ import numpy as _np from meshpy.core.base_mesh_item import BaseMeshItem as _BaseMeshItem -from meshpy.core.conf import mpy as _mpy -from meshpy.utils.environment import fourcipp_is_available as _fourcipp_is_available class Node(_BaseMeshItem): @@ -53,22 +51,6 @@ def __init__(self, coordinates, *, is_middle_node=False, **kwargs): # If this node is replaced, store a link to the remaining node. self.master_node = None - @classmethod - def from_legacy_string(cls, input_line): - """Create the Node object from a legacy string.""" - - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to create the node from the dict " - "representing the node, not the legacy string." - ) - - # Split up the input line. - line_split = input_line.split() - - # Convert the node coordinates into a Node object. - return cls([float(line_split[i]) for i in range(3, 6)]) - def get_master_node(self): """Return the master node of this node. @@ -114,13 +96,14 @@ def rotate(self, *args, **kwargs): def dump_to_list(self): """Return a list with the legacy string representing this node.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to create a dict, not the legacy string." - ) - - coordinate_string = " ".join([str(item) for item in self.coordinates]) - return [f"NODE {self.i_global} COORD {coordinate_string}"] + # TODO here a numpy data type is converted to a standard Python + # data type. Once FourCIPP can handle non standard data types, + # this should be removed. + return { + "id": self.i_global, + "COORD": self.coordinates.tolist(), + "data": {"type": "NODE"}, + } class NodeCosserat(Node): @@ -169,10 +152,11 @@ def dump_to_list(self): """Return a list with the legacy string representing this control point.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to create a dict, not the legacy string." - ) - - coordinate_string = " ".join([str(item) for item in self.coordinates]) - return [f"CP {self.i_global} COORD {coordinate_string} {self.weight}"] + # TODO here a numpy data type is converted to a standard Python + # data type. Once FourCIPP can handle non standard data types, + # this should be removed. + return { + "id": self.i_global, + "COORD": self.coordinates.tolist(), + "data": {"type": "CP", "weight": self.weight}, + } diff --git a/src/meshpy/core/nurbs_patch.py b/src/meshpy/core/nurbs_patch.py index a15e01a2..b48e0d7b 100644 --- a/src/meshpy/core/nurbs_patch.py +++ b/src/meshpy/core/nurbs_patch.py @@ -28,7 +28,6 @@ from meshpy.core.material import ( MaterialSolidBase as _MaterialSolidBase, ) -from meshpy.utils.environment import fourcipp_is_available as _fourcipp_is_available class NURBSPatch(_Element): @@ -72,26 +71,15 @@ def get_nurbs_dimension(self): ) return n_knots - def dump_element_specific_section(self, yaml_dict): + def dump_element_specific_section(self, input_file): """Set the knot vectors of the NURBS patch in the input file.""" - if _fourcipp_is_available(): - raise ValueError("Port this functionality to not use the legacy format.") - - knotvectors_section = "STRUCTURE KNOTVECTORS" - - if knotvectors_section not in yaml_dict.keys(): - yaml_dict[knotvectors_section] = [] - - section = yaml_dict[knotvectors_section] - section.append(f"NURBS_DIMENSION {self.get_nurbs_dimension()}") - section.append("BEGIN NURBSPATCH") - section.append(f"ID {self.n_nurbs_patch}") + patch_data = { + "knot_vectors": [], + } for dir_manifold in range(len(self.knot_vectors)): num_knotvectors = len(self.knot_vectors[dir_manifold]) - section.append(f"NUMKNOTS {num_knotvectors}") - section.append(f"DEGREE {self.polynomial_orders[dir_manifold]}") # Check the type of knot vector, in case that the multiplicity of the first and last # knot vectors is not p + 1, then it is a closed (periodic) knot vector, otherwise it @@ -115,12 +103,24 @@ def dump_element_specific_section(self, yaml_dict): knotvector_type = "Periodic" break - section.append(f"TYPE {knotvector_type}") + patch_data["knot_vectors"].append( + { + "DEGREE": self.polynomial_orders[dir_manifold], + "TYPE": knotvector_type, + "knots": [ + float(knot_vector_val) + for knot_vector_val in self.knot_vectors[dir_manifold] + ], + } + ) - for knot_vector_val in self.knot_vectors[dir_manifold]: - section.append(knot_vector_val) + if "STRUCTURE KNOTVECTORS" not in input_file: + input_file.add({"STRUCTURE KNOTVECTORS": []}) + input_file["STRUCTURE KNOTVECTORS"] = [] - section.append("END NURBSPATCH") + patches = input_file["STRUCTURE KNOTVECTORS"] + patch_data["ID"] = len(patches) + 1 + patches.append(patch_data) def get_number_elements(self): """Get the number of elements in this patch by checking the amount of @@ -167,9 +167,6 @@ def dump_to_list(self): """Return a list with all the element definitions contained in this patch.""" - if _fourcipp_is_available(): - raise ValueError("Port this functionality to not use the legacy format.") - # Check the material self._check_material() @@ -211,20 +208,32 @@ def get_ids_ctrlpts_surface(knot_span_u, knot_span_v): ): element_cps_ids = get_ids_ctrlpts_surface(knot_span_u, knot_span_v) - string_cps = " ".join( - [str(self.nodes[i].i_global) for i in element_cps_ids] + connectivity = [int(self.nodes[i].i_global) for i in element_cps_ids] + + num_cp_in_element = (self.polynomial_orders[0] + 1) * ( + self.polynomial_orders[1] + 1 ) + # TODO here a numpy data type is converted to a standard Python + # data type. Once FourCIPP can handle non standard data types, + # this should be removed. patch_elements.append( - "{} {} NURBS{} {} MAT {} {}".format( - self.i_global + j, - self.element_string, - (self.polynomial_orders[0] + 1) - * (self.polynomial_orders[1] + 1), - string_cps, - self.material.i_global, - self.element_description, - ) + { + "id": int(self.i_global + j), + "cell": { + "type": f"NURBS{num_cp_in_element}", + "connectivity": connectivity, + }, + "data": { + "type": "WALLNURBS", + "MAT": self.material.i_global, + **( + self.element_description + if self.element_description + else {} + ), + }, + } ) j += 1 @@ -243,9 +252,6 @@ def dump_to_list(self): """Return a list with all the element definitions contained in this patch.""" - if _fourcipp_is_available(): - raise ValueError("Port this functionality to not use the legacy format.") - # Check the material self._check_material() @@ -302,9 +308,9 @@ def get_ids_ctrlpts_volume(knot_span_u, knot_span_v, knot_span_w): knot_span_u, knot_span_v, knot_span_w ) - string_cps = " ".join( - [str(self.nodes[i].i_global) for i in element_cps_ids] - ) + connectivity = [ + int(self.nodes[i].i_global) for i in element_cps_ids + ] num_cp_in_element = ( (self.polynomial_orders[0] + 1) @@ -312,14 +318,26 @@ def get_ids_ctrlpts_volume(knot_span_u, knot_span_v, knot_span_w): * (self.polynomial_orders[2] + 1) ) + # TODO here a numpy data type is converted to a standard Python + # data type. Once FourCIPP can handle non standard data types, + # this should be removed. patch_elements.append( - "{} SOLID NURBS{} {} MAT {} {}".format( - self.i_global + increment_ele, - num_cp_in_element, - string_cps, - self.material.i_global, - self.element_description, - ) + { + "id": int(self.i_global + increment_ele), + "cell": { + "type": f"NURBS{num_cp_in_element}", + "connectivity": connectivity, + }, + "data": { + "type": "SOLID", + "MAT": self.material.i_global, + **( + self.element_description + if self.element_description + else {} + ), + }, + } ) increment_ele += 1 diff --git a/src/meshpy/four_c/beam_potential.py b/src/meshpy/four_c/beam_potential.py index 0968db5e..777ea249 100644 --- a/src/meshpy/four_c/beam_potential.py +++ b/src/meshpy/four_c/beam_potential.py @@ -106,7 +106,6 @@ def add_header( potential_reduction_length=-1, automatic_differentiation=False, choice_master_slave=None, - option_overwrite=False, ): """Set the basic header options for beam potential interactions. @@ -138,9 +137,6 @@ def add_header( choice_master_slave: string Rule how to assign the role of master and slave to beam elements (if applicable) (lower_eleGID_is_slave, higher_eleGID_is_slave). - option_overwrite: bool - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. """ settings = { @@ -166,7 +162,6 @@ def add_header( self.input_file.add( {"BEAM POTENTIAL": settings}, - option_overwrite=option_overwrite, ) def add_runtime_output( @@ -179,7 +174,6 @@ def add_runtime_output( moments=True, uids=True, per_ele_pair=True, - option_overwrite=False, ): """Set the basic runtime output options for beam potential interactions. @@ -200,9 +194,6 @@ def add_runtime_output( If the unique ids should be written. per_ele_pair: bool If the forces/moments should be written per element pair. - option_overwrite: bool - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. """ self.input_file.add( @@ -216,8 +207,7 @@ def add_runtime_output( "WRITE_UIDS": uids, "WRITE_FORCE_MOMENT_PER_ELEMENTPAIR": per_ele_pair, } - }, - option_overwrite=option_overwrite, + } ) def add_potential_charge_condition(self, *, geometry_set=None): diff --git a/src/meshpy/four_c/element_beam.py b/src/meshpy/four_c/element_beam.py index eb7d7acd..1936b461 100644 --- a/src/meshpy/four_c/element_beam.py +++ b/src/meshpy/four_c/element_beam.py @@ -33,7 +33,6 @@ from meshpy.four_c.material import ( MaterialReissnerElastoplastic as _MaterialReissnerElastoplastic, ) -from meshpy.utils.environment import fourcipp_is_available as _fourcipp_is_available class Beam3rHerm2Line3(_Beam): @@ -49,25 +48,28 @@ class Beam3rHerm2Line3(_Beam): def dump_to_list(self): """Return a list with the (single) item representing this element.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to not use the legacy string any more" - ) - - string_nodes = " ".join(str(self.nodes[i].i_global) for i in [0, 2, 1]) - string_triads = " ".join( - str(item) - for i in [0, 2, 1] - for item in self.nodes[i].rotation.get_rotation_vector() - ) - # Check the material. self._check_material() - return [ - f"{self.i_global} BEAM3R HERM2LINE3 {string_nodes} MAT {self.material.i_global} " - f"TRIADS {string_triads}" - ] + # TODO here a numpy data type is converted to a standard Python + # data type. Once FourCIPP can handle non standard data types, + # this should be removed. + return { + "id": self.i_global, + "cell": { + "type": "HERM2LINE3", + "connectivity": [int(self.nodes[i].i_global) for i in [0, 2, 1]], + }, + "data": { + "type": "BEAM3R", + "MAT": self.material.i_global, + "TRIADS": [ + float(item) + for i in [0, 2, 1] + for item in self.nodes[i].rotation.get_rotation_vector() + ], + }, + } class Beam3rLine2Line2(_Beam): @@ -84,25 +86,28 @@ class Beam3rLine2Line2(_Beam): def dump_to_list(self): """Return a list with the (single) item representing this element.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to not use the legacy string any more" - ) - - string_nodes = " ".join(str(self.nodes[i].i_global) for i in [0, 1]) - string_triads = " ".join( - str(item) - for i in [0, 1] - for item in self.nodes[i].rotation.get_rotation_vector() - ) - # Check the material. self._check_material() - return [ - f"{self.i_global} BEAM3R LINE2 {string_nodes} MAT {self.material.i_global} " - f"TRIADS {string_triads}" - ] + # TODO here a numpy data type is converted to a standard Python + # data type. Once FourCIPP can handle non standard data types, + # this should be removed. + return { + "id": self.i_global, + "cell": { + "type": "LINE2", + "connectivity": [int(self.nodes[i].i_global) for i in [0, 1]], + }, + "data": { + "type": "BEAM3R", + "MAT": self.material.i_global, + "TRIADS": [ + float(item) + for i in [0, 1] + for item in self.nodes[i].rotation.get_rotation_vector() + ], + }, + } class Beam3kClass(_Beam): @@ -133,32 +138,31 @@ def __init__(self, *, weak=True, rotvec=True, is_fad=True, **kwargs): def dump_to_list(self): """Return a list with the (single) item representing this element.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to not use the legacy string any more" - ) - - string_nodes = " ".join(str(self.nodes[i].i_global) for i in [0, 2, 1]) - string_triads = " ".join( - str(item) - for i in [0, 2, 1] - for item in self.nodes[i].rotation.get_rotation_vector() - ) - # Check the material. self._check_material() - string_dat = ("{} BEAM3K LINE3 {} WK {} ROTVEC {} MAT {} TRIADS {}{}").format( - self.i_global, - string_nodes, - "1" if self.weak else "0", - "1" if self.rotvec else "0", - self.material.i_global, - string_triads, - " FAD" if self.is_fad else "", - ) - - return [string_dat] + # TODO here a numpy data type is converted to a standard Python + # data type. Once FourCIPP can handle non standard data types, + # this should be removed. + return { + "id": self.i_global, + "cell": { + "type": "LINE3", + "connectivity": [int(self.nodes[i].i_global) for i in [0, 2, 1]], + }, + "data": { + "type": "BEAM3K", + "WK": 1 if self.weak else 0, + "ROTVEC": 1 if self.rotvec else 0, + "MAT": self.material.i_global, + "TRIADS": [ + float(item) + for i in [0, 2, 1] + for item in self.nodes[i].rotation.get_rotation_vector() + ], + **({"USE_FAD": True} if self.is_fad else {}), + }, + } def Beam3k(**kwargs_class): @@ -189,10 +193,8 @@ class Beam3eb(_Beam): def dump_to_list(self): """Return a list with the (single) item representing this element.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to not use the legacy string any more" - ) + # Check the material. + self._check_material() # The two rotations must be the same and the x1 vector must point from # the start point to the end point. @@ -208,11 +210,17 @@ def dump_to_list(self): "The rotations do not match the direction of the Euler Bernoulli beam!" ) - string_nodes = " ".join(str(self.nodes[i].i_global) for i in [0, 1]) - - # Check the material. - self._check_material() - - return [ - f"{self.i_global} BEAM3EB LINE2 {string_nodes} MAT {self.material.i_global}" - ] + # TODO here a numpy data type is converted to a standard Python + # data type. Once FourCIPP can handle non standard data types, + # this should be removed. + return { + "id": self.i_global, + "cell": { + "type": "LINE2", + "connectivity": [int(self.nodes[i].i_global) for i in [0, 1]], + }, + "data": { + "type": "BEAM3EB", + "MAT": self.material.i_global, + }, + } diff --git a/src/meshpy/four_c/element_volume.py b/src/meshpy/four_c/element_volume.py index ce080559..8b4786a4 100644 --- a/src/meshpy/four_c/element_volume.py +++ b/src/meshpy/four_c/element_volume.py @@ -31,11 +31,20 @@ def __init__(self, **kwargs): """Initialize solid sphere object.""" _VolumeElement.__init__(self, **kwargs) - # Set radius of sphere from input file. - arg_name = self.string_post_nodes.split()[0] - if not arg_name == "RADIUS": - raise ValueError( - "The first argument after the node should be " - f'RADIUS, but it is "{arg_name}"!' - ) - self.radius = float(self.string_post_nodes.split()[1]) + self.radius = float(self.data["RADIUS"]) + + # TODO this method should be removed! + # This method should use the super method of _VolumeElement + # but currently this results in a circular import if we use the + # element to 4C mappings. Think about a better solution. + def dump_to_list(self): + """Return a dict with the items representing this object.""" + + return { + "id": self.i_global, + "cell": { + "type": "POINT1", + "connectivity": [node.i_global for node in self.nodes], + }, + "data": self.data, + } diff --git a/src/meshpy/four_c/header_functions.py b/src/meshpy/four_c/header_functions.py index 8484c233..744d0145 100644 --- a/src/meshpy/four_c/header_functions.py +++ b/src/meshpy/four_c/header_functions.py @@ -52,7 +52,6 @@ def set_runtime_output( element_mat_id=True, output_energy=False, output_strains=True, - option_overwrite=False, ): """Set the basic runtime output options. @@ -87,9 +86,6 @@ def set_runtime_output( If the energy output from 4C should be activated. output_strains: bool If the strains in the Gauss points should be output. - option_overwrite: bool - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. """ # Set the basic runtime output options. @@ -100,8 +96,7 @@ def set_runtime_output( "INTERVAL_STEPS": 1, "EVERY_ITERATION": every_iteration, } - }, - option_overwrite=option_overwrite, + } ) # Set the structure runtime output options @@ -115,8 +110,7 @@ def set_runtime_output( "ELEMENT_GID": element_gid, "ELEMENT_MAT_ID": element_mat_id, } - }, - option_overwrite=option_overwrite, + } ) # Set the beam runtime output options @@ -130,8 +124,7 @@ def set_runtime_output( "STRAINS_GAUSSPOINT": output_strains, "ELEMENT_GID": element_gid, } - }, - option_overwrite=option_overwrite, + } ) if btsvmt_output: @@ -147,8 +140,7 @@ def set_runtime_output( "SEGMENTATION": True, "INTEGRATION_POINTS": True, } - }, - option_overwrite=option_overwrite, + } ) if btss_output: @@ -165,19 +157,11 @@ def set_runtime_output( "INTEGRATION_POINTS": True, "AVERAGED_NORMALS": True, } - }, - option_overwrite=option_overwrite, + } ) if output_energy: - input_file.add( - { - "STRUCTURAL DYNAMIC": { - "RESEVERYERGY": 1, - } - }, - option_overwrite=option_overwrite, - ) + input_file["STRUCTURAL DYNAMIC"]["RESEVERYERGY"] = 1 def set_beam_to_solid_meshtying( @@ -194,7 +178,6 @@ def set_beam_to_solid_meshtying( penalty_parameter=None, coupling_type=None, binning_parameters: dict = {}, - option_overwrite=False, ): """Set the beam to solid meshtying options. @@ -225,22 +208,24 @@ def set_beam_to_solid_meshtying( Type of coupling for beam-to-surface coupling. binning_parameters: Keyword parameters for the binning section - option_overwrite: bool - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. """ # Set the beam contact options. - input_file.add( - {"BEAM INTERACTION": {"REPARTITIONSTRATEGY": "everydt"}}, option_overwrite=True - ) - input_file.add( - {"BEAM CONTACT": {"MODELEVALUATOR": "Standard"}}, option_overwrite=True - ) + # check if these keys are already set, otherwise set them + if ( + "BEAM INTERACTION" not in input_file + or input_file["BEAM INTERACTION"].get("REPARTITIONSTRATEGY") != "everydt" + ): + input_file.add({"BEAM INTERACTION": {"REPARTITIONSTRATEGY": "everydt"}}) + + if ( + "BEAM CONTACT" not in input_file + or input_file["BEAM CONTACT"].get("MODELEVALUATOR") != "Standard" + ): + input_file.add({"BEAM CONTACT": {"MODELEVALUATOR": "Standard"}}) set_binning_strategy_section( input_file, - option_overwrite=option_overwrite, **binning_parameters, ) @@ -285,9 +270,7 @@ def set_beam_to_solid_meshtying( if interaction_type == _mpy.beam_to_solid.volume_meshtying: bts_parameters["COUPLE_RESTART_STATE"] = couple_restart - input_file.add( - {bts_section_name: bts_parameters}, option_overwrite=option_overwrite - ) + input_file.add({bts_section_name: bts_parameters}) def set_header_static( @@ -305,7 +288,6 @@ def set_header_static( write_strain="no", prestress="None", prestress_time=0, - option_overwrite=False, ): """Set the default parameters for a static structure analysis. @@ -340,9 +322,6 @@ def set_header_static( Type of prestressing strategy to be used presetrss_time: int Prestress Time - option_overwrite: bool - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. """ # Set the parameters for a static analysis. @@ -351,8 +330,7 @@ def set_header_static( "PROBLEM TYPE": { "PROBLEMTYPE": "Structure", } - }, - option_overwrite=option_overwrite, + } ) input_file.add( @@ -364,8 +342,7 @@ def set_header_static( "STRUCT_STRAIN": write_strain, "VERBOSITY": "Standard", } - }, - option_overwrite=option_overwrite, + } ) # Set the time step parameters @@ -398,8 +375,7 @@ def set_header_static( "MAXTIME": total_time, "LOADLIN": load_lin, } - }, - option_overwrite=option_overwrite, + } ) input_file.add( @@ -408,8 +384,7 @@ def set_header_static( "NAME": "Structure_Solver", "SOLVER": "Superlu", } - }, - option_overwrite=option_overwrite, + } ) # Set the contents of the NOX xml file. @@ -469,8 +444,7 @@ def set_header_static( "Linear Solver Details": True, "Test Details": True, } - }, - option_overwrite=option_overwrite, + } ) # Set the xml content in the input file. @@ -481,8 +455,6 @@ def set_binning_strategy_section( input_file: _InputFile, binning_bounding_box: _Union[_List[int], None] = None, binning_cutoff_radius: _Union[float, None] = None, - *, - option_overwrite: bool = False, ): """Set binning strategy in section of the input file. @@ -494,9 +466,6 @@ def set_binning_strategy_section( List with the limits of the bounding box. binning_cutoff_radius: Maximal influence radius of pair elements. - option_overwrite: - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. """ if binning_bounding_box is not None and binning_cutoff_radius is not None: @@ -510,8 +479,7 @@ def set_binning_strategy_section( "BIN_SIZE_LOWER_BOUND": binning_cutoff_radius, "DOMAINBOUNDINGBOX": binning_bounding_box_string, } - }, - option_overwrite=option_overwrite, + } ) elif [binning_bounding_box, binning_cutoff_radius].count(None) == 2: return @@ -526,7 +494,6 @@ def set_beam_interaction_section( *, repartition_strategy: str = "everydt", search_strategy: str = "bounding_volume_hierarchy", - option_overwrite: bool = False, ): """Set beam interaction section in input file. @@ -540,9 +507,6 @@ def set_beam_interaction_section( search_strategy: Type of search strategy used for finding coupling pairs. Options: "bruteforce_with_binning", "bounding_volume_hierarchy" - option_overwrite: - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. """ input_file.add( @@ -551,16 +515,12 @@ def set_beam_interaction_section( "REPARTITIONSTRATEGY": repartition_strategy, "SEARCH_STRATEGY": search_strategy, } - }, - option_overwrite=option_overwrite, + } ) def set_beam_contact_runtime_output( - input_file: _InputFile, - *, - every_iteration: bool = False, - option_overwrite: bool = False, + input_file: _InputFile, *, every_iteration: bool = False ): """Output the beam-to-beam contact forces and gaps with runtime output. @@ -568,9 +528,6 @@ def set_beam_contact_runtime_output( Input file that the options will be added to. every_iteration: If output at every Newton iteration should be written. - option_overwrite: - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. """ input_file.add( @@ -582,8 +539,7 @@ def set_beam_contact_runtime_output( "CONTACT_FORCES": True, "GAPS": True, } - }, - option_overwrite=option_overwrite, + } ) @@ -603,7 +559,6 @@ def set_beam_contact_section( penalty_regularization_c0: float = 0, binning_parameters: dict = {}, beam_interaction_parameters: dict = {}, - option_overwrite: bool = False, ): """Set default beam contact section, for more and updated details see respective input file within 4C. Parameters for set_binning_strategy and @@ -628,9 +583,6 @@ def set_beam_contact_section( Maximal angle deviation allowed for contact search segmentation num_integration: Number of integration intervals per element - option_overwrite: bool - If existing options should be overwritten. If this is false and an - option is already defined, and error will be thrown. penalty_law: Penalty Law Options: "LinPen", "QuadPen", "LinNegQuadPen", "LinPosQuadPen", "LinPosCubPen", "LinPosDoubleQuadPen", "LinPosExpPen" penalty_regularization_g0: @@ -658,8 +610,7 @@ def set_beam_contact_section( "BEAM INTERACTION/BEAM TO BEAM CONTACT": { "STRATEGY": interaction_strategy, } - }, - option_overwrite=option_overwrite, + } ) input_file.add( @@ -682,19 +633,14 @@ def set_beam_contact_section( "BEAMS_PENREGPARAM_C0": penalty_regularization_c0, "BEAMS_MAXDELTADISSCALEFAC": -1.0, } - }, - option_overwrite=option_overwrite, + } ) # beam contact needs a binning strategy - set_binning_strategy_section( - input_file, option_overwrite=option_overwrite, **binning_parameters - ) + set_binning_strategy_section(input_file, **binning_parameters) # beam contact needs interaction strategy - set_beam_interaction_section( - input_file, option_overwrite=option_overwrite, **beam_interaction_parameters - ) + set_beam_interaction_section(input_file, **beam_interaction_parameters) def add_result_description( @@ -712,20 +658,20 @@ def add_result_description( node_ids: List with the IDs of the nodes to check tol: Tolerance """ + result_descriptions = [] + for i_node, node in enumerate(node_ids): for i_dir, direction in enumerate(["x", "y", "z"]): - input_file.add( + result_descriptions.append( { - "RESULT DESCRIPTION": [ - { - "STRUCTURE": { - "DIS": "structure", - "NODE": node, - "QUANTITY": f"disp{direction}", - "VALUE": displacements[i_node][i_dir], - "TOLERANCE": tol, - }, - } - ] + "STRUCTURE": { + "DIS": "structure", + "NODE": node, + "QUANTITY": f"disp{direction}", + "VALUE": displacements[i_node][i_dir], + "TOLERANCE": tol, + }, } ) + + input_file.add({"RESULT DESCRIPTION": result_descriptions}) diff --git a/src/meshpy/four_c/input_file.py b/src/meshpy/four_c/input_file.py index 87b3aa23..48cebc82 100644 --- a/src/meshpy/four_c/input_file.py +++ b/src/meshpy/four_c/input_file.py @@ -30,19 +30,20 @@ from typing import Dict as _Dict from typing import List as _List -import yaml as _yaml +from fourcipp.fourc_input import FourCInput as _FourCInput from meshpy.core.boundary_condition import BoundaryCondition as _BoundaryCondition from meshpy.core.conf import mpy as _mpy from meshpy.core.coupling import Coupling as _Coupling +from meshpy.core.function import Function as _Function +from meshpy.core.geometry_set import GeometrySet as _GeometrySet +from meshpy.core.geometry_set import GeometrySetNodes as _GeometrySetNodes from meshpy.core.mesh import Mesh as _Mesh from meshpy.core.nurbs_patch import NURBSPatch as _NURBSPatch from meshpy.four_c.input_file_mappings import ( INPUT_FILE_MAPPINGS as _INPUT_FILE_MAPPINGS, ) -from meshpy.four_c.yaml_dumper import MeshPyDumper as _MeshPyDumper from meshpy.utils.environment import cubitpy_is_available as _cubitpy_is_available -from meshpy.utils.environment import fourcipp_is_available as _fourcipp_is_available from meshpy.utils.environment import get_git_data as _get_git_data if _cubitpy_is_available(): @@ -61,13 +62,10 @@ def get_geometry_set_indices_from_section( dict with the keys should be returned. """ - if _fourcipp_is_available(): - raise ValueError("Port this functionality to not use the legacy string.") - geometry_set_dict: _Dict[int, _List[int]] = {} - for line in section_list: - id_geometry_set = int(line.split()[-1]) - index_node = int(line.split()[1]) - 1 + for entry in section_list: + id_geometry_set = entry["d_id"] + index_node = entry["node_id"] - 1 if id_geometry_set not in geometry_set_dict: geometry_set_dict[id_geometry_set] = [] if append_node_ids: @@ -110,19 +108,17 @@ def _dump_coupling(coupling): return {"E": coupling.geometry_set.i_global, **data} -class InputFile: +class InputFile(_FourCInput): """An item that represents a complete 4C input file.""" - def __init__(self): + def __init__(self, sections=None): """Initialize the input file.""" - # Everything that is not a full MeshPy object is stored here, e.g., parameters - # and imported nodes/elements/materials/... - self.sections: _Dict[str, _Any] = dict() - # Contents of NOX xml file. self.nox_xml_contents = "" + super().__init__(sections=sections) + def add(self, object_to_add, **kwargs): """Add a mesh or a dictionary to the input file. @@ -131,67 +127,27 @@ def add(self, object_to_add, **kwargs): **kwargs: Additional arguments to be passed to the add method. """ - # TODO rework this once fourcipp is available to call - # the super method directly - if isinstance(object_to_add, _Mesh): self.add_mesh_to_input_file(mesh=object_to_add, **kwargs) - elif isinstance(object_to_add, dict): - self.add_section(object_to_add, **kwargs) - - else: - raise TypeError( - f"Cannot add object of type {type(object_to_add)} to the input file." - " Only MeshPy meshes and dictionaries are supported." - ) - - def add_section(self, section, *, option_overwrite=False): - """Add a section to the object. - - If the section name already exists, it is added to that section. - """ - - for section_name, section_value in section.items(): - if section_name in self.sections: - section_data = self.sections[section_name] - if isinstance(section_data, list): - section_data.extend(section_value) - else: - for option_key, option_value in section_value.items(): - if option_key in self.sections[section_name]: - if ( - not self.sections[section_name][option_key] - == option_value - ): - if not option_overwrite: - raise KeyError( - f"Key {option_key} with the value {self.sections[section_name][option_key]} already set. You tried to set it to {option_value}" - ) - self.sections[section_name][option_key] = option_value - else: - self.sections[section_name] = section_value - - def delete_section(self, section_name): - """Delete a section from the dictionary self.sections.""" - if section_name in self.sections.keys(): - del self.sections[section_name] else: - raise Warning(f"Section {section_name} does not exist!") + super().combine_sections(object_to_add, **kwargs) - def write_input_file( + def dump( self, - file_path: _Path, + input_file_path: _Path, *, nox_xml_file: bool | str = False, add_header_default: bool = True, add_header_information: bool = True, add_footer_application_script: bool = True, + sort_sections=False, + validate=False, ): """Write the input file to disk. Args: - file_path: + input_file_path: Path to the input file that should be created. nox_xml_file: If this is a string, the xml file will be created with this @@ -207,13 +163,17 @@ def write_input_file( add_footer_application_script: Append the application script which creates the input files as a comment at the end of the input file. + sort_sections: + Sort sections alphabetically with FourCIPP. + validate: + Validate if the created input file is compatible with 4C with FourCIPP. """ if self.nox_xml_contents: if nox_xml_file is False: xml_file_name = "NOT_DEFINED" elif nox_xml_file is True: - xml_file_name = _os.path.splitext(file_path)[0] + ".xml" + xml_file_name = _os.path.splitext(input_file_path)[0] + ".xml" elif isinstance(nox_xml_file, str): xml_file_name = nox_xml_file else: @@ -223,7 +183,7 @@ def write_input_file( # Write the xml file to the disc. with open( - _os.path.join(_os.path.dirname(file_path), xml_file_name), "w" + _os.path.join(_os.path.dirname(input_file_path), xml_file_name), "w" ) as xml_file: xml_file.write(self.nox_xml_contents) @@ -231,27 +191,27 @@ def write_input_file( if add_header_information: self.sections["TITLE"] = self._get_header() - with open(file_path, "w") as input_file: - # write MeshPy header - if add_header_default: - input_file.writelines( - "# " + line + "\n" for line in _mpy.input_file_meshpy_header - ) + super().dump( + input_file_path=input_file_path, + sort_sections=sort_sections, + validate=validate, + ) - _yaml.dump( - self.sections, - input_file, - Dumper=_MeshPyDumper, - width=float("inf"), - ) + if add_header_default or add_footer_application_script: + with open(input_file_path, "r") as input_file: + lines = input_file.readlines() - # Add the application script to the input file. - if add_footer_application_script: - application_path = _Path(_sys.argv[0]).resolve() - application_script_lines = self._get_application_script( - application_path - ) - input_file.writelines(application_script_lines) + if add_header_default: + lines = [ + "# " + line + "\n" for line in _mpy.input_file_meshpy_header + ] + lines + + if add_footer_application_script: + application_path = _Path(_sys.argv[0]).resolve() + lines += self._get_application_script(application_path) + + with open(input_file_path, "w") as input_file: + input_file.writelines(lines) def add_mesh_to_input_file(self, mesh: _Mesh): """Add a mesh to the input file. @@ -282,40 +242,20 @@ def _get_global_start_geometry_set(dictionary): start_indices_geometry_set[geometry_type] = max_geometry_set_id return start_indices_geometry_set - def _get_global_start_node(dictionary): + def _get_global_start_node(): """Get the index for the first "real" MeshPy node.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to not use the legacy format any more" - "TODO: Check if we really want this - should we just assume that the" - "imported nodes are in order and without any 'missing' nodes?" - ) - - section_name = "NODE COORDS" - if section_name in dictionary: - return len(dictionary[section_name]) - else: - return 0 + return len(self.sections.get("NODE COORDS", [])) - def _get_global_start_element(dictionary): + def _get_global_start_element(): """Get the index for the first "real" MeshPy element.""" - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to not use the legacy format any more" - "TODO: Check if we really want this - should we just assume that the" - "imported elements are in order and without any 'missing' elements?" - ) - - start_index = 0 - section_names = ["FLUID ELEMENTS", "STRUCTURE ELEMENTS"] - for section_name in section_names: - if section_name in dictionary: - start_index += len(dictionary[section_name]) - return start_index + return sum( + len(self.sections.get(section, [])) + for section in ["FLUID ELEMENTS", "STRUCTURE ELEMENTS"] + ) - def _get_global_start_material(dictionary): + def _get_global_start_material(): """Get the index for the first "real" MeshPy material. We have to account for materials imported from yaml files @@ -325,16 +265,16 @@ def _get_global_start_material(dictionary): # Get the maximum material index in materials imported from a yaml file max_material_id = 0 section_name = "MATERIALS" - if section_name in dictionary: - for material in dictionary[section_name]: + if section_name in self.sections: + for material in self.sections[section_name]: max_material_id = max(max_material_id, material["MAT"]) return max_material_id - def _get_global_start_function(dictionary): + def _get_global_start_function(): """Get the index for the first "real" MeshPy function.""" max_function_id = 0 - for section_name in dictionary.keys(): + for section_name in self.sections.keys(): if section_name.startswith("FUNCT"): max_function_id = max( max_function_id, int(section_name.split("FUNCT")[-1]) @@ -376,7 +316,7 @@ def _set_i_global_elements(element_list, *, start_index=0): else: i += 1 - def _dump_mesh_items(yaml_dict, section_name, data_list): + def _dump_mesh_items(section_name, data_list): """Output a section name and apply either the default dump or the specialized the dump_to_list for each list item.""" @@ -384,23 +324,62 @@ def _dump_mesh_items(yaml_dict, section_name, data_list): if len(data_list) == 0: return - # Check if section already exists - if section_name not in yaml_dict.keys(): - yaml_dict[section_name] = [] + list = [] - item_dict_list = yaml_dict[section_name] for item in data_list: - if hasattr(item, "dump_to_list"): - item_dict_list.extend(item.dump_to_list()) + if ( + isinstance(item, _GeometrySet) + or isinstance(item, _GeometrySetNodes) + or isinstance(item, _NURBSPatch) + ): + list.extend(item.dump_to_list()) + elif hasattr(item, "dump_to_list"): + list.append(item.dump_to_list()) elif isinstance(item, _BoundaryCondition): - item_dict_list.append( - {"E": item.geometry_set.i_global, **item.data} + # Here we need to convert the function objects to their + # global index. + + def convert_function_field(key, value): + """Convert function objects in boundary condititions to + their global index. + + TODO improve this approach + """ + + if key != "FUNCT": + return value + + if isinstance(value, _List): + return [ + v.i_global if isinstance(v, _Function) else v + for v in value + ] + if isinstance(value, _Function): + return value.i_global + else: + return value + + list.append( + { + "E": item.geometry_set.i_global, + **{ + key: convert_function_field(key, value) + for key, value in item.data.items() + }, + } ) + elif isinstance(item, _Coupling): - item_dict_list.append(_dump_coupling(item)) + list.append(_dump_coupling(item)) else: raise TypeError(f"Could not dump {item}") + if section_name in self.sections: + # If the section already exists, append the new data to it. + self.sections[section_name].extend(list) + else: + self.add({section_name: list}) + # Add sets from couplings and boundary conditions to a temp container. mesh.unlink_nodes() start_indices_geometry_set = _get_global_start_geometry_set(self.sections) @@ -409,21 +388,24 @@ def _dump_mesh_items(yaml_dict, section_name, data_list): ) # Assign global indices to all entries. - start_index_nodes = _get_global_start_node(self.sections) + start_index_nodes = _get_global_start_node() _set_i_global(mesh.nodes, start_index=start_index_nodes) - start_index_elements = _get_global_start_element(self.sections) + + start_index_elements = _get_global_start_element() _set_i_global_elements(mesh.elements, start_index=start_index_elements) - start_index_materials = _get_global_start_material(self.sections) + + start_index_materials = _get_global_start_material() _set_i_global(mesh.materials, start_index=start_index_materials) - start_index_functions = _get_global_start_function(self.sections) + + start_index_functions = _get_global_start_function() _set_i_global(mesh.functions, start_index=start_index_functions) # Add material data to the input file. - _dump_mesh_items(self.sections, "MATERIALS", mesh.materials) + _dump_mesh_items("MATERIALS", mesh.materials) # Add the functions. for function in mesh.functions: - self.sections[f"FUNCT{function.i_global}"] = function.data + self.add({f"FUNCT{function.i_global}": function.data}) # If there are couplings in the mesh, set the link between the nodes # and elements, so the couplings can decide which DOFs they couple, @@ -450,22 +432,20 @@ def get_number_of_coupling_conditions(key): if isinstance(bc_key, str) else _INPUT_FILE_MAPPINGS["boundary_conditions"][(bc_key, geom_key)] ) - _dump_mesh_items(self.sections, section_name, bc_list) + _dump_mesh_items(section_name, bc_list) # Add additional element sections, e.g., for NURBS knot vectors. for element in mesh.elements: - element.dump_element_specific_section(self.sections) + element.dump_element_specific_section(self) # Add the geometry sets. for geom_key, item in mesh_sets.items(): if len(item) > 0: - _dump_mesh_items( - self.sections, _INPUT_FILE_MAPPINGS["geometry_sets"][geom_key], item - ) + _dump_mesh_items(_INPUT_FILE_MAPPINGS["geometry_sets"][geom_key], item) # Add the nodes and elements. - _dump_mesh_items(self.sections, "NODE COORDS", mesh.nodes) - _dump_mesh_items(self.sections, "STRUCTURE ELEMENTS", mesh.elements) + _dump_mesh_items("NODE COORDS", mesh.nodes) + _dump_mesh_items("STRUCTURE ELEMENTS", mesh.elements) # TODO: reset all links and counters set in this method. def _get_header(self) -> dict: diff --git a/src/meshpy/four_c/material.py b/src/meshpy/four_c/material.py index 62ff898e..d283dfed 100644 --- a/src/meshpy/four_c/material.py +++ b/src/meshpy/four_c/material.py @@ -72,7 +72,7 @@ def dump_to_list(self): } if self.interaction_radius is not None: data["INTERACTIONRADIUS"] = self.interaction_radius - return [{"MAT": self.i_global, self.material_string: data}] + return {"MAT": self.i_global, self.material_string: data} class MaterialReissnerElastoplastic(MaterialReissner): @@ -102,7 +102,7 @@ def __init__( def dump_to_list(self): """Return a list with the (single) item representing this material.""" super_list = super().dump_to_list() - mat_dict = super_list[0][self.material_string] + mat_dict = super_list[self.material_string] mat_dict["YIELDM"] = self.yield_moment mat_dict["ISOHARDM"] = self.isohardening_modulus_moment mat_dict["TORSIONPLAST"] = self.torsion_plasticity @@ -153,7 +153,7 @@ def dump_to_list(self): } if self.interaction_radius is not None: data["INTERACTIONRADIUS"] = self.interaction_radius - return [{"MAT": self.i_global, self.material_string: data}] + return {"MAT": self.i_global, self.material_string: data} class MaterialEulerBernoulli(_MaterialBeamBase): @@ -184,7 +184,7 @@ def dump_to_list(self): "CROSSAREA": area, "MOMIN": mom2, } - return [{"MAT": self.i_global, self.material_string: data}] + return {"MAT": self.i_global, self.material_string: data} class MaterialSolid(_MaterialSolidBase): @@ -204,16 +204,14 @@ def __init__( def dump_to_list(self): """Return a list with the (single) item representing this material.""" - return [ - { - "MAT": self.i_global, - self.material_string: { - "YOUNG": self.youngs_modulus, - "NUE": self.nu, - "DENS": self.density, - }, - } - ] + return { + "MAT": self.i_global, + self.material_string: { + "YOUNG": self.youngs_modulus, + "NUE": self.nu, + "DENS": self.density, + }, + } class MaterialStVenantKirchhoff(MaterialSolid): diff --git a/src/meshpy/four_c/model_importer.py b/src/meshpy/four_c/model_importer.py index b3fd6c15..10e9cff9 100644 --- a/src/meshpy/four_c/model_importer.py +++ b/src/meshpy/four_c/model_importer.py @@ -27,8 +27,6 @@ from typing import Tuple as _Tuple from typing import Union as _Union -import yaml as _yaml - import meshpy.core.conf as _conf from meshpy.core.boundary_condition import BoundaryCondition as _BoundaryCondition from meshpy.core.boundary_condition import ( @@ -53,7 +51,6 @@ from meshpy.four_c.input_file_mappings import ( INPUT_FILE_MAPPINGS as _INPUT_FILE_MAPPINGS, ) -from meshpy.utils.environment import fourcipp_is_available as _fourcipp_is_available def import_four_c_model( @@ -74,12 +71,7 @@ def import_four_c_model( converted to a MeshPy mesh are removed from the input file object. """ - if _fourcipp_is_available(): - raise ValueError("Use fourcipp to parse the yaml file.") - - with open(input_file_path) as stream: - input_file = _InputFile() - input_file.sections = _yaml.safe_load(stream) + input_file = _InputFile().from_4C_yaml(input_file_path=input_file_path) if convert_input_to_mesh: return _extract_mesh_sections(input_file) @@ -87,60 +79,34 @@ def import_four_c_model( return input_file, _Mesh() -def _element_from_dict(nodes: _List[_Node], input_line: str): - """TODO: Update this doc string once we don't use the legacy string any more. - Create an element from a legacy string.""" +def _element_from_dict(nodes: _List[_Node], element: dict): + """Create a solid element from a dictionary from a 4C input file. - if _fourcipp_is_available(): - raise ValueError( - "Port this functionality to create the element from the dict " - "representing the element, not the legacy string." - "TODO: pass the nodes array here, so we can directly link to the nodes" - "TODO: The whole string_pre_nodes and string_post_nodes is obsolete once" - " we move on from legacy string" - ) - - # Split up input line and get pre node string. - line_split = input_line.split() - string_pre_nodes = " ".join(line_split[1:3]) - - # Get a list of the element nodes. - # This is only here because we need the pre and post strings - can be - # removed when moving on from the legacy format. - dummy = [] - for i, item in enumerate(line_split[3:]): - if item.isdigit(): - dummy.append(int(item) - 1) - else: - break - else: - raise ValueError( - f'The input line:\n"{input_line}"\ncould not be converted to a solid element!' - ) - - # Get the post node string - string_post_nodes = " ".join(line_split[3 + i :]) + Args: + nodes: A list of nodes that are part of the element. + element: A dictionary with the element data. + Returns: + A solid element object. + """ # Depending on the number of nodes chose which solid element to return. - n_nodes = len(nodes) + # TODO reuse element_type_to_four_c_string from meshpy.core.element_volume element_type = { - 8: _VolumeHEX8, - 20: _VolumeHEX20, - 27: _VolumeHEX27, - 4: _VolumeTET4, - 10: _VolumeTET10, - 6: _VolumeWEDGE6, - 1: _SolidRigidSphere, + "HEX8": _VolumeHEX8, + "HEX20": _VolumeHEX20, + "HEX27": _VolumeHEX27, + "TET4": _VolumeTET4, + "TET10": _VolumeTET10, + "WEDGE6": _VolumeWEDGE6, + "POINT1": _SolidRigidSphere, } - if n_nodes not in element_type: + + if element["cell"]["type"] not in element_type: raise TypeError( - f"Could not find a element type for {string_pre_nodes}, with {n_nodes} nodes" + f"Could not create a MeshPy element for {element['data']['type']} {element['cell']['type']}!" ) - return element_type[n_nodes]( - nodes=nodes, - string_pre_nodes=string_pre_nodes, - string_post_nodes=string_post_nodes, - ) + + return element_type[element["cell"]["type"]](nodes=nodes, data=element["data"]) def _boundary_condition_from_dict( @@ -203,39 +169,26 @@ def _get_section_items(section_name): delete them from the plain data storage to avoid having duplicate entries. """ - if section_name in input_file.sections: - return_list = input_file.sections[section_name] - input_file.sections[section_name] = [] + + if section_name in input_file: + return input_file.pop(section_name) else: - return_list = [] - return return_list + return [] # Go through all sections that have to be converted to full MeshPy objects mesh = _Mesh() # Add nodes - for item in _get_section_items("NODE COORDS"): - mesh.nodes.append(_Node.from_legacy_string(item)) + if "NODE COORDS" in input_file: + mesh.nodes = [_Node(node["COORD"]) for node in input_file.pop("NODE COORDS")] # Add elements - for item in _get_section_items("STRUCTURE ELEMENTS"): - if _fourcipp_is_available(): - raise ValueError("Port this functionality to not use the legacy string.") - - # Get a list containing the element nodes. - element_nodes = [] - for split_item in item.split()[3:]: - if split_item.isdigit(): - node_id = int(split_item) - 1 - element_nodes.append(mesh.nodes[node_id]) - else: - break - else: - raise ValueError( - f'The input line:\n"{item}"\ncould not be converted to a element!' - ) - - mesh.elements.append(_element_from_dict(element_nodes, item)) + if "STRUCTURE ELEMENTS" in input_file: + for element in input_file.pop("STRUCTURE ELEMENTS"): + nodes = [ + mesh.nodes[node_id - 1] for node_id in element["cell"]["connectivity"] + ] + mesh.elements.append(_element_from_dict(nodes=nodes, element=element)) # Add geometry sets geometry_sets_in_sections: dict[str, dict[int, _GeometrySetNodes]] = { diff --git a/src/meshpy/four_c/solid_shell_thickness_direction.py b/src/meshpy/four_c/solid_shell_thickness_direction.py index d2d00723..c7907306 100644 --- a/src/meshpy/four_c/solid_shell_thickness_direction.py +++ b/src/meshpy/four_c/solid_shell_thickness_direction.py @@ -197,56 +197,54 @@ def set_solid_shell_thickness_direction( raise ValueError("Expected a non empty element list") for element in elements: - is_hex8 = isinstance(element, _VolumeHEX8) - if is_hex8: - is_solid_shell = "SOLIDSH8" in element.string_pre_nodes # type: ignore[attr-defined] - - if is_solid_shell: - # Get the element center and the Jacobian at the center - ( - reference_position_center, - jacobian_center, - ) = get_hex8_element_center_and_jacobian_mapping(element) - - # Depending on the chosen method, get the thickness direction - if selection_type == "thickness": - thickness_direction = get_reordering_index_thickness( - jacobian_center, identify_threshold=identify_threshold - ) - elif selection_type == "projection_director": - thickness_direction = get_reordering_index_director_projection( - jacobian_center, director, identify_threshold=identify_threshold - ) - elif selection_type == "projection_director_function": - director = director_function(reference_position_center) - thickness_direction = get_reordering_index_director_projection( - jacobian_center, director, identify_threshold=identify_threshold - ) - else: - raise ValueError( - f'Got unexpected selection_type of value "{selection_type}"' - ) - - n_apply_mapping = 0 - if thickness_direction == 2: - # We already have the orientation we want - continue - elif thickness_direction == 1: - # We need to apply the connectivity mapping once, i.e., the 2nd parameter - # direction has to become the 3rd - n_apply_mapping = 1 - elif thickness_direction == 0: - # We need to apply the connectivity mapping twice, i.e., the 1nd parameter - # direction has to become the 3rd - n_apply_mapping = 2 - - # This permutes the parameter coordinate the following way: - # [xi,eta,zeta]->[zeta,xi,eta] - mapping = [2, 6, 7, 3, 1, 5, 4, 0] - for _ in range(n_apply_mapping): - element.nodes = [ - element.nodes[local_index] for local_index in mapping - ] + if ( + isinstance(element, _VolumeHEX8) + and isinstance(element.data, dict) + and element.data.get("TECH") == "shell_eas_ans" + ): + # Get the element center and the Jacobian at the center + ( + reference_position_center, + jacobian_center, + ) = get_hex8_element_center_and_jacobian_mapping(element) + + # Depending on the chosen method, get the thickness direction + if selection_type == "thickness": + thickness_direction = get_reordering_index_thickness( + jacobian_center, identify_threshold=identify_threshold + ) + elif selection_type == "projection_director": + thickness_direction = get_reordering_index_director_projection( + jacobian_center, director, identify_threshold=identify_threshold + ) + elif selection_type == "projection_director_function": + director = director_function(reference_position_center) + thickness_direction = get_reordering_index_director_projection( + jacobian_center, director, identify_threshold=identify_threshold + ) + else: + raise ValueError( + f'Got unexpected selection_type of value "{selection_type}"' + ) + + n_apply_mapping = 0 + if thickness_direction == 2: + # We already have the orientation we want + continue + elif thickness_direction == 1: + # We need to apply the connectivity mapping once, i.e., the 2nd parameter + # direction has to become the 3rd + n_apply_mapping = 1 + elif thickness_direction == 0: + # We need to apply the connectivity mapping twice, i.e., the 1nd parameter + # direction has to become the 3rd + n_apply_mapping = 2 + + # This permutes the parameter coordinate the following way: + # [xi,eta,zeta]->[zeta,xi,eta] + mapping = [2, 6, 7, 3, 1, 5, 4, 0] + for _ in range(n_apply_mapping): + element.nodes = [element.nodes[local_index] for local_index in mapping] def get_visualization_third_parameter_direction_hex8(mesh): diff --git a/src/meshpy/four_c/yaml_dumper.py b/src/meshpy/four_c/yaml_dumper.py deleted file mode 100644 index f06cc165..00000000 --- a/src/meshpy/four_c/yaml_dumper.py +++ /dev/null @@ -1,72 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2018-2025 MeshPy Authors -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -"""Utility stuff to dump data to a yaml file.""" - -import numpy as _np -import yaml as _yaml - -from meshpy.core.function import Function as _Function - - -class MeshPyDumper(_yaml.SafeDumper): - """Dumper for MeshPy input files.""" - - def ignore_aliases(self, data): - """Don't alias shared objects.""" - return True - - -def function_representer(dumper, data: _Function): - """Define how the Function object should be dumped. - - Since the only time we have the function object in the list to dump - is when it is referred to in a BC, we only have to return the global - index here. - """ - if data.i_global is None: - raise IndexError("The function does not have a global index!") - return dumper.represent_int(data.i_global) - - -MeshPyDumper.add_representer(_Function, function_representer) - - -def numpy_float_representer(dumper, value): - """Converter for numpy float to yaml.""" - return dumper.represent_float(float(value)) - - -def numpy_int_representer(dumper, value): - """Converter for numpy int to yaml.""" - return dumper.represent_int(int(value)) - - -def numpy_bool_representer(dumper, value): - """Converter for numpy bool to yaml.""" - return dumper.represent_bool(bool(value)) - - -MeshPyDumper.add_representer(_np.float32, numpy_float_representer) -MeshPyDumper.add_representer(_np.float64, numpy_float_representer) -MeshPyDumper.add_representer(_np.int32, numpy_int_representer) -MeshPyDumper.add_representer(_np.int64, numpy_int_representer) -MeshPyDumper.add_representer(_np.bool_, numpy_bool_representer) diff --git a/src/meshpy/utils/environment.py b/src/meshpy/utils/environment.py index 079630f1..a4708a25 100644 --- a/src/meshpy/utils/environment.py +++ b/src/meshpy/utils/environment.py @@ -42,18 +42,6 @@ def cubitpy_is_available() -> bool: return True -def fourcipp_is_available() -> bool: - """Check if FourCIPP is installed. - - Returns: - True if FourCIPP is installed, False otherwise - """ - - if _find_spec("fourcipp") is None: - return False - return True - - def is_mybinder(): """Check if the current environment is running on mybinder.""" return "BINDER_LAUNCH_HOST" in _os.environ.keys() diff --git a/tests/conftest.py b/tests/conftest.py index 276ef122..a6556392 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -32,16 +32,14 @@ import numpy as np import pytest import vtk -import yaml from _pytest.config import Config from _pytest.config.argparsing import Parser +from fourcipp.utils.dict_utils import compare_nested_dicts_or_lists from vistools.vtk.compare_grids import compare_grids from meshpy.core.conf import mpy from meshpy.core.mesh import Mesh from meshpy.four_c.input_file import InputFile -from meshpy.four_c.yaml_dumper import MeshPyDumper as _MeshPyDumper -from meshpy.utils.environment import fourcipp_is_available def pytest_addoption(parser: Parser) -> None: @@ -277,8 +275,8 @@ def assert_results_equal(get_string, tmp_path, current_test_name) -> Callable: def _assert_results_equal( reference: Union[Path, str, dict, InputFile, Mesh], result: Union[Path, str, dict, InputFile, Mesh], - rtol: Optional[float] = None, - atol: Optional[float] = None, + rtol: Optional[float] = 1e-05, + atol: Optional[float] = 1e-08, **kwargs, ) -> None: """Comparison between reference and result with relative or absolute @@ -314,10 +312,27 @@ def _assert_results_equal( # Dictionary comparison if isinstance(reference, dict) or isinstance(result, dict): + def sanitize(obj): + """Sanitize the object for comparison. + + Currently the FourCIPP function cannot handle numpy + arrays. TODO add this functionality to FourCIPP and + remove from here. + """ + + if isinstance(obj, np.ndarray): + return obj.tolist() + elif isinstance(obj, dict): + return {k: sanitize(v) for k, v in obj.items()} + elif isinstance(obj, list): + return [sanitize(i) for i in obj] + else: + return obj + def get_dictionary(data) -> dict: """Get the dictionary representation of the data object.""" if isinstance(data, dict): - return data + return sanitize(data) elif isinstance(data, Path): return json.loads(get_string(data)) raise TypeError( @@ -326,7 +341,13 @@ def get_dictionary(data) -> dict: reference_dict = get_dictionary(reference) result_dict = get_dictionary(result) - compare_dicts(reference_dict, result_dict, rtol=rtol, atol=atol) + compare_nested_dicts_or_lists( + reference_dict, + result_dict, + rtol=rtol, + atol=atol, + allow_int_vs_float_comparison=True, + ) return if isinstance(reference, (InputFile, Mesh)) or isinstance( @@ -344,37 +365,40 @@ def get_dictionary(data) -> dict: data = input_file if isinstance(data, InputFile): - if fourcipp_is_available(): - raise ValueError( - "Port this functionality to create the node from the dict " - "representing the node, not the legacy string." - ) - - return yaml.safe_load( - yaml.dump( - data.sections, - Dumper=_MeshPyDumper, - width=float("inf"), - ) - ) + return data.sections + if isinstance(data, dict): return data + elif isinstance(data, Path): - with open(data) as stream: - return yaml.safe_load(stream) + return InputFile().from_4C_yaml(input_file_path=data).sections + raise TypeError( f"The comparison for {type(data)} is not yet implemented." ) reference_dict = get_dictionary(reference) result_dict = get_dictionary(result) - compare_dicts(reference_dict, result_dict, rtol=rtol, atol=atol) + + compare_nested_dicts_or_lists( + reference_dict, + result_dict, + rtol=rtol, + atol=atol, + allow_int_vs_float_comparison=True, + ) return if isinstance(reference, (list, np.ndarray)) and isinstance( result, (list, np.ndarray) ): - compare_lists(reference, result, rtol=rtol, atol=atol) + compare_nested_dicts_or_lists( + reference, + result, + rtol=rtol, + atol=atol, + allow_int_vs_float_comparison=True, + ) return # We didn't raise an error or exit this function yet, so we default to a string @@ -574,140 +598,6 @@ def handle_unequal_strings( child.communicate() -def compare_dicts( - dict_1: dict, - dict_2: dict, - *, - rtol: Optional[float] = None, - atol: Optional[float] = None, -): - """Recursively compare two dictionaries. - - For NumPy arrays, use np.allclose. For other types, use direct equality. - - If the dictionaries are not equal, an assertion error is raised. - - Args: - dict_1: The first dictionary to compare. - dict_2: The second dictionary to compare. - rtol: Relative tolerance for np.allclose. - atol: Absolute tolerance for np.allclose. - """ - - if rtol is None: - rtol = 1e-10 - if atol is None: - atol = 1e-10 - - if not isinstance(dict_1, dict) or not isinstance(dict_2, dict): - raise ValueError("Both arguments must be dictionaries") - - if dict_1.keys() != dict_2.keys(): - raise AssertionError( - "The keys of the dictionary are not equal. " - f"Got {dict_1.keys()} and {dict_2.keys()} {dict_1.keys() - dict_2.keys()} {dict_2.keys() - dict_1.keys()}" - ) - - for key in dict_1: - value_1 = dict_1[key] - value_2 = dict_2[key] - - if isinstance(value_1, np.ndarray) or isinstance(value_2, np.ndarray): - try: - if not np.allclose(value_1, value_2, rtol=rtol, atol=atol): - raise AssertionError( - f'Comparison of numpy arrays for the key "{key}" failed.' - ) - except: - raise AssertionError( - f'Comparison of numpy arrays for the key "{key}" failed.' - ) - elif isinstance(value_1, dict) and isinstance(value_2, dict): - # If both values are dictionaries, compare recursively - compare_dicts(value_1, value_2, rtol=rtol, atol=atol) - elif ( - isinstance(value_1, float) - or isinstance(value_2, float) - or isinstance(value_1, np.generic) - or isinstance(value_2, np.generic) - ): - # If one of the values is a float, we do a float comparison - try: - if not np.isclose(value_1, value_2, rtol=rtol, atol=atol): - raise AssertionError( - f"Comparison of the values {value_1} and {value_2} failed." - ) - except: - raise AssertionError( - f"Comparison of the values {value_1} and {value_2} failed. {type(value_1)} and {type(value_2)}" - ) - - elif isinstance(value_1, list) and isinstance(value_2, list): - # If both values are dictionaries, compare recursively - compare_lists(value_1, value_2, rtol=rtol, atol=atol) - elif not value_1 == value_2: - raise AssertionError( - f'Comparison of values for the key "{key}" failed. {value_1} {value_2} |||| {type(value_1)} {type(value_2)}' - ) - - -def compare_lists( - list_1: list, - list_2: list, - *, - rtol: Optional[float] = None, - atol: Optional[float] = None, -): - """Recursively compare two dictionaries. - - For NumPy arrays, use np.allclose. For other types, use direct equality. - - If the dictionaries are not equal, an assertion error is raised. - - Args: - dict_1: The first dictionary to compare. - dict_2: The second dictionary to compare. - rtol: Relative tolerance for np.allclose. - atol: Absolute tolerance for np.allclose. - """ - - if rtol is None: - rtol = 1e-10 - if atol is None: - atol = 1e-10 - - assert len(list_1) == len(list_2) - - for item_1, item_2 in zip(list_1, list_2): - if isinstance(item_1, np.ndarray) or isinstance(item_2, np.ndarray): - if not np.allclose(item_1, item_2, rtol=rtol, atol=atol): - raise AssertionError("Comparison of numpy arrays for the key failed.") - elif isinstance(item_1, dict) and isinstance(item_2, dict): - # If both values are dictionaries, compare recursively - compare_dicts(item_1, item_2, rtol=rtol, atol=atol) - elif ( - isinstance(item_1, float) - or isinstance(item_2, float) - or isinstance(item_1, np.generic) - or isinstance(item_2, np.generic) - ): - # If one of the values is a float, we do a float comparison - if not np.isclose(item_1, item_2, rtol=rtol, atol=atol): - raise AssertionError( - f"Comparison of the values {item_1} and {item_2} failed." - ) - elif isinstance(item_1, list) and isinstance(item_2, list): - # If both values are dictionaries, compare recursively - compare_lists(item_1, item_2, rtol=rtol, atol=atol) - elif isinstance(item_1, str) and isinstance(item_2, str): - # If both values are dictionaries, compare recursively - compare_strings(item_1, item_2, rtol=rtol, atol=atol) - elif not item_1 == item_2: - raise AssertionError( - f"Comparison of values for the key failed. {item_1} {item_2}\n\n{list_1} {list_2}" - ) - - @pytest.fixture(scope="function") def get_bc_data() -> Callable: """Return a function to create a dummy definition for a boundary condition diff --git a/tests/create_cubit_input.py b/tests/create_cubit_input.py index 0ca5eabe..8a4fb91d 100644 --- a/tests/create_cubit_input.py +++ b/tests/create_cubit_input.py @@ -285,7 +285,7 @@ def rotate_list(original_list, n): brick.translate([3 * 4, 0, 0]) mesh.add(brick) - mesh.write_input_file(file_path_blocks, header=False) + mesh.dump(file_path_blocks, header=False) # Create the dome input cubit = CubitPy() diff --git a/tests/reference-files/4C_input_solid_cuboid.4C.yaml b/tests/reference-files/4C_input_solid_cuboid.4C.yaml index 751f403f..0fb4a4e7 100644 --- a/tests/reference-files/4C_input_solid_cuboid.4C.yaml +++ b/tests/reference-files/4C_input_solid_cuboid.4C.yaml @@ -14,4 +14,4 @@ NODE COORDS: - NODE 7 COORD 0.5 1 -1.5 - NODE 8 COORD 0.5 1 1.5 STRUCTURE ELEMENTS: - - 1 SOLIDH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans diff --git a/tests/reference-files/test_cosserat_curve_mesh.4C.yaml b/tests/reference-files/test_cosserat_curve_mesh.4C.yaml index 49b12af9..2c5efeed 100644 --- a/tests/reference-files/test_cosserat_curve_mesh.4C.yaml +++ b/tests/reference-files/test_cosserat_curve_mesh.4C.yaml @@ -89,43 +89,43 @@ NODE COORDS: - NODE 87 COORD 0 1.8 0 - NODE 88 COORD 0 2 0 STRUCTURE ELEMENTS: - - 1 SOLIDH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none - - 2 SOLIDH8 HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear EAS none - - 3 SOLIDH8 HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear EAS none - - 4 SOLIDH8 HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear EAS none - - 5 SOLIDH8 HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear EAS none - - 6 SOLIDH8 HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear EAS none - - 7 SOLIDH8 HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear EAS none - - 8 SOLIDH8 HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear EAS none - - 9 SOLIDH8 HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear EAS none - - 10 SOLIDH8 HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear EAS none - - 11 SOLIDH8 HEX8 4 3 45 46 8 7 47 48 MAT 1 KINEM nonlinear EAS none - - 12 SOLIDH8 HEX8 3 10 49 45 7 12 50 47 MAT 1 KINEM nonlinear EAS none - - 13 SOLIDH8 HEX8 10 14 51 49 12 16 52 50 MAT 1 KINEM nonlinear EAS none - - 14 SOLIDH8 HEX8 14 18 53 51 16 20 54 52 MAT 1 KINEM nonlinear EAS none - - 15 SOLIDH8 HEX8 18 22 55 53 20 24 56 54 MAT 1 KINEM nonlinear EAS none - - 16 SOLIDH8 HEX8 22 26 57 55 24 28 58 56 MAT 1 KINEM nonlinear EAS none - - 17 SOLIDH8 HEX8 26 30 59 57 28 32 60 58 MAT 1 KINEM nonlinear EAS none - - 18 SOLIDH8 HEX8 30 34 61 59 32 36 62 60 MAT 1 KINEM nonlinear EAS none - - 19 SOLIDH8 HEX8 34 38 63 61 36 40 64 62 MAT 1 KINEM nonlinear EAS none - - 20 SOLIDH8 HEX8 38 42 65 63 40 44 66 64 MAT 1 KINEM nonlinear EAS none - - 21 SOLIDH8 HEX8 46 45 67 68 48 47 69 70 MAT 1 KINEM nonlinear EAS none - - 22 SOLIDH8 HEX8 45 49 71 67 47 50 72 69 MAT 1 KINEM nonlinear EAS none - - 23 SOLIDH8 HEX8 49 51 73 71 50 52 74 72 MAT 1 KINEM nonlinear EAS none - - 24 SOLIDH8 HEX8 51 53 75 73 52 54 76 74 MAT 1 KINEM nonlinear EAS none - - 25 SOLIDH8 HEX8 53 55 77 75 54 56 78 76 MAT 1 KINEM nonlinear EAS none - - 26 SOLIDH8 HEX8 55 57 79 77 56 58 80 78 MAT 1 KINEM nonlinear EAS none - - 27 SOLIDH8 HEX8 57 59 81 79 58 60 82 80 MAT 1 KINEM nonlinear EAS none - - 28 SOLIDH8 HEX8 59 61 83 81 60 62 84 82 MAT 1 KINEM nonlinear EAS none - - 29 SOLIDH8 HEX8 61 63 85 83 62 64 86 84 MAT 1 KINEM nonlinear EAS none - - 30 SOLIDH8 HEX8 63 65 87 85 64 66 88 86 MAT 1 KINEM nonlinear EAS none - - 31 SOLIDH8 HEX8 68 67 2 1 70 69 6 5 MAT 1 KINEM nonlinear EAS none - - 32 SOLIDH8 HEX8 67 71 9 2 69 72 11 6 MAT 1 KINEM nonlinear EAS none - - 33 SOLIDH8 HEX8 71 73 13 9 72 74 15 11 MAT 1 KINEM nonlinear EAS none - - 34 SOLIDH8 HEX8 73 75 17 13 74 76 19 15 MAT 1 KINEM nonlinear EAS none - - 35 SOLIDH8 HEX8 75 77 21 17 76 78 23 19 MAT 1 KINEM nonlinear EAS none - - 36 SOLIDH8 HEX8 77 79 25 21 78 80 27 23 MAT 1 KINEM nonlinear EAS none - - 37 SOLIDH8 HEX8 79 81 29 25 80 82 31 27 MAT 1 KINEM nonlinear EAS none - - 38 SOLIDH8 HEX8 81 83 33 29 82 84 35 31 MAT 1 KINEM nonlinear EAS none - - 39 SOLIDH8 HEX8 83 85 37 33 84 86 39 35 MAT 1 KINEM nonlinear EAS none - - 40 SOLIDH8 HEX8 85 87 41 37 86 88 43 39 MAT 1 KINEM nonlinear EAS none + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 2 SOLID HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 3 SOLID HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 4 SOLID HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 5 SOLID HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 6 SOLID HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 7 SOLID HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 8 SOLID HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 9 SOLID HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 10 SOLID HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 11 SOLID HEX8 4 3 45 46 8 7 47 48 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 12 SOLID HEX8 3 10 49 45 7 12 50 47 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 13 SOLID HEX8 10 14 51 49 12 16 52 50 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 14 SOLID HEX8 14 18 53 51 16 20 54 52 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 15 SOLID HEX8 18 22 55 53 20 24 56 54 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 16 SOLID HEX8 22 26 57 55 24 28 58 56 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 17 SOLID HEX8 26 30 59 57 28 32 60 58 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 18 SOLID HEX8 30 34 61 59 32 36 62 60 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 19 SOLID HEX8 34 38 63 61 36 40 64 62 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 20 SOLID HEX8 38 42 65 63 40 44 66 64 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 21 SOLID HEX8 46 45 67 68 48 47 69 70 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 22 SOLID HEX8 45 49 71 67 47 50 72 69 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 23 SOLID HEX8 49 51 73 71 50 52 74 72 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 24 SOLID HEX8 51 53 75 73 52 54 76 74 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 25 SOLID HEX8 53 55 77 75 54 56 78 76 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 26 SOLID HEX8 55 57 79 77 56 58 80 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 27 SOLID HEX8 57 59 81 79 58 60 82 80 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 28 SOLID HEX8 59 61 83 81 60 62 84 82 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 29 SOLID HEX8 61 63 85 83 62 64 86 84 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 30 SOLID HEX8 63 65 87 85 64 66 88 86 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 31 SOLID HEX8 68 67 2 1 70 69 6 5 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 32 SOLID HEX8 67 71 9 2 69 72 11 6 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 33 SOLID HEX8 71 73 13 9 72 74 15 11 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 34 SOLID HEX8 73 75 17 13 74 76 19 15 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 35 SOLID HEX8 75 77 21 17 76 78 23 19 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 36 SOLID HEX8 77 79 25 21 78 80 27 23 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 37 SOLID HEX8 79 81 29 25 80 82 31 27 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 38 SOLID HEX8 81 83 33 29 82 84 35 31 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 39 SOLID HEX8 83 85 37 33 84 86 39 35 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 40 SOLID HEX8 85 87 41 37 86 88 43 39 MAT 1 KINEM nonlinear TECH shell_eas_ans diff --git a/tests/reference-files/test_cosserat_curve_mesh_warp.4C.yaml b/tests/reference-files/test_cosserat_curve_mesh_warp.4C.yaml index 83133e0e..565e5238 100644 --- a/tests/reference-files/test_cosserat_curve_mesh_warp.4C.yaml +++ b/tests/reference-files/test_cosserat_curve_mesh_warp.4C.yaml @@ -110,46 +110,46 @@ NODE COORDS: - NODE 98 COORD -13.44403251172285 -3.819237624182657 -1.956656734237047 - NODE 99 COORD -13.530350292068649 -1.8336825455117887 -5.142084147678197 STRUCTURE ELEMENTS: - - 1 SOLIDH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none - - 2 SOLIDH8 HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear EAS none - - 3 SOLIDH8 HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear EAS none - - 4 SOLIDH8 HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear EAS none - - 5 SOLIDH8 HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear EAS none - - 6 SOLIDH8 HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear EAS none - - 7 SOLIDH8 HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear EAS none - - 8 SOLIDH8 HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear EAS none - - 9 SOLIDH8 HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear EAS none - - 10 SOLIDH8 HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear EAS none - - 11 SOLIDH8 HEX8 4 3 45 46 8 7 47 48 MAT 1 KINEM nonlinear EAS none - - 12 SOLIDH8 HEX8 3 10 49 45 7 12 50 47 MAT 1 KINEM nonlinear EAS none - - 13 SOLIDH8 HEX8 10 14 51 49 12 16 52 50 MAT 1 KINEM nonlinear EAS none - - 14 SOLIDH8 HEX8 14 18 53 51 16 20 54 52 MAT 1 KINEM nonlinear EAS none - - 15 SOLIDH8 HEX8 18 22 55 53 20 24 56 54 MAT 1 KINEM nonlinear EAS none - - 16 SOLIDH8 HEX8 22 26 57 55 24 28 58 56 MAT 1 KINEM nonlinear EAS none - - 17 SOLIDH8 HEX8 26 30 59 57 28 32 60 58 MAT 1 KINEM nonlinear EAS none - - 18 SOLIDH8 HEX8 30 34 61 59 32 36 62 60 MAT 1 KINEM nonlinear EAS none - - 19 SOLIDH8 HEX8 34 38 63 61 36 40 64 62 MAT 1 KINEM nonlinear EAS none - - 20 SOLIDH8 HEX8 38 42 65 63 40 44 66 64 MAT 1 KINEM nonlinear EAS none - - 21 SOLIDH8 HEX8 46 45 67 68 48 47 69 70 MAT 1 KINEM nonlinear EAS none - - 22 SOLIDH8 HEX8 45 49 71 67 47 50 72 69 MAT 1 KINEM nonlinear EAS none - - 23 SOLIDH8 HEX8 49 51 73 71 50 52 74 72 MAT 1 KINEM nonlinear EAS none - - 24 SOLIDH8 HEX8 51 53 75 73 52 54 76 74 MAT 1 KINEM nonlinear EAS none - - 25 SOLIDH8 HEX8 53 55 77 75 54 56 78 76 MAT 1 KINEM nonlinear EAS none - - 26 SOLIDH8 HEX8 55 57 79 77 56 58 80 78 MAT 1 KINEM nonlinear EAS none - - 27 SOLIDH8 HEX8 57 59 81 79 58 60 82 80 MAT 1 KINEM nonlinear EAS none - - 28 SOLIDH8 HEX8 59 61 83 81 60 62 84 82 MAT 1 KINEM nonlinear EAS none - - 29 SOLIDH8 HEX8 61 63 85 83 62 64 86 84 MAT 1 KINEM nonlinear EAS none - - 30 SOLIDH8 HEX8 63 65 87 85 64 66 88 86 MAT 1 KINEM nonlinear EAS none - - 31 SOLIDH8 HEX8 68 67 2 1 70 69 6 5 MAT 1 KINEM nonlinear EAS none - - 32 SOLIDH8 HEX8 67 71 9 2 69 72 11 6 MAT 1 KINEM nonlinear EAS none - - 33 SOLIDH8 HEX8 71 73 13 9 72 74 15 11 MAT 1 KINEM nonlinear EAS none - - 34 SOLIDH8 HEX8 73 75 17 13 74 76 19 15 MAT 1 KINEM nonlinear EAS none - - 35 SOLIDH8 HEX8 75 77 21 17 76 78 23 19 MAT 1 KINEM nonlinear EAS none - - 36 SOLIDH8 HEX8 77 79 25 21 78 80 27 23 MAT 1 KINEM nonlinear EAS none - - 37 SOLIDH8 HEX8 79 81 29 25 80 82 31 27 MAT 1 KINEM nonlinear EAS none - - 38 SOLIDH8 HEX8 81 83 33 29 82 84 35 31 MAT 1 KINEM nonlinear EAS none - - 39 SOLIDH8 HEX8 83 85 37 33 84 86 39 35 MAT 1 KINEM nonlinear EAS none - - 40 SOLIDH8 HEX8 85 87 41 37 86 88 43 39 MAT 1 KINEM nonlinear EAS none + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 2 SOLID HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 3 SOLID HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 4 SOLID HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 5 SOLID HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 6 SOLID HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 7 SOLID HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 8 SOLID HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 9 SOLID HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 10 SOLID HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 11 SOLID HEX8 4 3 45 46 8 7 47 48 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 12 SOLID HEX8 3 10 49 45 7 12 50 47 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 13 SOLID HEX8 10 14 51 49 12 16 52 50 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 14 SOLID HEX8 14 18 53 51 16 20 54 52 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 15 SOLID HEX8 18 22 55 53 20 24 56 54 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 16 SOLID HEX8 22 26 57 55 24 28 58 56 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 17 SOLID HEX8 26 30 59 57 28 32 60 58 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 18 SOLID HEX8 30 34 61 59 32 36 62 60 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 19 SOLID HEX8 34 38 63 61 36 40 64 62 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 20 SOLID HEX8 38 42 65 63 40 44 66 64 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 21 SOLID HEX8 46 45 67 68 48 47 69 70 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 22 SOLID HEX8 45 49 71 67 47 50 72 69 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 23 SOLID HEX8 49 51 73 71 50 52 74 72 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 24 SOLID HEX8 51 53 75 73 52 54 76 74 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 25 SOLID HEX8 53 55 77 75 54 56 78 76 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 26 SOLID HEX8 55 57 79 77 56 58 80 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 27 SOLID HEX8 57 59 81 79 58 60 82 80 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 28 SOLID HEX8 59 61 83 81 60 62 84 82 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 29 SOLID HEX8 61 63 85 83 62 64 86 84 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 30 SOLID HEX8 63 65 87 85 64 66 88 86 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 31 SOLID HEX8 68 67 2 1 70 69 6 5 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 32 SOLID HEX8 67 71 9 2 69 72 11 6 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 33 SOLID HEX8 71 73 13 9 72 74 15 11 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 34 SOLID HEX8 73 75 17 13 74 76 19 15 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 35 SOLID HEX8 75 77 21 17 76 78 23 19 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 36 SOLID HEX8 77 79 25 21 78 80 27 23 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 37 SOLID HEX8 79 81 29 25 80 82 31 27 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 38 SOLID HEX8 81 83 33 29 82 84 35 31 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 39 SOLID HEX8 83 85 37 33 84 86 39 35 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 40 SOLID HEX8 85 87 41 37 86 88 43 39 MAT 1 KINEM nonlinear TECH shell_eas_ans - 41 BEAM3R HERM2LINE3 89 91 90 MAT 1 TRIADS -1.3459986016901957 1.2984627571428202 1.4592472128908793 0.42521231740070126 -1.0547357373734856 2.112631048928502 -1.9228986358394702 2.3820270911833825 -0.6710880244365088 - 42 BEAM3R HERM2LINE3 91 93 92 MAT 1 TRIADS 0.42521231740070126 -1.0547357373734856 2.112631048928502 -1.6674117382407774 1.9855869179780377 -0.005138613797138484 -1.034223927207818 0.632119356762101 1.7345636528395365 - 43 BEAM3R HERM2LINE3 93 95 94 MAT 1 TRIADS -1.6674117382407774 1.9855869179780377 -0.005138613797138484 -0.8798483397660042 0.00238765835035498 2.2519103649332712 0.8841136376216014 -1.6922038607640164 2.1089767335357137 diff --git a/tests/reference-files/test_cosserat_curve_mesh_warp_transform_boundary_conditions.4C.yaml b/tests/reference-files/test_cosserat_curve_mesh_warp_transform_boundary_conditions.4C.yaml index 4c0b7d1a..2c0cb5c0 100644 --- a/tests/reference-files/test_cosserat_curve_mesh_warp_transform_boundary_conditions.4C.yaml +++ b/tests/reference-files/test_cosserat_curve_mesh_warp_transform_boundary_conditions.4C.yaml @@ -7636,46 +7636,46 @@ NODE COORDS: - NODE 98 COORD -0.6180339887498961 -1.9021130325903133 14.345035955734229 - NODE 99 COORD 2.0 -8.547882473257658e-15 15.938928839704698 STRUCTURE ELEMENTS: - - 1 SOLIDH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none - - 2 SOLIDH8 HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear EAS none - - 3 SOLIDH8 HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear EAS none - - 4 SOLIDH8 HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear EAS none - - 5 SOLIDH8 HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear EAS none - - 6 SOLIDH8 HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear EAS none - - 7 SOLIDH8 HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear EAS none - - 8 SOLIDH8 HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear EAS none - - 9 SOLIDH8 HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear EAS none - - 10 SOLIDH8 HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear EAS none - - 11 SOLIDH8 HEX8 4 3 45 46 8 7 47 48 MAT 1 KINEM nonlinear EAS none - - 12 SOLIDH8 HEX8 3 10 49 45 7 12 50 47 MAT 1 KINEM nonlinear EAS none - - 13 SOLIDH8 HEX8 10 14 51 49 12 16 52 50 MAT 1 KINEM nonlinear EAS none - - 14 SOLIDH8 HEX8 14 18 53 51 16 20 54 52 MAT 1 KINEM nonlinear EAS none - - 15 SOLIDH8 HEX8 18 22 55 53 20 24 56 54 MAT 1 KINEM nonlinear EAS none - - 16 SOLIDH8 HEX8 22 26 57 55 24 28 58 56 MAT 1 KINEM nonlinear EAS none - - 17 SOLIDH8 HEX8 26 30 59 57 28 32 60 58 MAT 1 KINEM nonlinear EAS none - - 18 SOLIDH8 HEX8 30 34 61 59 32 36 62 60 MAT 1 KINEM nonlinear EAS none - - 19 SOLIDH8 HEX8 34 38 63 61 36 40 64 62 MAT 1 KINEM nonlinear EAS none - - 20 SOLIDH8 HEX8 38 42 65 63 40 44 66 64 MAT 1 KINEM nonlinear EAS none - - 21 SOLIDH8 HEX8 46 45 67 68 48 47 69 70 MAT 1 KINEM nonlinear EAS none - - 22 SOLIDH8 HEX8 45 49 71 67 47 50 72 69 MAT 1 KINEM nonlinear EAS none - - 23 SOLIDH8 HEX8 49 51 73 71 50 52 74 72 MAT 1 KINEM nonlinear EAS none - - 24 SOLIDH8 HEX8 51 53 75 73 52 54 76 74 MAT 1 KINEM nonlinear EAS none - - 25 SOLIDH8 HEX8 53 55 77 75 54 56 78 76 MAT 1 KINEM nonlinear EAS none - - 26 SOLIDH8 HEX8 55 57 79 77 56 58 80 78 MAT 1 KINEM nonlinear EAS none - - 27 SOLIDH8 HEX8 57 59 81 79 58 60 82 80 MAT 1 KINEM nonlinear EAS none - - 28 SOLIDH8 HEX8 59 61 83 81 60 62 84 82 MAT 1 KINEM nonlinear EAS none - - 29 SOLIDH8 HEX8 61 63 85 83 62 64 86 84 MAT 1 KINEM nonlinear EAS none - - 30 SOLIDH8 HEX8 63 65 87 85 64 66 88 86 MAT 1 KINEM nonlinear EAS none - - 31 SOLIDH8 HEX8 68 67 2 1 70 69 6 5 MAT 1 KINEM nonlinear EAS none - - 32 SOLIDH8 HEX8 67 71 9 2 69 72 11 6 MAT 1 KINEM nonlinear EAS none - - 33 SOLIDH8 HEX8 71 73 13 9 72 74 15 11 MAT 1 KINEM nonlinear EAS none - - 34 SOLIDH8 HEX8 73 75 17 13 74 76 19 15 MAT 1 KINEM nonlinear EAS none - - 35 SOLIDH8 HEX8 75 77 21 17 76 78 23 19 MAT 1 KINEM nonlinear EAS none - - 36 SOLIDH8 HEX8 77 79 25 21 78 80 27 23 MAT 1 KINEM nonlinear EAS none - - 37 SOLIDH8 HEX8 79 81 29 25 80 82 31 27 MAT 1 KINEM nonlinear EAS none - - 38 SOLIDH8 HEX8 81 83 33 29 82 84 35 31 MAT 1 KINEM nonlinear EAS none - - 39 SOLIDH8 HEX8 83 85 37 33 84 86 39 35 MAT 1 KINEM nonlinear EAS none - - 40 SOLIDH8 HEX8 85 87 41 37 86 88 43 39 MAT 1 KINEM nonlinear EAS none + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 2 SOLID HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 3 SOLID HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 4 SOLID HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 5 SOLID HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 6 SOLID HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 7 SOLID HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 8 SOLID HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 9 SOLID HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 10 SOLID HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 11 SOLID HEX8 4 3 45 46 8 7 47 48 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 12 SOLID HEX8 3 10 49 45 7 12 50 47 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 13 SOLID HEX8 10 14 51 49 12 16 52 50 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 14 SOLID HEX8 14 18 53 51 16 20 54 52 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 15 SOLID HEX8 18 22 55 53 20 24 56 54 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 16 SOLID HEX8 22 26 57 55 24 28 58 56 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 17 SOLID HEX8 26 30 59 57 28 32 60 58 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 18 SOLID HEX8 30 34 61 59 32 36 62 60 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 19 SOLID HEX8 34 38 63 61 36 40 64 62 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 20 SOLID HEX8 38 42 65 63 40 44 66 64 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 21 SOLID HEX8 46 45 67 68 48 47 69 70 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 22 SOLID HEX8 45 49 71 67 47 50 72 69 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 23 SOLID HEX8 49 51 73 71 50 52 74 72 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 24 SOLID HEX8 51 53 75 73 52 54 76 74 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 25 SOLID HEX8 53 55 77 75 54 56 78 76 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 26 SOLID HEX8 55 57 79 77 56 58 80 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 27 SOLID HEX8 57 59 81 79 58 60 82 80 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 28 SOLID HEX8 59 61 83 81 60 62 84 82 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 29 SOLID HEX8 61 63 85 83 62 64 86 84 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 30 SOLID HEX8 63 65 87 85 64 66 88 86 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 31 SOLID HEX8 68 67 2 1 70 69 6 5 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 32 SOLID HEX8 67 71 9 2 69 72 11 6 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 33 SOLID HEX8 71 73 13 9 72 74 15 11 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 34 SOLID HEX8 73 75 17 13 74 76 19 15 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 35 SOLID HEX8 75 77 21 17 76 78 23 19 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 36 SOLID HEX8 77 79 25 21 78 80 27 23 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 37 SOLID HEX8 79 81 29 25 80 82 31 27 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 38 SOLID HEX8 81 83 33 29 82 84 35 31 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 39 SOLID HEX8 83 85 37 33 84 86 39 35 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 40 SOLID HEX8 85 87 41 37 86 88 43 39 MAT 1 KINEM nonlinear TECH shell_eas_ans - 41 BEAM3R HERM2LINE3 89 91 90 MAT 1 TRIADS 1.4974392297402492 0.9926692511571004 1.497439229740249 1.2424524228010965 -0.9868460032219287 -0.4251115977707948 -0.08272768612881358 -1.9262854885952791 -1.8064421052542146 - 42 BEAM3R HERM2LINE3 91 93 92 MAT 1 TRIADS 1.2424524228010965 -0.9868460032219287 -0.4251115977707948 -0.7618323575447686 -2.0420497382670453 -2.1775238555237513 1.6100350505184373 0.4477384880240372 1.0393716372644828 - 43 BEAM3R HERM2LINE3 93 95 94 MAT 1 TRIADS -0.7618323575447686 -2.0420497382670453 -2.1775238555237513 1.5969740040834788 -0.06858483072622656 0.5587201570179784 0.9097065072201816 -1.3722901257126714 -0.9097065072201821 diff --git a/tests/reference-files/test_create_cubit_input_solid_shell_blocks.4C.yaml b/tests/reference-files/test_create_cubit_input_solid_shell_blocks.4C.yaml index afc6d17f..fde5748e 100644 --- a/tests/reference-files/test_create_cubit_input_solid_shell_blocks.4C.yaml +++ b/tests/reference-files/test_create_cubit_input_solid_shell_blocks.4C.yaml @@ -72,18 +72,18 @@ NODE COORDS: - NODE 71 COORD 14 -0.05 -1 - NODE 72 COORD 14 0.05 -1 STRUCTURE ELEMENTS: - - 1 SOLIDSH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 2 SOLIDSH8 HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 3 SOLIDSH8 HEX8 4 3 13 14 8 7 15 16 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 4 SOLIDSH8 HEX8 3 10 17 13 7 12 18 15 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 5 SOLIDSH8 HEX8 19 20 21 22 23 24 25 26 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 6 SOLIDSH8 HEX8 20 27 28 21 24 29 30 25 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 7 SOLIDSH8 HEX8 23 24 25 26 31 32 33 34 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 8 SOLIDSH8 HEX8 24 29 30 25 32 35 36 33 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 9 SOLIDSH8 HEX8 37 38 39 40 41 42 43 44 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 10 SOLIDSH8 HEX8 40 39 45 46 44 43 47 48 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 11 SOLIDSH8 HEX8 41 42 43 44 49 50 51 52 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 12 SOLIDSH8 HEX8 44 43 47 48 52 51 53 54 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 2 SOLID HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 3 SOLID HEX8 4 3 13 14 8 7 15 16 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 4 SOLID HEX8 3 10 17 13 7 12 18 15 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 5 SOLID HEX8 19 20 21 22 23 24 25 26 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 6 SOLID HEX8 20 27 28 21 24 29 30 25 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 7 SOLID HEX8 23 24 25 26 31 32 33 34 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 8 SOLID HEX8 24 29 30 25 32 35 36 33 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 9 SOLID HEX8 37 38 39 40 41 42 43 44 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 10 SOLID HEX8 40 39 45 46 44 43 47 48 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 11 SOLID HEX8 41 42 43 44 49 50 51 52 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 12 SOLID HEX8 44 43 47 48 52 51 53 54 MAT 1 KINEM nonlinear TECH shell_eas_ans - 13 SOLID HEX8 55 56 57 58 59 60 61 62 MAT 1 KINEM nonlinear - 14 SOLID HEX8 56 63 64 57 60 65 66 61 MAT 1 KINEM nonlinear - 15 SOLID HEX8 59 60 61 62 67 68 69 70 MAT 1 KINEM nonlinear diff --git a/tests/reference-files/test_create_cubit_input_solid_shell_dome.4C.yaml b/tests/reference-files/test_create_cubit_input_solid_shell_dome.4C.yaml index ace5c365..08463bfe 100644 --- a/tests/reference-files/test_create_cubit_input_solid_shell_dome.4C.yaml +++ b/tests/reference-files/test_create_cubit_input_solid_shell_dome.4C.yaml @@ -104,45 +104,45 @@ NODE COORDS: - NODE 103 COORD 8.4742357206361130e-01 1.7743071431990362e-01 5.0039147787195404e-01 - NODE 104 COORD 9.3216592926997244e-01 1.9517378575189398e-01 5.5043062565914946e-01 STRUCTURE ELEMENTS: - - 1 SOLIDSH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 2 SOLIDSH8 HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 3 SOLIDSH8 HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 4 SOLIDSH8 HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 5 SOLIDSH8 HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 6 SOLIDSH8 HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 7 SOLIDSH8 HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 8 SOLIDSH8 HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 9 SOLIDSH8 HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 10 SOLIDSH8 HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 11 SOLIDSH8 HEX8 41 45 46 42 43 47 48 44 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 12 SOLIDSH8 HEX8 45 49 50 46 47 51 52 48 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 13 SOLIDSH8 HEX8 49 53 54 50 51 55 56 52 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 14 SOLIDSH8 HEX8 53 57 58 54 55 59 60 56 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 15 SOLIDSH8 HEX8 57 61 62 58 59 63 64 60 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 16 SOLIDSH8 HEX8 61 65 66 62 63 67 68 64 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 17 SOLIDSH8 HEX8 65 69 70 66 67 71 72 68 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 18 SOLIDSH8 HEX8 69 1 4 70 71 5 8 72 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 19 SOLIDSH8 HEX8 3 10 73 74 7 12 75 76 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 20 SOLIDSH8 HEX8 10 14 77 73 12 16 78 75 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 21 SOLIDSH8 HEX8 30 34 79 80 32 36 81 82 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 22 SOLIDSH8 HEX8 34 38 83 79 36 40 84 81 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 23 SOLIDSH8 HEX8 42 46 83 38 44 48 84 40 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 24 SOLIDSH8 HEX8 46 50 85 83 48 52 86 84 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 25 SOLIDSH8 HEX8 50 54 87 85 52 56 88 86 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 26 SOLIDSH8 HEX8 54 58 89 87 56 60 90 88 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 27 SOLIDSH8 HEX8 58 62 91 89 60 64 92 90 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 28 SOLIDSH8 HEX8 70 4 93 91 72 8 94 92 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 29 SOLIDSH8 HEX8 4 3 74 93 8 7 76 94 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 30 SOLIDSH8 HEX8 80 79 95 96 82 81 97 98 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 31 SOLIDSH8 HEX8 79 83 99 95 81 84 100 97 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 32 SOLIDSH8 HEX8 83 85 101 99 84 86 102 100 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 33 SOLIDSH8 HEX8 89 91 93 101 90 92 94 102 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 34 SOLIDSH8 HEX8 96 95 73 77 98 97 75 78 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 35 SOLIDSH8 HEX8 101 93 74 99 102 94 76 100 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 36 SOLIDSH8 HEX8 66 70 91 62 68 72 92 64 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 37 SOLIDSH8 HEX8 101 85 87 89 102 86 88 90 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 38 SOLIDSH8 HEX8 99 74 73 95 100 76 75 97 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 39 SOLIDSH8 HEX8 103 18 22 26 104 20 24 28 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 40 SOLIDSH8 HEX8 103 26 30 80 104 28 32 82 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 41 SOLIDSH8 HEX8 103 80 96 77 104 82 98 78 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 42 SOLIDSH8 HEX8 103 77 14 18 104 78 16 20 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 2 SOLID HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 3 SOLID HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 4 SOLID HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 5 SOLID HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 6 SOLID HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 7 SOLID HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 8 SOLID HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 9 SOLID HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 10 SOLID HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 11 SOLID HEX8 41 45 46 42 43 47 48 44 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 12 SOLID HEX8 45 49 50 46 47 51 52 48 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 13 SOLID HEX8 49 53 54 50 51 55 56 52 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 14 SOLID HEX8 53 57 58 54 55 59 60 56 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 15 SOLID HEX8 57 61 62 58 59 63 64 60 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 16 SOLID HEX8 61 65 66 62 63 67 68 64 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 17 SOLID HEX8 65 69 70 66 67 71 72 68 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 18 SOLID HEX8 69 1 4 70 71 5 8 72 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 19 SOLID HEX8 3 10 73 74 7 12 75 76 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 20 SOLID HEX8 10 14 77 73 12 16 78 75 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 21 SOLID HEX8 30 34 79 80 32 36 81 82 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 22 SOLID HEX8 34 38 83 79 36 40 84 81 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 23 SOLID HEX8 42 46 83 38 44 48 84 40 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 24 SOLID HEX8 46 50 85 83 48 52 86 84 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 25 SOLID HEX8 50 54 87 85 52 56 88 86 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 26 SOLID HEX8 54 58 89 87 56 60 90 88 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 27 SOLID HEX8 58 62 91 89 60 64 92 90 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 28 SOLID HEX8 70 4 93 91 72 8 94 92 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 29 SOLID HEX8 4 3 74 93 8 7 76 94 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 30 SOLID HEX8 80 79 95 96 82 81 97 98 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 31 SOLID HEX8 79 83 99 95 81 84 100 97 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 32 SOLID HEX8 83 85 101 99 84 86 102 100 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 33 SOLID HEX8 89 91 93 101 90 92 94 102 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 34 SOLID HEX8 96 95 73 77 98 97 75 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 35 SOLID HEX8 101 93 74 99 102 94 76 100 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 36 SOLID HEX8 66 70 91 62 68 72 92 64 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 37 SOLID HEX8 101 85 87 89 102 86 88 90 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 38 SOLID HEX8 99 74 73 95 100 76 75 97 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 39 SOLID HEX8 103 18 22 26 104 20 24 28 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 40 SOLID HEX8 103 26 30 80 104 28 32 82 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 41 SOLID HEX8 103 80 96 77 104 82 98 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 42 SOLID HEX8 103 77 14 18 104 78 16 20 MAT 1 KINEM nonlinear TECH shell_eas_ans diff --git a/tests/reference-files/test_four_c_solid_shell_direction_detection_blocks.4C.yaml b/tests/reference-files/test_four_c_solid_shell_direction_detection_blocks.4C.yaml index d53d920b..5e368d51 100644 --- a/tests/reference-files/test_four_c_solid_shell_direction_detection_blocks.4C.yaml +++ b/tests/reference-files/test_four_c_solid_shell_direction_detection_blocks.4C.yaml @@ -86,18 +86,18 @@ NODE COORDS: - NODE 74 COORD 0.5 0.0 0.0 - NODE 75 COORD 1.0 0.0 0.0 STRUCTURE ELEMENTS: - - 1 SOLIDSH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 2 SOLIDSH8 HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 3 SOLIDSH8 HEX8 4 3 13 14 8 7 15 16 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 4 SOLIDSH8 HEX8 3 10 17 13 7 12 18 15 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 5 SOLIDSH8 HEX8 21 25 26 22 20 24 23 19 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 6 SOLIDSH8 HEX8 28 30 25 21 27 29 24 20 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 7 SOLIDSH8 HEX8 25 33 34 26 24 32 31 23 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 8 SOLIDSH8 HEX8 30 36 33 25 29 35 32 24 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 9 SOLIDSH8 HEX8 44 41 37 40 43 42 38 39 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 10 SOLIDSH8 HEX8 48 44 40 46 47 43 39 45 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 11 SOLIDSH8 HEX8 52 49 41 44 51 50 42 43 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 12 SOLIDSH8 HEX8 54 52 44 48 53 51 43 47 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 2 SOLID HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 3 SOLID HEX8 4 3 13 14 8 7 15 16 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 4 SOLID HEX8 3 10 17 13 7 12 18 15 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 5 SOLID HEX8 21 25 26 22 20 24 23 19 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 6 SOLID HEX8 28 30 25 21 27 29 24 20 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 7 SOLID HEX8 25 33 34 26 24 32 31 23 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 8 SOLID HEX8 30 36 33 25 29 35 32 24 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 9 SOLID HEX8 44 41 37 40 43 42 38 39 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 10 SOLID HEX8 48 44 40 46 47 43 39 45 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 11 SOLID HEX8 52 49 41 44 51 50 42 43 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 12 SOLID HEX8 54 52 44 48 53 51 43 47 MAT 1 KINEM nonlinear TECH shell_eas_ans - 13 SOLID HEX8 55 56 57 58 59 60 61 62 MAT 1 KINEM nonlinear - 14 SOLID HEX8 56 63 64 57 60 65 66 61 MAT 1 KINEM nonlinear - 15 SOLID HEX8 59 60 61 62 67 68 69 70 MAT 1 KINEM nonlinear diff --git a/tests/reference-files/test_four_c_solid_shell_direction_detection_dome_constant_direction.4C.yaml b/tests/reference-files/test_four_c_solid_shell_direction_detection_dome_constant_direction.4C.yaml index 036f59e2..d944f682 100644 --- a/tests/reference-files/test_four_c_solid_shell_direction_detection_dome_constant_direction.4C.yaml +++ b/tests/reference-files/test_four_c_solid_shell_direction_detection_dome_constant_direction.4C.yaml @@ -104,45 +104,45 @@ NODE COORDS: - NODE 103 COORD 0.8474235720636113 0.17743071431990362 0.500391477871954 - NODE 104 COORD 0.9321659292699724 0.19517378575189398 0.5504306256591495 STRUCTURE ELEMENTS: - - 1 SOLIDSH8 HEX8 3 7 8 4 2 6 5 1 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 2 SOLIDSH8 HEX8 10 12 7 3 9 11 6 2 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 3 SOLIDSH8 HEX8 14 16 12 10 13 15 11 9 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 4 SOLIDSH8 HEX8 18 20 16 14 17 19 15 13 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 5 SOLIDSH8 HEX8 22 24 20 18 21 23 19 17 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 6 SOLIDSH8 HEX8 26 28 24 22 25 27 23 21 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 7 SOLIDSH8 HEX8 30 32 28 26 29 31 27 25 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 8 SOLIDSH8 HEX8 34 36 32 30 33 35 31 29 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 9 SOLIDSH8 HEX8 38 40 36 34 37 39 35 33 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 10 SOLIDSH8 HEX8 42 44 40 38 41 43 39 37 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 11 SOLIDSH8 HEX8 46 48 44 42 45 47 43 41 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 12 SOLIDSH8 HEX8 50 52 48 46 49 51 47 45 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 13 SOLIDSH8 HEX8 54 56 52 50 53 55 51 49 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 14 SOLIDSH8 HEX8 58 60 56 54 57 59 55 53 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 15 SOLIDSH8 HEX8 62 64 60 58 61 63 59 57 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 16 SOLIDSH8 HEX8 66 68 64 62 65 67 63 61 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 17 SOLIDSH8 HEX8 70 72 68 66 69 71 67 65 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 18 SOLIDSH8 HEX8 4 8 72 70 1 5 71 69 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 19 SOLIDSH8 HEX8 73 75 76 74 10 12 7 3 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 20 SOLIDSH8 HEX8 77 78 75 73 14 16 12 10 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 21 SOLIDSH8 HEX8 79 81 82 80 34 36 32 30 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 22 SOLIDSH8 HEX8 83 84 81 79 38 40 36 34 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 23 SOLIDSH8 HEX8 83 84 40 38 46 48 44 42 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 24 SOLIDSH8 HEX8 85 86 84 83 50 52 48 46 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 25 SOLIDSH8 HEX8 87 88 86 85 54 56 52 50 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 26 SOLIDSH8 HEX8 89 90 88 87 58 60 56 54 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 27 SOLIDSH8 HEX8 91 92 90 89 62 64 60 58 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 28 SOLIDSH8 HEX8 93 94 92 91 4 8 72 70 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 29 SOLIDSH8 HEX8 74 76 94 93 3 7 8 4 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 30 SOLIDSH8 HEX8 80 79 95 96 82 81 97 98 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 31 SOLIDSH8 HEX8 79 83 99 95 81 84 100 97 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 32 SOLIDSH8 HEX8 83 85 101 99 84 86 102 100 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 33 SOLIDSH8 HEX8 89 91 93 101 90 92 94 102 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 34 SOLIDSH8 HEX8 96 95 73 77 98 97 75 78 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 35 SOLIDSH8 HEX8 101 93 74 99 102 94 76 100 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 36 SOLIDSH8 HEX8 64 68 66 62 92 72 70 91 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 37 SOLIDSH8 HEX8 101 85 87 89 102 86 88 90 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 38 SOLIDSH8 HEX8 99 74 73 95 100 76 75 97 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 39 SOLIDSH8 HEX8 22 24 28 26 18 20 104 103 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 40 SOLIDSH8 HEX8 82 104 103 80 32 28 26 30 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 41 SOLIDSH8 HEX8 103 80 96 77 104 82 98 78 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 42 SOLIDSH8 HEX8 14 16 20 18 77 78 104 103 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto + - 1 SOLID HEX8 3 7 8 4 2 6 5 1 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 2 SOLID HEX8 10 12 7 3 9 11 6 2 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 3 SOLID HEX8 14 16 12 10 13 15 11 9 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 4 SOLID HEX8 18 20 16 14 17 19 15 13 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 5 SOLID HEX8 22 24 20 18 21 23 19 17 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 6 SOLID HEX8 26 28 24 22 25 27 23 21 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 7 SOLID HEX8 30 32 28 26 29 31 27 25 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 8 SOLID HEX8 34 36 32 30 33 35 31 29 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 9 SOLID HEX8 38 40 36 34 37 39 35 33 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 10 SOLID HEX8 42 44 40 38 41 43 39 37 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 11 SOLID HEX8 46 48 44 42 45 47 43 41 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 12 SOLID HEX8 50 52 48 46 49 51 47 45 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 13 SOLID HEX8 54 56 52 50 53 55 51 49 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 14 SOLID HEX8 58 60 56 54 57 59 55 53 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 15 SOLID HEX8 62 64 60 58 61 63 59 57 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 16 SOLID HEX8 66 68 64 62 65 67 63 61 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 17 SOLID HEX8 70 72 68 66 69 71 67 65 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 18 SOLID HEX8 4 8 72 70 1 5 71 69 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 19 SOLID HEX8 73 75 76 74 10 12 7 3 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 20 SOLID HEX8 77 78 75 73 14 16 12 10 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 21 SOLID HEX8 79 81 82 80 34 36 32 30 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 22 SOLID HEX8 83 84 81 79 38 40 36 34 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 23 SOLID HEX8 83 84 40 38 46 48 44 42 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 24 SOLID HEX8 85 86 84 83 50 52 48 46 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 25 SOLID HEX8 87 88 86 85 54 56 52 50 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 26 SOLID HEX8 89 90 88 87 58 60 56 54 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 27 SOLID HEX8 91 92 90 89 62 64 60 58 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 28 SOLID HEX8 93 94 92 91 4 8 72 70 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 29 SOLID HEX8 74 76 94 93 3 7 8 4 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 30 SOLID HEX8 80 79 95 96 82 81 97 98 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 31 SOLID HEX8 79 83 99 95 81 84 100 97 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 32 SOLID HEX8 83 85 101 99 84 86 102 100 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 33 SOLID HEX8 89 91 93 101 90 92 94 102 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 34 SOLID HEX8 96 95 73 77 98 97 75 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 35 SOLID HEX8 101 93 74 99 102 94 76 100 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 36 SOLID HEX8 64 68 66 62 92 72 70 91 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 37 SOLID HEX8 101 85 87 89 102 86 88 90 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 38 SOLID HEX8 99 74 73 95 100 76 75 97 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 39 SOLID HEX8 22 24 28 26 18 20 104 103 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 40 SOLID HEX8 82 104 103 80 32 28 26 30 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 41 SOLID HEX8 103 80 96 77 104 82 98 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 42 SOLID HEX8 14 16 20 18 77 78 104 103 MAT 1 KINEM nonlinear TECH shell_eas_ans diff --git a/tests/reference-files/test_four_c_solid_shell_direction_detection_dome_thickness.4C.yaml b/tests/reference-files/test_four_c_solid_shell_direction_detection_dome_thickness.4C.yaml index b8327c9f..dfafae66 100644 --- a/tests/reference-files/test_four_c_solid_shell_direction_detection_dome_thickness.4C.yaml +++ b/tests/reference-files/test_four_c_solid_shell_direction_detection_dome_thickness.4C.yaml @@ -104,45 +104,45 @@ NODE COORDS: - NODE 103 COORD 0.8474235720636113 0.17743071431990362 0.500391477871954 - NODE 104 COORD 0.9321659292699724 0.19517378575189398 0.5504306256591495 STRUCTURE ELEMENTS: - - 1 SOLIDSH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 2 SOLIDSH8 HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 3 SOLIDSH8 HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 4 SOLIDSH8 HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 5 SOLIDSH8 HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 6 SOLIDSH8 HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 7 SOLIDSH8 HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 8 SOLIDSH8 HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 9 SOLIDSH8 HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 10 SOLIDSH8 HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 11 SOLIDSH8 HEX8 41 45 46 42 43 47 48 44 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 12 SOLIDSH8 HEX8 45 49 50 46 47 51 52 48 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 13 SOLIDSH8 HEX8 49 53 54 50 51 55 56 52 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 14 SOLIDSH8 HEX8 53 57 58 54 55 59 60 56 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 15 SOLIDSH8 HEX8 57 61 62 58 59 63 64 60 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 16 SOLIDSH8 HEX8 61 65 66 62 63 67 68 64 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 17 SOLIDSH8 HEX8 65 69 70 66 67 71 72 68 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 18 SOLIDSH8 HEX8 69 1 4 70 71 5 8 72 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 19 SOLIDSH8 HEX8 3 10 73 74 7 12 75 76 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 20 SOLIDSH8 HEX8 10 14 77 73 12 16 78 75 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 21 SOLIDSH8 HEX8 30 34 79 80 32 36 81 82 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 22 SOLIDSH8 HEX8 34 38 83 79 36 40 84 81 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 23 SOLIDSH8 HEX8 42 46 83 38 44 48 84 40 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 24 SOLIDSH8 HEX8 46 50 85 83 48 52 86 84 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 25 SOLIDSH8 HEX8 50 54 87 85 52 56 88 86 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 26 SOLIDSH8 HEX8 54 58 89 87 56 60 90 88 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 27 SOLIDSH8 HEX8 58 62 91 89 60 64 92 90 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 28 SOLIDSH8 HEX8 70 4 93 91 72 8 94 92 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 29 SOLIDSH8 HEX8 4 3 74 93 8 7 76 94 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 30 SOLIDSH8 HEX8 80 79 95 96 82 81 97 98 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 31 SOLIDSH8 HEX8 79 83 99 95 81 84 100 97 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 32 SOLIDSH8 HEX8 83 85 101 99 84 86 102 100 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 33 SOLIDSH8 HEX8 89 91 93 101 90 92 94 102 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 34 SOLIDSH8 HEX8 96 95 73 77 98 97 75 78 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 35 SOLIDSH8 HEX8 101 93 74 99 102 94 76 100 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 36 SOLIDSH8 HEX8 66 70 91 62 68 72 92 64 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 37 SOLIDSH8 HEX8 101 85 87 89 102 86 88 90 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 38 SOLIDSH8 HEX8 99 74 73 95 100 76 75 97 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 39 SOLIDSH8 HEX8 103 18 22 26 104 20 24 28 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 40 SOLIDSH8 HEX8 103 26 30 80 104 28 32 82 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 41 SOLIDSH8 HEX8 103 80 96 77 104 82 98 78 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto - - 42 SOLIDSH8 HEX8 103 77 14 18 104 78 16 20 MAT 1 KINEM nonlinear EAS none ANS none THICKDIR auto + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 2 SOLID HEX8 2 9 10 3 6 11 12 7 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 3 SOLID HEX8 9 13 14 10 11 15 16 12 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 4 SOLID HEX8 13 17 18 14 15 19 20 16 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 5 SOLID HEX8 17 21 22 18 19 23 24 20 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 6 SOLID HEX8 21 25 26 22 23 27 28 24 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 7 SOLID HEX8 25 29 30 26 27 31 32 28 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 8 SOLID HEX8 29 33 34 30 31 35 36 32 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 9 SOLID HEX8 33 37 38 34 35 39 40 36 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 10 SOLID HEX8 37 41 42 38 39 43 44 40 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 11 SOLID HEX8 41 45 46 42 43 47 48 44 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 12 SOLID HEX8 45 49 50 46 47 51 52 48 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 13 SOLID HEX8 49 53 54 50 51 55 56 52 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 14 SOLID HEX8 53 57 58 54 55 59 60 56 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 15 SOLID HEX8 57 61 62 58 59 63 64 60 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 16 SOLID HEX8 61 65 66 62 63 67 68 64 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 17 SOLID HEX8 65 69 70 66 67 71 72 68 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 18 SOLID HEX8 69 1 4 70 71 5 8 72 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 19 SOLID HEX8 3 10 73 74 7 12 75 76 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 20 SOLID HEX8 10 14 77 73 12 16 78 75 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 21 SOLID HEX8 30 34 79 80 32 36 81 82 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 22 SOLID HEX8 34 38 83 79 36 40 84 81 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 23 SOLID HEX8 42 46 83 38 44 48 84 40 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 24 SOLID HEX8 46 50 85 83 48 52 86 84 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 25 SOLID HEX8 50 54 87 85 52 56 88 86 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 26 SOLID HEX8 54 58 89 87 56 60 90 88 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 27 SOLID HEX8 58 62 91 89 60 64 92 90 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 28 SOLID HEX8 70 4 93 91 72 8 94 92 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 29 SOLID HEX8 4 3 74 93 8 7 76 94 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 30 SOLID HEX8 80 79 95 96 82 81 97 98 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 31 SOLID HEX8 79 83 99 95 81 84 100 97 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 32 SOLID HEX8 83 85 101 99 84 86 102 100 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 33 SOLID HEX8 89 91 93 101 90 92 94 102 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 34 SOLID HEX8 96 95 73 77 98 97 75 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 35 SOLID HEX8 101 93 74 99 102 94 76 100 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 36 SOLID HEX8 66 70 91 62 68 72 92 64 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 37 SOLID HEX8 101 85 87 89 102 86 88 90 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 38 SOLID HEX8 99 74 73 95 100 76 75 97 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 39 SOLID HEX8 103 18 22 26 104 20 24 28 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 40 SOLID HEX8 103 26 30 80 104 28 32 82 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 41 SOLID HEX8 103 80 96 77 104 82 98 78 MAT 1 KINEM nonlinear TECH shell_eas_ans + - 42 SOLID HEX8 103 77 14 18 104 78 16 20 MAT 1 KINEM nonlinear TECH shell_eas_ans diff --git a/tests/reference-files/test_meshpy_kirchhoff_beam.4C.yaml b/tests/reference-files/test_meshpy_kirchhoff_beam.4C.yaml index 8c116e34..df15cbe3 100644 --- a/tests/reference-files/test_meshpy_kirchhoff_beam.4C.yaml +++ b/tests/reference-files/test_meshpy_kirchhoff_beam.4C.yaml @@ -151,22 +151,22 @@ NODE COORDS: - NODE 79 COORD 1.75 0.5 0.0 - NODE 80 COORD 2.0 0.5 0.0 STRUCTURE ELEMENTS: - - 1 BEAM3K LINE3 1 3 2 WK 1 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 2 BEAM3K LINE3 3 5 4 WK 1 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 3 BEAM3K LINE3 6 8 7 WK 1 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 4 BEAM3K LINE3 8 10 9 WK 1 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 5 BEAM3K LINE3 11 13 12 WK 1 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 6 BEAM3K LINE3 13 15 14 WK 1 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 7 BEAM3K LINE3 16 18 17 WK 1 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 8 BEAM3K LINE3 18 20 19 WK 1 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 9 BEAM3K LINE3 21 23 22 WK 0 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 10 BEAM3K LINE3 23 25 24 WK 0 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 11 BEAM3K LINE3 26 28 27 WK 0 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 12 BEAM3K LINE3 28 30 29 WK 0 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 13 BEAM3K LINE3 31 33 32 WK 0 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 14 BEAM3K LINE3 33 35 34 WK 0 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 15 BEAM3K LINE3 36 38 37 WK 0 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD - - 16 BEAM3K LINE3 38 40 39 WK 0 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FAD + - 1 BEAM3K LINE3 1 3 2 WK 1 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 2 BEAM3K LINE3 3 5 4 WK 1 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 3 BEAM3K LINE3 6 8 7 WK 1 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 4 BEAM3K LINE3 8 10 9 WK 1 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 5 BEAM3K LINE3 11 13 12 WK 1 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 6 BEAM3K LINE3 13 15 14 WK 1 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 7 BEAM3K LINE3 16 18 17 WK 1 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 8 BEAM3K LINE3 18 20 19 WK 1 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 9 BEAM3K LINE3 21 23 22 WK 0 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 10 BEAM3K LINE3 23 25 24 WK 0 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 11 BEAM3K LINE3 26 28 27 WK 0 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 12 BEAM3K LINE3 28 30 29 WK 0 ROTVEC 1 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 13 BEAM3K LINE3 31 33 32 WK 0 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 14 BEAM3K LINE3 33 35 34 WK 0 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 15 BEAM3K LINE3 36 38 37 WK 0 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true + - 16 BEAM3K LINE3 38 40 39 WK 0 ROTVEC 0 MAT 1 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 USE_FAD true - 17 BEAM3K LINE3 41 43 42 WK 1 ROTVEC 1 MAT 2 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 - 18 BEAM3K LINE3 43 45 44 WK 1 ROTVEC 1 MAT 2 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 - 19 BEAM3K LINE3 46 48 47 WK 1 ROTVEC 1 MAT 2 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/tests/reference-files/test_meshpy_mesh_transformations_with_solid_full.4C.yaml b/tests/reference-files/test_meshpy_mesh_transformations_with_solid_full.4C.yaml index bc51713a..d80ebf13 100644 --- a/tests/reference-files/test_meshpy_mesh_transformations_with_solid_full.4C.yaml +++ b/tests/reference-files/test_meshpy_mesh_transformations_with_solid_full.4C.yaml @@ -31,7 +31,7 @@ NODE COORDS: - NODE 14 COORD 3.510616278099895 3.270437815157127 4.7983060843665415 - NODE 15 COORD 4.100596459462513 3.5987954302057075 4.967270893375357 STRUCTURE ELEMENTS: - - 1 SOLIDH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans - 2 BEAM3R HERM2LINE3 9 11 10 MAT 2 TRIADS -1.1167761650094756 -1.477052982828591 -0.882004429360807 1.8724554849509711 1.300522959656778 0.32804786944883635 -2.1056564993365523 -1.9720878703814606 -0.8675694019075277 - 3 BEAM3R HERM2LINE3 11 13 12 MAT 2 TRIADS 1.8724554849509711 1.300522959656778 0.32804786944883635 0.568247756660091 -0.2050133331391 -0.48727672554519913 1.2771281603261673 0.5208193322959781 -0.13461393109288194 - 4 BEAM3R HERM2LINE3 13 15 14 MAT 2 TRIADS 0.568247756660091 -0.2050133331391 -0.48727672554519913 -1.116776165009476 -1.4770529828285912 -0.8820044293608069 -0.23055971974043676 -0.8754206188833785 -0.7403378794547507 diff --git a/tests/reference-files/test_meshpy_mesh_transformations_with_solid_yaml.4C.yaml b/tests/reference-files/test_meshpy_mesh_transformations_with_solid_yaml.4C.yaml index 335cebbe..16e807bd 100644 --- a/tests/reference-files/test_meshpy_mesh_transformations_with_solid_yaml.4C.yaml +++ b/tests/reference-files/test_meshpy_mesh_transformations_with_solid_yaml.4C.yaml @@ -31,7 +31,7 @@ NODE COORDS: - NODE 14 COORD 3.566165496388826 2.1594534493785056 5.353798267255852 - NODE 15 COORD 4.173261542140748 2.1454937766409916 5.693921720157714 STRUCTURE ELEMENTS: - - 1 SOLIDH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear TECH shell_eas_ans - 2 BEAM3R HERM2LINE3 9 11 10 MAT 2 TRIADS -1.8194545781249198 -1.7410783066024478 -1.0141939177547852 0.07892457570583175 -0.6874053861927905 -0.7733349746046884 -0.8182614418819422 -1.2663007623612976 -0.9738593032463574 - 3 BEAM3R HERM2LINE3 11 13 12 MAT 2 TRIADS 0.07892457570583175 -0.6874053861927905 -0.7733349746046884 1.569542506889896 0.6758628049774555 -0.010080646987980385 0.8787141313494699 -0.036333125275997476 -0.4499313952394221 - 4 BEAM3R HERM2LINE3 13 15 14 MAT 2 TRIADS 1.569542506889896 0.6758628049774555 -0.010080646987980385 -1.8194545781249176 -1.741078306602447 -1.0141939177547845 2.1110375832676302 1.4490221459935757 0.5649291426157232 diff --git a/tests/reference-files/test_meshpy_nurbs_import.4C.yaml b/tests/reference-files/test_meshpy_nurbs_import.4C.yaml index 4849ecd1..ef4a7949 100644 --- a/tests/reference-files/test_meshpy_nurbs_import.4C.yaml +++ b/tests/reference-files/test_meshpy_nurbs_import.4C.yaml @@ -738,14 +738,15 @@ STRUCTURAL DYNAMIC: PRESTRESSTIME: 0 TIMESTEP: 0.5 STRUCTURE ELEMENTS: - - 1 SOLID NURBS27 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 MAT 1 GP 3 3 3 - - 2 SOLID NURBS27 3 28 29 6 30 31 9 32 33 12 34 35 15 36 37 18 38 39 21 40 41 24 42 43 27 44 45 MAT 1 GP 3 3 3 - - 3 SOLID NURBS27 29 46 1 31 47 4 33 48 7 35 49 10 37 50 13 39 51 16 41 52 19 43 53 22 45 54 25 MAT 1 GP 3 3 3 + - 1 SOLID NURBS27 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 MAT 1 + - 2 SOLID NURBS27 3 28 29 6 30 31 9 32 33 12 34 35 15 36 37 18 38 39 21 40 41 24 42 43 27 44 45 MAT 1 + - 3 SOLID NURBS27 29 46 1 31 47 4 33 48 7 35 49 10 37 50 13 39 51 16 41 52 19 43 53 22 45 54 25 MAT 1 - 4 BEAM3R HERM2LINE3 55 57 56 MAT 2 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 - 5 BEAM3R HERM2LINE3 57 59 58 MAT 2 TRIADS 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 - 6 BEAM3R HERM2LINE3 60 62 61 MAT 2 TRIADS 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 - 7 BEAM3R HERM2LINE3 62 64 63 MAT 2 TRIADS 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 1.2091995761561452 STRUCTURE KNOTVECTORS: + - NURBS_DIMENSION 3 - BEGIN NURBSPATCH - ID 1 - NUMKNOTS 6 diff --git a/tests/reference-files/test_meshpy_nurbs_import_solid_mesh.4C.yaml b/tests/reference-files/test_meshpy_nurbs_import_solid_mesh.4C.yaml index 3872fb5a..5c18284a 100644 --- a/tests/reference-files/test_meshpy_nurbs_import_solid_mesh.4C.yaml +++ b/tests/reference-files/test_meshpy_nurbs_import_solid_mesh.4C.yaml @@ -485,10 +485,11 @@ PROBLEM TYPE: PROBLEMTYPE: Structure SHAPEFCT: Nurbs STRUCTURE ELEMENTS: - - 1 SOLID NURBS27 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 MAT 1 GP 3 3 3 - - 2 SOLID NURBS27 3 28 29 6 30 31 9 32 33 12 34 35 15 36 37 18 38 39 21 40 41 24 42 43 27 44 45 MAT 1 GP 3 3 3 - - 3 SOLID NURBS27 29 46 1 31 47 4 33 48 7 35 49 10 37 50 13 39 51 16 41 52 19 43 53 22 45 54 25 MAT 1 GP 3 3 3 + - 1 SOLID NURBS27 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 MAT 1 + - 2 SOLID NURBS27 3 28 29 6 30 31 9 32 33 12 34 35 15 36 37 18 38 39 21 40 41 24 42 43 27 44 45 MAT 1 + - 3 SOLID NURBS27 29 46 1 31 47 4 33 48 7 35 49 10 37 50 13 39 51 16 41 52 19 43 53 22 45 54 25 MAT 1 STRUCTURE KNOTVECTORS: + - NURBS_DIMENSION 3 - BEGIN NURBSPATCH - ID 1 - NUMKNOTS 6 diff --git a/tests/reference-files/test_meshpy_surface_to_surface_contact_import.4C.yaml b/tests/reference-files/test_meshpy_surface_to_surface_contact_import.4C.yaml index d3e5b016..981f9178 100644 --- a/tests/reference-files/test_meshpy_surface_to_surface_contact_import.4C.yaml +++ b/tests/reference-files/test_meshpy_surface_to_surface_contact_import.4C.yaml @@ -45,5 +45,5 @@ NODE COORDS: - NODE 15 COORD 0.5 0.5 -0.5 - NODE 16 COORD 0.5 0.5 0.5 STRUCTURE ELEMENTS: - - 1 SOLIDH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none - - 2 SOLIDH8 HEX8 9 10 11 12 13 14 15 16 MAT 2 KINEM nonlinear EAS none + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear + - 2 SOLID HEX8 9 10 11 12 13 14 15 16 MAT 2 KINEM nonlinear diff --git a/tests/reference-files/test_meshpy_surface_to_surface_contact_import_solid_mesh.4C.yaml b/tests/reference-files/test_meshpy_surface_to_surface_contact_import_solid_mesh.4C.yaml index d3e5b016..981f9178 100644 --- a/tests/reference-files/test_meshpy_surface_to_surface_contact_import_solid_mesh.4C.yaml +++ b/tests/reference-files/test_meshpy_surface_to_surface_contact_import_solid_mesh.4C.yaml @@ -45,5 +45,5 @@ NODE COORDS: - NODE 15 COORD 0.5 0.5 -0.5 - NODE 16 COORD 0.5 0.5 0.5 STRUCTURE ELEMENTS: - - 1 SOLIDH8 HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear EAS none - - 2 SOLIDH8 HEX8 9 10 11 12 13 14 15 16 MAT 2 KINEM nonlinear EAS none + - 1 SOLID HEX8 1 2 3 4 5 6 7 8 MAT 1 KINEM nonlinear + - 2 SOLID HEX8 9 10 11 12 13 14 15 16 MAT 2 KINEM nonlinear diff --git a/tests/reference-files/test_meshpy_vtk_writer_solid_elements_import.4C.yaml b/tests/reference-files/test_meshpy_vtk_writer_solid_elements_import.4C.yaml index d1be89b9..57b75b75 100644 --- a/tests/reference-files/test_meshpy_vtk_writer_solid_elements_import.4C.yaml +++ b/tests/reference-files/test_meshpy_vtk_writer_solid_elements_import.4C.yaml @@ -786,173 +786,173 @@ STRUCTURAL DYNAMIC: TOLDISP: 1e-11 TOLRES: 1e-06 STRUCTURE ELEMENTS: - - 1 SOLIDT4 TET4 1 2 3 4 MAT 1 KINEM nonlinear - - 2 SOLIDT4 TET4 1 5 2 6 MAT 1 KINEM nonlinear - - 3 SOLIDT4 TET4 1 7 8 9 MAT 1 KINEM nonlinear - - 4 SOLIDT4 TET4 1 3 8 10 MAT 1 KINEM nonlinear - - 5 SOLIDT4 TET4 11 12 3 10 MAT 1 KINEM nonlinear - - 6 SOLIDT4 TET4 10 11 1 3 MAT 1 KINEM nonlinear - - 7 SOLIDT4 TET4 10 13 14 11 MAT 1 KINEM nonlinear - - 8 SOLIDT4 TET4 15 4 12 16 MAT 1 KINEM nonlinear - - 9 SOLIDT4 TET4 2 17 3 16 MAT 1 KINEM nonlinear - - 10 SOLIDT4 TET4 2 17 18 19 MAT 1 KINEM nonlinear - - 11 SOLIDT4 TET4 2 19 18 5 MAT 1 KINEM nonlinear - - 12 SOLIDT4 TET4 4 11 20 12 MAT 1 KINEM nonlinear - - 13 SOLIDT4 TET4 11 21 22 6 MAT 1 KINEM nonlinear - - 14 SOLIDT4 TET4 18 6 4 2 MAT 1 KINEM nonlinear - - 15 SOLIDT4 TET4 4 12 3 11 MAT 1 KINEM nonlinear - - 16 SOLIDT4 TET4 1 6 4 11 MAT 1 KINEM nonlinear - - 17 SOLIDT4 TET4 4 18 23 6 MAT 1 KINEM nonlinear - - 18 SOLIDT4 TET4 4 21 11 6 MAT 1 KINEM nonlinear - - 19 SOLIDT4 TET4 4 21 23 24 MAT 1 KINEM nonlinear - - 20 SOLIDT4 TET4 4 21 24 20 MAT 1 KINEM nonlinear - - 21 SOLIDT4 TET4 1 7 9 5 MAT 1 KINEM nonlinear - - 22 SOLIDT4 TET4 25 16 2 4 MAT 1 KINEM nonlinear - - 23 SOLIDT4 TET4 1 6 11 7 MAT 1 KINEM nonlinear - - 24 SOLIDT4 TET4 11 7 6 22 MAT 1 KINEM nonlinear - - 25 SOLIDT4 TET4 11 26 21 20 MAT 1 KINEM nonlinear - - 26 SOLIDT4 TET4 11 26 22 21 MAT 1 KINEM nonlinear - - 27 SOLIDT4 TET4 1 7 14 8 MAT 1 KINEM nonlinear - - 28 SOLIDT4 TET4 2 3 17 27 MAT 1 KINEM nonlinear - - 29 SOLIDT4 TET4 3 28 12 16 MAT 1 KINEM nonlinear - - 30 SOLIDT4 TET4 3 28 10 12 MAT 1 KINEM nonlinear - - 31 SOLIDT4 TET4 12 11 20 10 MAT 1 KINEM nonlinear - - 32 SOLIDT4 TET4 2 6 4 1 MAT 1 KINEM nonlinear - - 33 SOLIDT4 TET4 1 3 2 27 MAT 1 KINEM nonlinear - - 34 SOLIDT4 TET4 1 10 8 14 MAT 1 KINEM nonlinear - - 35 SOLIDT4 TET4 13 20 11 10 MAT 1 KINEM nonlinear - - 36 SOLIDT4 TET4 20 15 4 12 MAT 1 KINEM nonlinear - - 37 SOLIDT4 TET4 2 5 27 19 MAT 1 KINEM nonlinear - - 38 SOLIDT4 TET4 16 28 17 3 MAT 1 KINEM nonlinear - - 39 SOLIDT4 TET4 3 12 4 16 MAT 1 KINEM nonlinear - - 40 SOLIDT4 TET4 3 11 1 4 MAT 1 KINEM nonlinear - - 41 SOLIDT4 TET4 1 7 11 14 MAT 1 KINEM nonlinear - - 42 SOLIDT4 TET4 1 5 9 27 MAT 1 KINEM nonlinear - - 43 SOLIDT4 TET4 2 17 19 27 MAT 1 KINEM nonlinear - - 44 SOLIDT4 TET4 4 24 23 25 MAT 1 KINEM nonlinear - - 45 SOLIDT4 TET4 1 8 3 27 MAT 1 KINEM nonlinear - - 46 SOLIDT4 TET4 26 20 11 13 MAT 1 KINEM nonlinear - - 47 SOLIDT4 TET4 4 16 2 3 MAT 1 KINEM nonlinear - - 48 SOLIDT4 TET4 10 1 11 14 MAT 1 KINEM nonlinear - - 49 SOLIDT4 TET4 4 20 11 21 MAT 1 KINEM nonlinear - - 50 SOLIDT4 TET4 11 26 14 22 MAT 1 KINEM nonlinear - - 51 SOLIDT4 TET4 2 16 25 17 MAT 1 KINEM nonlinear - - 52 SOLIDT4 TET4 1 27 2 5 MAT 1 KINEM nonlinear - - 53 SOLIDT4 TET4 2 4 18 25 MAT 1 KINEM nonlinear - - 54 SOLIDT4 TET4 15 25 4 16 MAT 1 KINEM nonlinear - - 55 SOLIDT4 TET4 6 5 2 18 MAT 1 KINEM nonlinear - - 56 SOLIDT4 TET4 3 10 28 29 MAT 1 KINEM nonlinear - - 57 SOLIDT4 TET4 11 13 14 26 MAT 1 KINEM nonlinear - - 58 SOLIDT4 TET4 3 28 27 8 MAT 1 KINEM nonlinear - - 59 SOLIDT4 TET4 12 15 30 20 MAT 1 KINEM nonlinear - - 60 SOLIDT4 TET4 4 21 6 23 MAT 1 KINEM nonlinear - - 61 SOLIDT4 TET4 24 25 4 15 MAT 1 KINEM nonlinear - - 62 SOLIDT4 TET4 12 20 30 13 MAT 1 KINEM nonlinear - - 63 SOLIDT4 TET4 1 27 9 8 MAT 1 KINEM nonlinear - - 64 SOLIDT4 TET4 3 29 8 10 MAT 1 KINEM nonlinear - - 65 SOLIDT4 TET4 3 28 17 27 MAT 1 KINEM nonlinear - - 66 SOLIDT4 TET4 11 7 22 14 MAT 1 KINEM nonlinear - - 67 SOLIDT4 TET4 4 23 18 25 MAT 1 KINEM nonlinear - - 68 SOLIDT4 TET4 10 20 12 13 MAT 1 KINEM nonlinear - - 69 SOLIDT4 TET4 3 28 8 29 MAT 1 KINEM nonlinear - - 70 SOLIDT4 TET4 31 16 28 17 MAT 1 KINEM nonlinear - - 71 SOLIDT4 TET4 2 18 17 25 MAT 1 KINEM nonlinear - - 72 SOLIDT4 TET4 1 6 7 5 MAT 1 KINEM nonlinear - - 73 SOLIDT4 TET4 4 15 20 24 MAT 1 KINEM nonlinear - - 74 SOLIDH8 HEX8 32 33 34 35 36 37 38 39 MAT 1 KINEM nonlinear EAS none - - 75 SOLIDH8 HEX8 33 40 41 34 37 42 43 38 MAT 1 KINEM nonlinear EAS none - - 76 SOLIDH8 HEX8 35 34 44 45 39 38 46 47 MAT 1 KINEM nonlinear EAS none - - 77 SOLIDH8 HEX8 34 41 48 44 38 43 49 46 MAT 1 KINEM nonlinear EAS none - - 78 SOLIDH8 HEX8 36 37 38 39 50 51 52 53 MAT 1 KINEM nonlinear EAS none - - 79 SOLIDH8 HEX8 37 42 43 38 51 54 55 52 MAT 1 KINEM nonlinear EAS none - - 80 SOLIDH8 HEX8 39 38 46 47 53 52 56 57 MAT 1 KINEM nonlinear EAS none - - 81 SOLIDH8 HEX8 38 43 49 46 52 55 58 56 MAT 1 KINEM nonlinear EAS none - - 82 SOLIDT10 TET10 59 60 61 62 63 64 65 66 67 68 MAT 1 KINEM nonlinear - - 83 SOLIDT10 TET10 59 62 69 70 66 71 72 73 74 75 MAT 1 KINEM nonlinear - - 84 SOLIDT10 TET10 59 70 60 62 73 76 63 66 74 67 MAT 1 KINEM nonlinear - - 85 SOLIDT10 TET10 59 77 62 61 78 79 66 65 80 68 MAT 1 KINEM nonlinear - - 86 SOLIDT10 TET10 59 62 77 69 66 79 78 72 71 81 MAT 1 KINEM nonlinear - - 87 SOLIDT10 TET10 60 82 62 70 83 84 67 76 85 74 MAT 1 KINEM nonlinear - - 88 SOLIDT10 TET10 60 62 82 86 67 84 83 87 88 89 MAT 1 KINEM nonlinear - - 89 SOLIDT10 TET10 59 61 60 90 65 64 63 91 92 93 MAT 1 KINEM nonlinear - - 90 SOLIDT10 TET10 60 62 86 61 67 88 87 64 68 94 MAT 1 KINEM nonlinear - - 91 SOLIDT10 TET10 59 90 60 70 91 93 63 73 95 76 MAT 1 KINEM nonlinear - - 92 SOLIDT10 TET10 96 97 62 98 99 100 101 102 103 104 MAT 1 KINEM nonlinear - - 93 SOLIDT10 TET10 96 62 69 105 101 71 106 107 108 109 MAT 1 KINEM nonlinear - - 94 SOLIDT10 TET10 96 62 110 69 101 111 112 106 71 113 MAT 1 KINEM nonlinear - - 95 SOLIDT10 TET10 96 114 115 116 117 118 119 120 121 122 MAT 1 KINEM nonlinear - - 96 SOLIDT10 TET10 97 62 123 82 100 124 125 126 84 127 MAT 1 KINEM nonlinear - - 97 SOLIDT10 TET10 97 110 62 82 128 111 100 126 129 84 MAT 1 KINEM nonlinear - - 98 SOLIDT10 TET10 96 62 97 110 101 100 99 112 111 128 MAT 1 KINEM nonlinear - - 99 SOLIDT10 TET10 97 130 131 82 132 133 134 126 135 136 MAT 1 KINEM nonlinear - - 100 SOLIDT10 TET10 59 90 137 77 91 138 139 78 140 141 MAT 1 KINEM nonlinear - - 101 SOLIDT10 TET10 59 90 142 137 91 143 144 139 138 145 MAT 1 KINEM nonlinear - - 102 SOLIDT10 TET10 62 86 123 82 88 146 124 84 89 127 MAT 1 KINEM nonlinear - - 103 SOLIDT10 TET10 62 123 147 98 124 148 149 104 150 151 MAT 1 KINEM nonlinear - - 104 SOLIDT10 TET10 97 123 98 130 125 150 103 132 152 153 MAT 1 KINEM nonlinear - - 105 SOLIDT10 TET10 97 110 131 114 128 154 134 155 156 157 MAT 1 KINEM nonlinear - - 106 SOLIDT10 TET10 62 158 61 77 159 160 68 79 161 80 MAT 1 KINEM nonlinear - - 107 SOLIDT10 TET10 62 105 98 147 108 162 104 149 163 151 MAT 1 KINEM nonlinear - - 108 SOLIDT10 TET10 96 105 69 115 107 109 106 119 164 165 MAT 1 KINEM nonlinear - - 109 SOLIDT10 TET10 96 114 116 110 117 121 120 112 156 166 MAT 1 KINEM nonlinear - - 110 SOLIDT10 TET10 147 123 62 167 148 124 149 168 169 170 MAT 1 KINEM nonlinear - - 111 SOLIDT10 TET10 60 171 90 172 173 174 93 175 176 177 MAT 1 KINEM nonlinear - - 112 SOLIDT10 TET10 60 90 61 86 93 92 64 87 178 94 MAT 1 KINEM nonlinear - - 113 SOLIDT10 TET10 60 70 171 82 76 179 173 83 85 180 MAT 1 KINEM nonlinear - - 114 SOLIDT10 TET10 70 181 82 110 182 183 85 184 185 129 MAT 1 KINEM nonlinear - - 115 SOLIDT10 TET10 70 110 69 186 184 113 75 187 188 189 MAT 1 KINEM nonlinear - - 116 SOLIDT10 TET10 97 114 130 98 155 190 132 103 191 153 MAT 1 KINEM nonlinear - - 117 SOLIDT10 TET10 97 82 131 110 126 136 134 128 129 154 MAT 1 KINEM nonlinear - - 118 SOLIDT10 TET10 60 171 86 82 173 192 87 83 180 89 MAT 1 KINEM nonlinear - - 119 SOLIDT10 TET10 62 167 61 147 170 193 68 149 168 194 MAT 1 KINEM nonlinear - - 120 SOLIDT10 TET10 62 110 70 82 111 184 74 84 129 85 MAT 1 KINEM nonlinear - - 121 SOLIDT10 TET10 60 90 86 172 93 178 87 175 177 195 MAT 1 KINEM nonlinear - - 122 SOLIDT10 TET10 96 116 115 69 120 122 119 106 196 165 MAT 1 KINEM nonlinear - - 123 SOLIDT10 TET10 171 82 70 181 180 85 179 197 183 182 MAT 1 KINEM nonlinear - - 124 SOLIDT10 TET10 97 123 130 82 125 152 132 126 127 135 MAT 1 KINEM nonlinear - - 125 SOLIDT10 TET10 96 110 97 114 112 128 99 117 156 155 MAT 1 KINEM nonlinear - - 126 SOLIDT10 TET10 62 105 77 69 108 198 79 71 109 81 MAT 1 KINEM nonlinear - - 127 SOLIDT10 TET10 86 167 61 62 199 193 94 88 170 68 MAT 1 KINEM nonlinear - - 128 SOLIDT10 TET10 167 123 62 86 169 124 170 199 146 88 MAT 1 KINEM nonlinear - - 129 SOLIDT10 TET10 131 181 110 82 200 185 154 136 183 129 MAT 1 KINEM nonlinear - - 130 SOLIDT10 TET10 59 142 70 69 144 201 73 72 202 75 MAT 1 KINEM nonlinear - - 131 SOLIDT10 TET10 59 61 90 77 65 92 91 78 80 140 MAT 1 KINEM nonlinear - - 132 SOLIDT10 TET10 70 186 203 110 187 204 205 184 188 206 MAT 1 KINEM nonlinear - - 133 SOLIDT10 TET10 96 114 98 115 117 191 102 119 118 207 MAT 1 KINEM nonlinear - - 134 SOLIDT10 TET10 69 186 110 116 189 188 113 196 208 166 MAT 1 KINEM nonlinear - - 135 SOLIDT10 TET10 70 110 203 181 184 206 205 182 185 209 MAT 1 KINEM nonlinear - - 136 SOLIDT10 TET10 59 142 90 70 144 143 91 73 201 95 MAT 1 KINEM nonlinear - - 137 SOLIDT10 TET10 147 158 61 62 210 160 194 149 159 68 MAT 1 KINEM nonlinear - - 138 SOLIDT10 TET10 97 114 131 130 155 157 134 132 190 133 MAT 1 KINEM nonlinear - - 139 SOLIDT10 TET10 96 62 105 98 101 108 107 102 104 162 MAT 1 KINEM nonlinear - - 140 SOLIDT10 TET10 96 105 115 98 107 164 119 102 162 207 MAT 1 KINEM nonlinear - - 141 SOLIDT10 TET10 60 70 90 171 76 95 93 173 179 174 MAT 1 KINEM nonlinear - - 142 SOLIDT10 TET10 142 69 186 70 202 189 211 201 75 187 MAT 1 KINEM nonlinear - - 143 SOLIDT10 TET10 96 69 110 116 106 113 112 120 196 166 MAT 1 KINEM nonlinear - - 144 SOLIDT10 TET10 97 123 62 98 125 124 100 103 150 104 MAT 1 KINEM nonlinear - - 145 SOLIDT10 TET10 96 97 98 114 99 103 102 117 155 191 MAT 1 KINEM nonlinear - - 146 SOLIDT10 TET10 158 105 62 147 212 108 159 210 163 149 MAT 1 KINEM nonlinear - - 147 SOLIDT10 TET10 77 105 62 158 198 108 79 161 212 159 MAT 1 KINEM nonlinear - - 148 SOLIDT10 TET10 59 77 137 142 78 141 139 144 213 145 MAT 1 KINEM nonlinear - - 149 SOLIDT10 TET10 60 172 86 171 175 195 87 173 176 192 MAT 1 KINEM nonlinear - - 150 SOLIDT10 TET10 59 142 69 77 144 202 72 78 213 81 MAT 1 KINEM nonlinear - - 151 SOLIDT10 TET10 62 70 110 69 74 184 111 71 75 113 MAT 1 KINEM nonlinear - - 152 SOLIDH20 HEX20 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 MAT 1 KINEM nonlinear - - 153 SOLIDH20 HEX20 215 234 235 216 219 236 237 220 238 239 240 223 227 241 242 228 243 244 245 231 MAT 1 KINEM nonlinear - - 154 SOLIDH20 HEX20 217 216 246 247 221 220 248 249 224 250 251 252 229 228 253 254 232 255 256 257 MAT 1 KINEM nonlinear - - 155 SOLIDH20 HEX20 216 235 258 246 220 237 259 248 240 260 261 250 228 242 262 253 245 263 264 255 MAT 1 KINEM nonlinear - - 156 SOLIDH20 HEX20 218 219 220 221 265 266 267 268 230 231 232 233 269 270 271 272 273 274 275 276 MAT 1 KINEM nonlinear - - 157 SOLIDH20 HEX20 219 236 237 220 266 277 278 267 243 244 245 231 270 279 280 271 281 282 283 274 MAT 1 KINEM nonlinear - - 158 SOLIDH20 HEX20 221 220 248 249 268 267 284 285 232 255 256 257 272 271 286 287 275 288 289 290 MAT 1 KINEM nonlinear - - 159 SOLIDH20 HEX20 220 237 259 248 267 278 291 284 245 263 264 255 271 280 292 286 283 293 294 288 MAT 1 KINEM nonlinear - - 160 SOLIDH27 HEX27 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 316 320 319 321 318 317 315 MAT 1 KINEM nonlinear - - 161 SOLIDH27 HEX27 296 322 323 297 300 324 325 301 326 327 328 304 308 329 330 309 331 332 333 312 335 338 337 339 319 336 334 MAT 1 KINEM nonlinear - - 162 SOLIDH27 HEX27 298 297 340 341 302 301 342 343 305 344 345 346 310 309 347 348 313 349 350 351 353 321 356 357 355 354 352 MAT 1 KINEM nonlinear - - 163 SOLIDH27 HEX27 297 323 358 340 301 325 359 342 328 360 361 344 309 330 362 347 333 363 364 349 366 339 368 369 356 367 365 MAT 1 KINEM nonlinear - - 164 SOLIDH27 HEX27 299 300 301 302 370 371 372 373 311 312 313 314 374 375 376 377 378 379 380 381 317 386 385 387 384 383 382 MAT 1 KINEM nonlinear - - 165 SOLIDH27 HEX27 300 324 325 301 371 388 389 372 331 332 333 312 375 390 391 376 392 393 394 379 336 398 397 399 385 396 395 MAT 1 KINEM nonlinear - - 166 SOLIDH27 HEX27 302 301 342 343 373 372 400 401 313 349 350 351 377 376 402 403 380 404 405 406 354 387 410 411 409 408 407 MAT 1 KINEM nonlinear - - 167 SOLIDH27 HEX27 301 325 359 342 372 389 412 400 333 363 364 349 376 391 413 402 394 414 415 404 367 399 418 419 410 417 416 MAT 1 KINEM nonlinear + - 1 SOLID TET4 1 2 3 4 MAT 1 KINEM nonlinear + - 2 SOLID TET4 1 5 2 6 MAT 1 KINEM nonlinear + - 3 SOLID TET4 1 7 8 9 MAT 1 KINEM nonlinear + - 4 SOLID TET4 1 3 8 10 MAT 1 KINEM nonlinear + - 5 SOLID TET4 11 12 3 10 MAT 1 KINEM nonlinear + - 6 SOLID TET4 10 11 1 3 MAT 1 KINEM nonlinear + - 7 SOLID TET4 10 13 14 11 MAT 1 KINEM nonlinear + - 8 SOLID TET4 15 4 12 16 MAT 1 KINEM nonlinear + - 9 SOLID TET4 2 17 3 16 MAT 1 KINEM nonlinear + - 10 SOLID TET4 2 17 18 19 MAT 1 KINEM nonlinear + - 11 SOLID TET4 2 19 18 5 MAT 1 KINEM nonlinear + - 12 SOLID TET4 4 11 20 12 MAT 1 KINEM nonlinear + - 13 SOLID TET4 11 21 22 6 MAT 1 KINEM nonlinear + - 14 SOLID TET4 18 6 4 2 MAT 1 KINEM nonlinear + - 15 SOLID TET4 4 12 3 11 MAT 1 KINEM nonlinear + - 16 SOLID TET4 1 6 4 11 MAT 1 KINEM nonlinear + - 17 SOLID TET4 4 18 23 6 MAT 1 KINEM nonlinear + - 18 SOLID TET4 4 21 11 6 MAT 1 KINEM nonlinear + - 19 SOLID TET4 4 21 23 24 MAT 1 KINEM nonlinear + - 20 SOLID TET4 4 21 24 20 MAT 1 KINEM nonlinear + - 21 SOLID TET4 1 7 9 5 MAT 1 KINEM nonlinear + - 22 SOLID TET4 25 16 2 4 MAT 1 KINEM nonlinear + - 23 SOLID TET4 1 6 11 7 MAT 1 KINEM nonlinear + - 24 SOLID TET4 11 7 6 22 MAT 1 KINEM nonlinear + - 25 SOLID TET4 11 26 21 20 MAT 1 KINEM nonlinear + - 26 SOLID TET4 11 26 22 21 MAT 1 KINEM nonlinear + - 27 SOLID TET4 1 7 14 8 MAT 1 KINEM nonlinear + - 28 SOLID TET4 2 3 17 27 MAT 1 KINEM nonlinear + - 29 SOLID TET4 3 28 12 16 MAT 1 KINEM nonlinear + - 30 SOLID TET4 3 28 10 12 MAT 1 KINEM nonlinear + - 31 SOLID TET4 12 11 20 10 MAT 1 KINEM nonlinear + - 32 SOLID TET4 2 6 4 1 MAT 1 KINEM nonlinear + - 33 SOLID TET4 1 3 2 27 MAT 1 KINEM nonlinear + - 34 SOLID TET4 1 10 8 14 MAT 1 KINEM nonlinear + - 35 SOLID TET4 13 20 11 10 MAT 1 KINEM nonlinear + - 36 SOLID TET4 20 15 4 12 MAT 1 KINEM nonlinear + - 37 SOLID TET4 2 5 27 19 MAT 1 KINEM nonlinear + - 38 SOLID TET4 16 28 17 3 MAT 1 KINEM nonlinear + - 39 SOLID TET4 3 12 4 16 MAT 1 KINEM nonlinear + - 40 SOLID TET4 3 11 1 4 MAT 1 KINEM nonlinear + - 41 SOLID TET4 1 7 11 14 MAT 1 KINEM nonlinear + - 42 SOLID TET4 1 5 9 27 MAT 1 KINEM nonlinear + - 43 SOLID TET4 2 17 19 27 MAT 1 KINEM nonlinear + - 44 SOLID TET4 4 24 23 25 MAT 1 KINEM nonlinear + - 45 SOLID TET4 1 8 3 27 MAT 1 KINEM nonlinear + - 46 SOLID TET4 26 20 11 13 MAT 1 KINEM nonlinear + - 47 SOLID TET4 4 16 2 3 MAT 1 KINEM nonlinear + - 48 SOLID TET4 10 1 11 14 MAT 1 KINEM nonlinear + - 49 SOLID TET4 4 20 11 21 MAT 1 KINEM nonlinear + - 50 SOLID TET4 11 26 14 22 MAT 1 KINEM nonlinear + - 51 SOLID TET4 2 16 25 17 MAT 1 KINEM nonlinear + - 52 SOLID TET4 1 27 2 5 MAT 1 KINEM nonlinear + - 53 SOLID TET4 2 4 18 25 MAT 1 KINEM nonlinear + - 54 SOLID TET4 15 25 4 16 MAT 1 KINEM nonlinear + - 55 SOLID TET4 6 5 2 18 MAT 1 KINEM nonlinear + - 56 SOLID TET4 3 10 28 29 MAT 1 KINEM nonlinear + - 57 SOLID TET4 11 13 14 26 MAT 1 KINEM nonlinear + - 58 SOLID TET4 3 28 27 8 MAT 1 KINEM nonlinear + - 59 SOLID TET4 12 15 30 20 MAT 1 KINEM nonlinear + - 60 SOLID TET4 4 21 6 23 MAT 1 KINEM nonlinear + - 61 SOLID TET4 24 25 4 15 MAT 1 KINEM nonlinear + - 62 SOLID TET4 12 20 30 13 MAT 1 KINEM nonlinear + - 63 SOLID TET4 1 27 9 8 MAT 1 KINEM nonlinear + - 64 SOLID TET4 3 29 8 10 MAT 1 KINEM nonlinear + - 65 SOLID TET4 3 28 17 27 MAT 1 KINEM nonlinear + - 66 SOLID TET4 11 7 22 14 MAT 1 KINEM nonlinear + - 67 SOLID TET4 4 23 18 25 MAT 1 KINEM nonlinear + - 68 SOLID TET4 10 20 12 13 MAT 1 KINEM nonlinear + - 69 SOLID TET4 3 28 8 29 MAT 1 KINEM nonlinear + - 70 SOLID TET4 31 16 28 17 MAT 1 KINEM nonlinear + - 71 SOLID TET4 2 18 17 25 MAT 1 KINEM nonlinear + - 72 SOLID TET4 1 6 7 5 MAT 1 KINEM nonlinear + - 73 SOLID TET4 4 15 20 24 MAT 1 KINEM nonlinear + - 74 SOLID HEX8 32 33 34 35 36 37 38 39 MAT 1 KINEM nonlinear + - 75 SOLID HEX8 33 40 41 34 37 42 43 38 MAT 1 KINEM nonlinear + - 76 SOLID HEX8 35 34 44 45 39 38 46 47 MAT 1 KINEM nonlinear + - 77 SOLID HEX8 34 41 48 44 38 43 49 46 MAT 1 KINEM nonlinear + - 78 SOLID HEX8 36 37 38 39 50 51 52 53 MAT 1 KINEM nonlinear + - 79 SOLID HEX8 37 42 43 38 51 54 55 52 MAT 1 KINEM nonlinear + - 80 SOLID HEX8 39 38 46 47 53 52 56 57 MAT 1 KINEM nonlinear + - 81 SOLID HEX8 38 43 49 46 52 55 58 56 MAT 1 KINEM nonlinear + - 82 SOLID TET10 59 60 61 62 63 64 65 66 67 68 MAT 1 KINEM nonlinear + - 83 SOLID TET10 59 62 69 70 66 71 72 73 74 75 MAT 1 KINEM nonlinear + - 84 SOLID TET10 59 70 60 62 73 76 63 66 74 67 MAT 1 KINEM nonlinear + - 85 SOLID TET10 59 77 62 61 78 79 66 65 80 68 MAT 1 KINEM nonlinear + - 86 SOLID TET10 59 62 77 69 66 79 78 72 71 81 MAT 1 KINEM nonlinear + - 87 SOLID TET10 60 82 62 70 83 84 67 76 85 74 MAT 1 KINEM nonlinear + - 88 SOLID TET10 60 62 82 86 67 84 83 87 88 89 MAT 1 KINEM nonlinear + - 89 SOLID TET10 59 61 60 90 65 64 63 91 92 93 MAT 1 KINEM nonlinear + - 90 SOLID TET10 60 62 86 61 67 88 87 64 68 94 MAT 1 KINEM nonlinear + - 91 SOLID TET10 59 90 60 70 91 93 63 73 95 76 MAT 1 KINEM nonlinear + - 92 SOLID TET10 96 97 62 98 99 100 101 102 103 104 MAT 1 KINEM nonlinear + - 93 SOLID TET10 96 62 69 105 101 71 106 107 108 109 MAT 1 KINEM nonlinear + - 94 SOLID TET10 96 62 110 69 101 111 112 106 71 113 MAT 1 KINEM nonlinear + - 95 SOLID TET10 96 114 115 116 117 118 119 120 121 122 MAT 1 KINEM nonlinear + - 96 SOLID TET10 97 62 123 82 100 124 125 126 84 127 MAT 1 KINEM nonlinear + - 97 SOLID TET10 97 110 62 82 128 111 100 126 129 84 MAT 1 KINEM nonlinear + - 98 SOLID TET10 96 62 97 110 101 100 99 112 111 128 MAT 1 KINEM nonlinear + - 99 SOLID TET10 97 130 131 82 132 133 134 126 135 136 MAT 1 KINEM nonlinear + - 100 SOLID TET10 59 90 137 77 91 138 139 78 140 141 MAT 1 KINEM nonlinear + - 101 SOLID TET10 59 90 142 137 91 143 144 139 138 145 MAT 1 KINEM nonlinear + - 102 SOLID TET10 62 86 123 82 88 146 124 84 89 127 MAT 1 KINEM nonlinear + - 103 SOLID TET10 62 123 147 98 124 148 149 104 150 151 MAT 1 KINEM nonlinear + - 104 SOLID TET10 97 123 98 130 125 150 103 132 152 153 MAT 1 KINEM nonlinear + - 105 SOLID TET10 97 110 131 114 128 154 134 155 156 157 MAT 1 KINEM nonlinear + - 106 SOLID TET10 62 158 61 77 159 160 68 79 161 80 MAT 1 KINEM nonlinear + - 107 SOLID TET10 62 105 98 147 108 162 104 149 163 151 MAT 1 KINEM nonlinear + - 108 SOLID TET10 96 105 69 115 107 109 106 119 164 165 MAT 1 KINEM nonlinear + - 109 SOLID TET10 96 114 116 110 117 121 120 112 156 166 MAT 1 KINEM nonlinear + - 110 SOLID TET10 147 123 62 167 148 124 149 168 169 170 MAT 1 KINEM nonlinear + - 111 SOLID TET10 60 171 90 172 173 174 93 175 176 177 MAT 1 KINEM nonlinear + - 112 SOLID TET10 60 90 61 86 93 92 64 87 178 94 MAT 1 KINEM nonlinear + - 113 SOLID TET10 60 70 171 82 76 179 173 83 85 180 MAT 1 KINEM nonlinear + - 114 SOLID TET10 70 181 82 110 182 183 85 184 185 129 MAT 1 KINEM nonlinear + - 115 SOLID TET10 70 110 69 186 184 113 75 187 188 189 MAT 1 KINEM nonlinear + - 116 SOLID TET10 97 114 130 98 155 190 132 103 191 153 MAT 1 KINEM nonlinear + - 117 SOLID TET10 97 82 131 110 126 136 134 128 129 154 MAT 1 KINEM nonlinear + - 118 SOLID TET10 60 171 86 82 173 192 87 83 180 89 MAT 1 KINEM nonlinear + - 119 SOLID TET10 62 167 61 147 170 193 68 149 168 194 MAT 1 KINEM nonlinear + - 120 SOLID TET10 62 110 70 82 111 184 74 84 129 85 MAT 1 KINEM nonlinear + - 121 SOLID TET10 60 90 86 172 93 178 87 175 177 195 MAT 1 KINEM nonlinear + - 122 SOLID TET10 96 116 115 69 120 122 119 106 196 165 MAT 1 KINEM nonlinear + - 123 SOLID TET10 171 82 70 181 180 85 179 197 183 182 MAT 1 KINEM nonlinear + - 124 SOLID TET10 97 123 130 82 125 152 132 126 127 135 MAT 1 KINEM nonlinear + - 125 SOLID TET10 96 110 97 114 112 128 99 117 156 155 MAT 1 KINEM nonlinear + - 126 SOLID TET10 62 105 77 69 108 198 79 71 109 81 MAT 1 KINEM nonlinear + - 127 SOLID TET10 86 167 61 62 199 193 94 88 170 68 MAT 1 KINEM nonlinear + - 128 SOLID TET10 167 123 62 86 169 124 170 199 146 88 MAT 1 KINEM nonlinear + - 129 SOLID TET10 131 181 110 82 200 185 154 136 183 129 MAT 1 KINEM nonlinear + - 130 SOLID TET10 59 142 70 69 144 201 73 72 202 75 MAT 1 KINEM nonlinear + - 131 SOLID TET10 59 61 90 77 65 92 91 78 80 140 MAT 1 KINEM nonlinear + - 132 SOLID TET10 70 186 203 110 187 204 205 184 188 206 MAT 1 KINEM nonlinear + - 133 SOLID TET10 96 114 98 115 117 191 102 119 118 207 MAT 1 KINEM nonlinear + - 134 SOLID TET10 69 186 110 116 189 188 113 196 208 166 MAT 1 KINEM nonlinear + - 135 SOLID TET10 70 110 203 181 184 206 205 182 185 209 MAT 1 KINEM nonlinear + - 136 SOLID TET10 59 142 90 70 144 143 91 73 201 95 MAT 1 KINEM nonlinear + - 137 SOLID TET10 147 158 61 62 210 160 194 149 159 68 MAT 1 KINEM nonlinear + - 138 SOLID TET10 97 114 131 130 155 157 134 132 190 133 MAT 1 KINEM nonlinear + - 139 SOLID TET10 96 62 105 98 101 108 107 102 104 162 MAT 1 KINEM nonlinear + - 140 SOLID TET10 96 105 115 98 107 164 119 102 162 207 MAT 1 KINEM nonlinear + - 141 SOLID TET10 60 70 90 171 76 95 93 173 179 174 MAT 1 KINEM nonlinear + - 142 SOLID TET10 142 69 186 70 202 189 211 201 75 187 MAT 1 KINEM nonlinear + - 143 SOLID TET10 96 69 110 116 106 113 112 120 196 166 MAT 1 KINEM nonlinear + - 144 SOLID TET10 97 123 62 98 125 124 100 103 150 104 MAT 1 KINEM nonlinear + - 145 SOLID TET10 96 97 98 114 99 103 102 117 155 191 MAT 1 KINEM nonlinear + - 146 SOLID TET10 158 105 62 147 212 108 159 210 163 149 MAT 1 KINEM nonlinear + - 147 SOLID TET10 77 105 62 158 198 108 79 161 212 159 MAT 1 KINEM nonlinear + - 148 SOLID TET10 59 77 137 142 78 141 139 144 213 145 MAT 1 KINEM nonlinear + - 149 SOLID TET10 60 172 86 171 175 195 87 173 176 192 MAT 1 KINEM nonlinear + - 150 SOLID TET10 59 142 69 77 144 202 72 78 213 81 MAT 1 KINEM nonlinear + - 151 SOLID TET10 62 70 110 69 74 184 111 71 75 113 MAT 1 KINEM nonlinear + - 152 SOLID HEX20 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 MAT 1 KINEM nonlinear + - 153 SOLID HEX20 215 234 235 216 219 236 237 220 238 239 240 223 227 241 242 228 243 244 245 231 MAT 1 KINEM nonlinear + - 154 SOLID HEX20 217 216 246 247 221 220 248 249 224 250 251 252 229 228 253 254 232 255 256 257 MAT 1 KINEM nonlinear + - 155 SOLID HEX20 216 235 258 246 220 237 259 248 240 260 261 250 228 242 262 253 245 263 264 255 MAT 1 KINEM nonlinear + - 156 SOLID HEX20 218 219 220 221 265 266 267 268 230 231 232 233 269 270 271 272 273 274 275 276 MAT 1 KINEM nonlinear + - 157 SOLID HEX20 219 236 237 220 266 277 278 267 243 244 245 231 270 279 280 271 281 282 283 274 MAT 1 KINEM nonlinear + - 158 SOLID HEX20 221 220 248 249 268 267 284 285 232 255 256 257 272 271 286 287 275 288 289 290 MAT 1 KINEM nonlinear + - 159 SOLID HEX20 220 237 259 248 267 278 291 284 245 263 264 255 271 280 292 286 283 293 294 288 MAT 1 KINEM nonlinear + - 160 SOLID HEX27 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 316 320 319 321 318 317 315 MAT 1 KINEM nonlinear + - 161 SOLID HEX27 296 322 323 297 300 324 325 301 326 327 328 304 308 329 330 309 331 332 333 312 335 338 337 339 319 336 334 MAT 1 KINEM nonlinear + - 162 SOLID HEX27 298 297 340 341 302 301 342 343 305 344 345 346 310 309 347 348 313 349 350 351 353 321 356 357 355 354 352 MAT 1 KINEM nonlinear + - 163 SOLID HEX27 297 323 358 340 301 325 359 342 328 360 361 344 309 330 362 347 333 363 364 349 366 339 368 369 356 367 365 MAT 1 KINEM nonlinear + - 164 SOLID HEX27 299 300 301 302 370 371 372 373 311 312 313 314 374 375 376 377 378 379 380 381 317 386 385 387 384 383 382 MAT 1 KINEM nonlinear + - 165 SOLID HEX27 300 324 325 301 371 388 389 372 331 332 333 312 375 390 391 376 392 393 394 379 336 398 397 399 385 396 395 MAT 1 KINEM nonlinear + - 166 SOLID HEX27 302 301 342 343 373 372 400 401 313 349 350 351 377 376 402 403 380 404 405 406 354 387 410 411 409 408 407 MAT 1 KINEM nonlinear + - 167 SOLID HEX27 301 325 359 342 372 389 412 400 333 363 364 349 376 391 413 402 394 414 415 404 367 399 418 419 410 417 416 MAT 1 KINEM nonlinear - 168 SOLID WEDGE6 420 421 422 423 424 425 MAT 1 KINEM nonlinear - 169 SOLID WEDGE6 422 421 426 425 424 427 MAT 1 KINEM nonlinear - 170 SOLID WEDGE6 428 422 426 429 425 427 MAT 1 KINEM nonlinear diff --git a/tests/reference-files/test_nurbs_brick.4C.yaml b/tests/reference-files/test_nurbs_brick.4C.yaml index 5e7ca23d..426e4329 100644 --- a/tests/reference-files/test_nurbs_brick.4C.yaml +++ b/tests/reference-files/test_nurbs_brick.4C.yaml @@ -466,30 +466,30 @@ NODE COORDS: - CP 119 COORD 0.375 1.5 1.2 1.0 - CP 120 COORD 0.75 1.5 1.2 1.0 STRUCTURE ELEMENTS: - - 1 SOLID NURBS27 1 2 3 5 6 7 9 10 11 21 22 23 25 26 27 29 30 31 41 42 43 45 46 47 49 50 51 MAT 1 GP 3 3 3 - - 2 SOLID NURBS27 2 3 4 6 7 8 10 11 12 22 23 24 26 27 28 30 31 32 42 43 44 46 47 48 50 51 52 MAT 1 GP 3 3 3 - - 3 SOLID NURBS27 5 6 7 9 10 11 13 14 15 25 26 27 29 30 31 33 34 35 45 46 47 49 50 51 53 54 55 MAT 1 GP 3 3 3 - - 4 SOLID NURBS27 6 7 8 10 11 12 14 15 16 26 27 28 30 31 32 34 35 36 46 47 48 50 51 52 54 55 56 MAT 1 GP 3 3 3 - - 5 SOLID NURBS27 9 10 11 13 14 15 17 18 19 29 30 31 33 34 35 37 38 39 49 50 51 53 54 55 57 58 59 MAT 1 GP 3 3 3 - - 6 SOLID NURBS27 10 11 12 14 15 16 18 19 20 30 31 32 34 35 36 38 39 40 50 51 52 54 55 56 58 59 60 MAT 1 GP 3 3 3 - - 7 SOLID NURBS27 21 22 23 25 26 27 29 30 31 41 42 43 45 46 47 49 50 51 61 62 63 65 66 67 69 70 71 MAT 1 GP 3 3 3 - - 8 SOLID NURBS27 22 23 24 26 27 28 30 31 32 42 43 44 46 47 48 50 51 52 62 63 64 66 67 68 70 71 72 MAT 1 GP 3 3 3 - - 9 SOLID NURBS27 25 26 27 29 30 31 33 34 35 45 46 47 49 50 51 53 54 55 65 66 67 69 70 71 73 74 75 MAT 1 GP 3 3 3 - - 10 SOLID NURBS27 26 27 28 30 31 32 34 35 36 46 47 48 50 51 52 54 55 56 66 67 68 70 71 72 74 75 76 MAT 1 GP 3 3 3 - - 11 SOLID NURBS27 29 30 31 33 34 35 37 38 39 49 50 51 53 54 55 57 58 59 69 70 71 73 74 75 77 78 79 MAT 1 GP 3 3 3 - - 12 SOLID NURBS27 30 31 32 34 35 36 38 39 40 50 51 52 54 55 56 58 59 60 70 71 72 74 75 76 78 79 80 MAT 1 GP 3 3 3 - - 13 SOLID NURBS27 41 42 43 45 46 47 49 50 51 61 62 63 65 66 67 69 70 71 81 82 83 85 86 87 89 90 91 MAT 1 GP 3 3 3 - - 14 SOLID NURBS27 42 43 44 46 47 48 50 51 52 62 63 64 66 67 68 70 71 72 82 83 84 86 87 88 90 91 92 MAT 1 GP 3 3 3 - - 15 SOLID NURBS27 45 46 47 49 50 51 53 54 55 65 66 67 69 70 71 73 74 75 85 86 87 89 90 91 93 94 95 MAT 1 GP 3 3 3 - - 16 SOLID NURBS27 46 47 48 50 51 52 54 55 56 66 67 68 70 71 72 74 75 76 86 87 88 90 91 92 94 95 96 MAT 1 GP 3 3 3 - - 17 SOLID NURBS27 49 50 51 53 54 55 57 58 59 69 70 71 73 74 75 77 78 79 89 90 91 93 94 95 97 98 99 MAT 1 GP 3 3 3 - - 18 SOLID NURBS27 50 51 52 54 55 56 58 59 60 70 71 72 74 75 76 78 79 80 90 91 92 94 95 96 98 99 100 MAT 1 GP 3 3 3 - - 19 SOLID NURBS27 61 62 63 65 66 67 69 70 71 81 82 83 85 86 87 89 90 91 101 102 103 105 106 107 109 110 111 MAT 1 GP 3 3 3 - - 20 SOLID NURBS27 62 63 64 66 67 68 70 71 72 82 83 84 86 87 88 90 91 92 102 103 104 106 107 108 110 111 112 MAT 1 GP 3 3 3 - - 21 SOLID NURBS27 65 66 67 69 70 71 73 74 75 85 86 87 89 90 91 93 94 95 105 106 107 109 110 111 113 114 115 MAT 1 GP 3 3 3 - - 22 SOLID NURBS27 66 67 68 70 71 72 74 75 76 86 87 88 90 91 92 94 95 96 106 107 108 110 111 112 114 115 116 MAT 1 GP 3 3 3 - - 23 SOLID NURBS27 69 70 71 73 74 75 77 78 79 89 90 91 93 94 95 97 98 99 109 110 111 113 114 115 117 118 119 MAT 1 GP 3 3 3 - - 24 SOLID NURBS27 70 71 72 74 75 76 78 79 80 90 91 92 94 95 96 98 99 100 110 111 112 114 115 116 118 119 120 MAT 1 GP 3 3 3 + - 1 SOLID NURBS27 1 2 3 5 6 7 9 10 11 21 22 23 25 26 27 29 30 31 41 42 43 45 46 47 49 50 51 MAT 1 + - 2 SOLID NURBS27 2 3 4 6 7 8 10 11 12 22 23 24 26 27 28 30 31 32 42 43 44 46 47 48 50 51 52 MAT 1 + - 3 SOLID NURBS27 5 6 7 9 10 11 13 14 15 25 26 27 29 30 31 33 34 35 45 46 47 49 50 51 53 54 55 MAT 1 + - 4 SOLID NURBS27 6 7 8 10 11 12 14 15 16 26 27 28 30 31 32 34 35 36 46 47 48 50 51 52 54 55 56 MAT 1 + - 5 SOLID NURBS27 9 10 11 13 14 15 17 18 19 29 30 31 33 34 35 37 38 39 49 50 51 53 54 55 57 58 59 MAT 1 + - 6 SOLID NURBS27 10 11 12 14 15 16 18 19 20 30 31 32 34 35 36 38 39 40 50 51 52 54 55 56 58 59 60 MAT 1 + - 7 SOLID NURBS27 21 22 23 25 26 27 29 30 31 41 42 43 45 46 47 49 50 51 61 62 63 65 66 67 69 70 71 MAT 1 + - 8 SOLID NURBS27 22 23 24 26 27 28 30 31 32 42 43 44 46 47 48 50 51 52 62 63 64 66 67 68 70 71 72 MAT 1 + - 9 SOLID NURBS27 25 26 27 29 30 31 33 34 35 45 46 47 49 50 51 53 54 55 65 66 67 69 70 71 73 74 75 MAT 1 + - 10 SOLID NURBS27 26 27 28 30 31 32 34 35 36 46 47 48 50 51 52 54 55 56 66 67 68 70 71 72 74 75 76 MAT 1 + - 11 SOLID NURBS27 29 30 31 33 34 35 37 38 39 49 50 51 53 54 55 57 58 59 69 70 71 73 74 75 77 78 79 MAT 1 + - 12 SOLID NURBS27 30 31 32 34 35 36 38 39 40 50 51 52 54 55 56 58 59 60 70 71 72 74 75 76 78 79 80 MAT 1 + - 13 SOLID NURBS27 41 42 43 45 46 47 49 50 51 61 62 63 65 66 67 69 70 71 81 82 83 85 86 87 89 90 91 MAT 1 + - 14 SOLID NURBS27 42 43 44 46 47 48 50 51 52 62 63 64 66 67 68 70 71 72 82 83 84 86 87 88 90 91 92 MAT 1 + - 15 SOLID NURBS27 45 46 47 49 50 51 53 54 55 65 66 67 69 70 71 73 74 75 85 86 87 89 90 91 93 94 95 MAT 1 + - 16 SOLID NURBS27 46 47 48 50 51 52 54 55 56 66 67 68 70 71 72 74 75 76 86 87 88 90 91 92 94 95 96 MAT 1 + - 17 SOLID NURBS27 49 50 51 53 54 55 57 58 59 69 70 71 73 74 75 77 78 79 89 90 91 93 94 95 97 98 99 MAT 1 + - 18 SOLID NURBS27 50 51 52 54 55 56 58 59 60 70 71 72 74 75 76 78 79 80 90 91 92 94 95 96 98 99 100 MAT 1 + - 19 SOLID NURBS27 61 62 63 65 66 67 69 70 71 81 82 83 85 86 87 89 90 91 101 102 103 105 106 107 109 110 111 MAT 1 + - 20 SOLID NURBS27 62 63 64 66 67 68 70 71 72 82 83 84 86 87 88 90 91 92 102 103 104 106 107 108 110 111 112 MAT 1 + - 21 SOLID NURBS27 65 66 67 69 70 71 73 74 75 85 86 87 89 90 91 93 94 95 105 106 107 109 110 111 113 114 115 MAT 1 + - 22 SOLID NURBS27 66 67 68 70 71 72 74 75 76 86 87 88 90 91 92 94 95 96 106 107 108 110 111 112 114 115 116 MAT 1 + - 23 SOLID NURBS27 69 70 71 73 74 75 77 78 79 89 90 91 93 94 95 97 98 99 109 110 111 113 114 115 117 118 119 MAT 1 + - 24 SOLID NURBS27 70 71 72 74 75 76 78 79 80 90 91 92 94 95 96 98 99 100 110 111 112 114 115 116 118 119 120 MAT 1 STRUCTURE KNOTVECTORS: - NURBS_DIMENSION 3 - BEGIN NURBSPATCH diff --git a/tests/reference-files/test_nurbs_cylindrical_shell_sector.4C.yaml b/tests/reference-files/test_nurbs_cylindrical_shell_sector.4C.yaml index 9ea7c464..868706df 100644 --- a/tests/reference-files/test_nurbs_cylindrical_shell_sector.4C.yaml +++ b/tests/reference-files/test_nurbs_cylindrical_shell_sector.4C.yaml @@ -131,21 +131,21 @@ NODE COORDS: - CP 34 COORD 0.8025050988602431 0.85 -2.1924847034192694 0.9553418012614796 - CP 35 COORD 1.1499999999999997 0.85 -1.991858428704209 1.0 STRUCTURE ELEMENTS: - - 1 WALLNURBS NURBS9 1 2 3 6 7 8 11 12 13 MAT 1 dummy - - 2 WALLNURBS NURBS9 2 3 4 7 8 9 12 13 14 MAT 1 dummy - - 3 WALLNURBS NURBS9 3 4 5 8 9 10 13 14 15 MAT 1 dummy - - 4 WALLNURBS NURBS9 6 7 8 11 12 13 16 17 18 MAT 1 dummy - - 5 WALLNURBS NURBS9 7 8 9 12 13 14 17 18 19 MAT 1 dummy - - 6 WALLNURBS NURBS9 8 9 10 13 14 15 18 19 20 MAT 1 dummy - - 7 WALLNURBS NURBS9 11 12 13 16 17 18 21 22 23 MAT 1 dummy - - 8 WALLNURBS NURBS9 12 13 14 17 18 19 22 23 24 MAT 1 dummy - - 9 WALLNURBS NURBS9 13 14 15 18 19 20 23 24 25 MAT 1 dummy - - 10 WALLNURBS NURBS9 16 17 18 21 22 23 26 27 28 MAT 1 dummy - - 11 WALLNURBS NURBS9 17 18 19 22 23 24 27 28 29 MAT 1 dummy - - 12 WALLNURBS NURBS9 18 19 20 23 24 25 28 29 30 MAT 1 dummy - - 13 WALLNURBS NURBS9 21 22 23 26 27 28 31 32 33 MAT 1 dummy - - 14 WALLNURBS NURBS9 22 23 24 27 28 29 32 33 34 MAT 1 dummy - - 15 WALLNURBS NURBS9 23 24 25 28 29 30 33 34 35 MAT 1 dummy + - 1 WALLNURBS NURBS9 1 2 3 6 7 8 11 12 13 MAT 1 KINEM linear EAS none THICK 1.0 + - 2 WALLNURBS NURBS9 2 3 4 7 8 9 12 13 14 MAT 1 KINEM linear EAS none THICK 1.0 + - 3 WALLNURBS NURBS9 3 4 5 8 9 10 13 14 15 MAT 1 KINEM linear EAS none THICK 1.0 + - 4 WALLNURBS NURBS9 6 7 8 11 12 13 16 17 18 MAT 1 KINEM linear EAS none THICK 1.0 + - 5 WALLNURBS NURBS9 7 8 9 12 13 14 17 18 19 MAT 1 KINEM linear EAS none THICK 1.0 + - 6 WALLNURBS NURBS9 8 9 10 13 14 15 18 19 20 MAT 1 KINEM linear EAS none THICK 1.0 + - 7 WALLNURBS NURBS9 11 12 13 16 17 18 21 22 23 MAT 1 KINEM linear EAS none THICK 1.0 + - 8 WALLNURBS NURBS9 12 13 14 17 18 19 22 23 24 MAT 1 KINEM linear EAS none THICK 1.0 + - 9 WALLNURBS NURBS9 13 14 15 18 19 20 23 24 25 MAT 1 KINEM linear EAS none THICK 1.0 + - 10 WALLNURBS NURBS9 16 17 18 21 22 23 26 27 28 MAT 1 KINEM linear EAS none THICK 1.0 + - 11 WALLNURBS NURBS9 17 18 19 22 23 24 27 28 29 MAT 1 KINEM linear EAS none THICK 1.0 + - 12 WALLNURBS NURBS9 18 19 20 23 24 25 28 29 30 MAT 1 KINEM linear EAS none THICK 1.0 + - 13 WALLNURBS NURBS9 21 22 23 26 27 28 31 32 33 MAT 1 KINEM linear EAS none THICK 1.0 + - 14 WALLNURBS NURBS9 22 23 24 27 28 29 32 33 34 MAT 1 KINEM linear EAS none THICK 1.0 + - 15 WALLNURBS NURBS9 23 24 25 28 29 30 33 34 35 MAT 1 KINEM linear EAS none THICK 1.0 STRUCTURE KNOTVECTORS: - NURBS_DIMENSION 2 - BEGIN NURBSPATCH diff --git a/tests/reference-files/test_nurbs_string_types.4C.yaml b/tests/reference-files/test_nurbs_string_types.4C.yaml index 3c905502..03c0401f 100644 --- a/tests/reference-files/test_nurbs_string_types.4C.yaml +++ b/tests/reference-files/test_nurbs_string_types.4C.yaml @@ -89,12 +89,12 @@ NODE COORDS: - CP 19 COORD 0.3333333333333333 1.5 0.0 1.0 - CP 20 COORD 0.5 1.5 0.0 1.0 STRUCTURE ELEMENTS: - - 1 STRING_TYPE NURBS9 1 2 3 6 7 8 11 12 13 MAT 1 STRING_DESCRIPTION - - 2 STRING_TYPE NURBS9 2 3 4 7 8 9 12 13 14 MAT 1 STRING_DESCRIPTION - - 3 STRING_TYPE NURBS9 3 4 5 8 9 10 13 14 15 MAT 1 STRING_DESCRIPTION - - 4 STRING_TYPE NURBS9 6 7 8 11 12 13 16 17 18 MAT 1 STRING_DESCRIPTION - - 5 STRING_TYPE NURBS9 7 8 9 12 13 14 17 18 19 MAT 1 STRING_DESCRIPTION - - 6 STRING_TYPE NURBS9 8 9 10 13 14 15 18 19 20 MAT 1 STRING_DESCRIPTION + - 1 WALLNURBS NURBS9 1 2 3 6 7 8 11 12 13 MAT 1 KINEM linear EAS none THICK 1.0 + - 2 WALLNURBS NURBS9 2 3 4 7 8 9 12 13 14 MAT 1 KINEM linear EAS none THICK 1.0 + - 3 WALLNURBS NURBS9 3 4 5 8 9 10 13 14 15 MAT 1 KINEM linear EAS none THICK 1.0 + - 4 WALLNURBS NURBS9 6 7 8 11 12 13 16 17 18 MAT 1 KINEM linear EAS none THICK 1.0 + - 5 WALLNURBS NURBS9 7 8 9 12 13 14 17 18 19 MAT 1 KINEM linear EAS none THICK 1.0 + - 6 WALLNURBS NURBS9 8 9 10 13 14 15 18 19 20 MAT 1 KINEM linear EAS none THICK 1.0 STRUCTURE KNOTVECTORS: - NURBS_DIMENSION 2 - BEGIN NURBSPATCH diff --git a/tests/test_four_c_simulation.py b/tests/test_four_c_simulation.py index 089d4a0a..40673e14 100644 --- a/tests/test_four_c_simulation.py +++ b/tests/test_four_c_simulation.py @@ -79,9 +79,8 @@ def create_cantilever_model(n_steps, time_step=0.5): input_file = InputFile() set_header_static(input_file, time_step=time_step, n_steps=n_steps) - input_file.add( - {"IO": {"OUTPUT_BIN": True, "STRUCT_DISP": True}}, option_overwrite=True - ) + input_file["IO"]["OUTPUT_BIN"] = True + input_file["IO"]["STRUCT_DISP"] = True mesh = Mesh() ft = Function( @@ -127,7 +126,7 @@ def run_four_c_test( # Create input file. input_file_name = os.path.join(testing_dir, name + ".4C.yaml") - input_file.write_input_file(input_file_name, add_header_information=False, **kwargs) + input_file.dump(input_file_name, add_header_information=False, **kwargs) return_code = run_four_c( input_file_name, @@ -170,35 +169,32 @@ def test_four_c_simulation_honeycomb_sphere( input_file.add(mesh) # Modify the time step options. - input_file.add( - {"STRUCTURAL DYNAMIC": {"NUMSTEP": 5, "TIMESTEP": 0.2}}, - option_overwrite=True, - ) + input_file["STRUCTURAL DYNAMIC"]["NUMSTEP"] = 5 + input_file["STRUCTURAL DYNAMIC"]["TIMESTEP"] = 0.2 # Delete the results given in the input file. - input_file.delete_section("RESULT DESCRIPTION") + input_file.pop("RESULT DESCRIPTION") # Add result checks. displacement = [0.0, -8.09347204109101170, 2.89298005937795688] + result_descriptions = [] nodes = [268, 188, 182] for node in nodes: for i, direction in enumerate(["x", "y", "z"]): - input_file.add( + result_descriptions.append( { - "RESULT DESCRIPTION": [ - { - "STRUCTURE": { - "DIS": "structure", - "NODE": node, - "QUANTITY": f"disp{direction}", - "VALUE": displacement[i], - "TOLERANCE": "1e-10", - }, - } - ] + "STRUCTURE": { + "DIS": "structure", + "NODE": node, + "QUANTITY": f"disp{direction}", + "VALUE": displacement[i], + "TOLERANCE": 1e-10, + }, } ) + input_file.add({"RESULT DESCRIPTION": result_descriptions}) + # Material for the beam. material = MaterialReissner(youngs_modulus=2.07e2, radius=0.1, shear_correction=1.1) @@ -467,17 +463,15 @@ def test_four_c_simulation_honeycomb_variants( ) # Check that we can overwrite keys - input_file.add({"STRUCTURAL DYNAMIC": {"NUMSTEP": 1}}, option_overwrite=True) + input_file["STRUCTURAL DYNAMIC"]["NUMSTEP"] = 1 - # This works, because the overwritten key is the same - input_file.add({"STRUCTURAL DYNAMIC": {"NUMSTEP": 1}}, option_overwrite=False) + # This does not work, because we would overwrite the entire section. + with pytest.raises(ValueError) as error: + input_file.add({"STRUCTURAL DYNAMIC": {"NUMSTEP": "something"}}) - # This does not work, because we change a key without the option_overwrite flag - with pytest.raises( - KeyError, - match="Key NUMSTEP with the value", - ): - input_file.add({"STRUCTURAL DYNAMIC": {"NUMSTEP": 123}}, option_overwrite=False) + assert str(error.value) == ( + "Section(s) STRUCTURAL DYNAMIC are defined in both InputFile objects. In order to join the InputFile objects remove the section(s) in one of them." + ) # Create four meshes with different types of honeycomb structure. mesh = Mesh() @@ -926,7 +920,7 @@ def test_four_c_simulation_dirichlet_boundary_to_neumann_boundary_with_all_value "VAL": [ 0, 0, - 0.25 * np.sin(node.coordinates[0] * np.pi), + float(0.25 * np.sin(node.coordinates[0] * np.pi)), 0, 0, 0, diff --git a/tests/test_header_functions.py b/tests/test_header_functions.py index 4b5569a7..69a03ea4 100644 --- a/tests/test_header_functions.py +++ b/tests/test_header_functions.py @@ -62,17 +62,8 @@ def test_header_functions_static( input_file, mpy.beam_to_solid.surface_meshtying, contact_discretization="gp", - segmentation_search_points=6, coupling_type="consistent_fad", - ) - - # This is to test that the overwrite_option argument is handled correctly - set_beam_to_solid_meshtying( - input_file, - mpy.beam_to_solid.surface_meshtying, - contact_discretization="gp", segmentation=False, - option_overwrite=True, ) # Check the output. diff --git a/tests/test_meshpy.py b/tests/test_meshpy.py index a6e0c4f3..1bf5541b 100644 --- a/tests/test_meshpy.py +++ b/tests/test_meshpy.py @@ -536,13 +536,14 @@ def test_meshpy_reissner_elasto_plastic(assert_results_equal): mat = MaterialReissnerElastoplastic(**kwargs) mat.i_global = 69 - assert_results_equal(mat.dump_to_list(), [ref_dict]) + + assert_results_equal(mat.dump_to_list(), ref_dict) ref_dict["MAT_BeamReissnerElastPlastic"]["TORSIONPLAST"] = True kwargs["torsion_plasticity"] = True mat = MaterialReissnerElastoplastic(**kwargs) mat.i_global = 69 - assert_results_equal(mat.dump_to_list(), [ref_dict]) + assert_results_equal(mat.dump_to_list(), ref_dict) def test_meshpy_kirchhoff_beam( @@ -615,64 +616,58 @@ def set_stiff(material): set_stiff(material) assert_results_equal( material.dump_to_list(), - [ - { - "MAT": None, - "MAT_BeamKirchhoffElastHyper": { - "YOUNG": 1000, - "SHEARMOD": 500.0, - "DENS": 0.0, - "CROSSAREA": 2.0, - "MOMINPOL": 5.0, - "MOMIN2": 3.0, - "MOMIN3": 4.0, - "FAD": True, - }, - } - ], + { + "MAT": None, + "MAT_BeamKirchhoffElastHyper": { + "YOUNG": 1000, + "SHEARMOD": 500.0, + "DENS": 0.0, + "CROSSAREA": 2.0, + "MOMINPOL": 5.0, + "MOMIN2": 3.0, + "MOMIN3": 4.0, + "FAD": True, + }, + }, ) material = MaterialKirchhoff(youngs_modulus=1000, is_fad=False) set_stiff(material) assert_results_equal( material.dump_to_list(), - [ - { - "MAT": None, - "MAT_BeamKirchhoffElastHyper": { - "YOUNG": 1000, - "SHEARMOD": 500.0, - "DENS": 0.0, - "CROSSAREA": 2.0, - "MOMINPOL": 5.0, - "MOMIN2": 3.0, - "MOMIN3": 4.0, - "FAD": False, - }, - } - ], + { + "MAT": None, + "MAT_BeamKirchhoffElastHyper": { + "YOUNG": 1000, + "SHEARMOD": 500.0, + "DENS": 0.0, + "CROSSAREA": 2.0, + "MOMINPOL": 5.0, + "MOMIN2": 3.0, + "MOMIN3": 4.0, + "FAD": False, + }, + }, ) material = MaterialKirchhoff(youngs_modulus=1000, interaction_radius=1.1) set_stiff(material) assert_results_equal( material.dump_to_list(), - [ - { - "MAT": None, - "MAT_BeamKirchhoffElastHyper": { - "YOUNG": 1000, - "SHEARMOD": 500.0, - "DENS": 0.0, - "CROSSAREA": 2.0, - "MOMINPOL": 5.0, - "MOMIN2": 3.0, - "MOMIN3": 4.0, - "FAD": False, - "INTERACTIONRADIUS": 1.1, - }, - } - ], + { + "MAT": None, + "MAT_BeamKirchhoffElastHyper": { + "YOUNG": 1000, + "SHEARMOD": 500.0, + "DENS": 0.0, + "CROSSAREA": 2.0, + "MOMINPOL": 5.0, + "MOMIN2": 3.0, + "MOMIN3": 4.0, + "FAD": False, + "INTERACTIONRADIUS": 1.1, + }, + }, ) @@ -1288,13 +1283,14 @@ def test_meshpy_nurbs_import( ) ) + input_file.pop("PROBLEM TYPE") + set_header_static( input_file, time_step=0.5, n_steps=2, tol_residuum=1e-14, tol_increment=1e-8, - option_overwrite=True, ) set_beam_to_solid_meshtying( input_file, @@ -1310,16 +1306,10 @@ def test_meshpy_nurbs_import( }, ) set_runtime_output(input_file, output_solid=False) - input_file.add( - { - "IO": { - "OUTPUT_BIN": True, - "STRUCT_DISP": True, - "VERBOSITY": "Standard", - } - }, - option_overwrite=True, - ) + input_file["PROBLEM TYPE"]["SHAPEFCT"] = "Nurbs" + input_file["IO"]["OUTPUT_BIN"] = True + input_file["IO"]["STRUCT_DISP"] = True + input_file["IO"]["VERBOSITY"] = "Standard" fun = Function([{"COMPONENT": 0, "SYMBOLIC_FUNCTION_OF_SPACE_TIME": "t"}]) mesh.add(fun) diff --git a/tests/test_nurbs.py b/tests/test_nurbs.py index c7f31b35..ac2c9fa4 100644 --- a/tests/test_nurbs.py +++ b/tests/test_nurbs.py @@ -55,9 +55,13 @@ def test_nurbs_hollow_cylinder_segment_2d( mat = MaterialStVenantKirchhoff(youngs_modulus=50, nu=0.19, density=5.3e-7) # Create patch set - element_description = ( - "KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" - ) + element_description = { + "KINEM": "linear", + "EAS": "none", + "THICK": 1.0, + "STRESS_STRAIN": "plane_strain", + "GP": [3, 3], + } patch_set = add_geomdl_nurbs_to_mesh( mesh, @@ -87,9 +91,13 @@ def test_nurbs_flat_plate_2d( mat = MaterialStVenantKirchhoff(youngs_modulus=710, nu=0.19, density=5.3e-7) # Create patch set - element_description = ( - "KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" - ) + element_description = { + "KINEM": "linear", + "EAS": "none", + "THICK": 1.0, + "STRESS_STRAIN": "plane_strain", + "GP": [3, 3], + } patch_set = add_geomdl_nurbs_to_mesh( mesh, @@ -117,13 +125,10 @@ def test_nurbs_brick(assert_results_equal, get_corresponding_reference_file_path mat = MaterialStVenantKirchhoff(youngs_modulus=710, nu=0.19, density=5.3e-7) # Create patch set - element_description = "GP 3 3 3" - patch_set = add_geomdl_nurbs_to_mesh( mesh, vol_obj, material=mat, - element_description=element_description, ) mesh.add(patch_set) @@ -148,9 +153,13 @@ def test_nurbs_rotation_nurbs_surface( # Create patch set mat = MaterialStVenantKirchhoff(youngs_modulus=650, nu=0.20, density=4.2e-7) - element_description = ( - "KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" - ) + element_description = { + "KINEM": "linear", + "EAS": "none", + "THICK": 1.0, + "STRESS_STRAIN": "plane_strain", + "GP": [3, 3], + } patch_set = add_geomdl_nurbs_to_mesh( mesh, @@ -181,9 +190,13 @@ def test_nurbs_translate_nurbs_surface( # Create patch set mat = MaterialStVenantKirchhoff(youngs_modulus=430, nu=0.10, density=4.2e-7) - element_description = ( - "KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" - ) + element_description = { + "KINEM": "linear", + "EAS": "none", + "THICK": 1.0, + "STRESS_STRAIN": "plane_strain", + "GP": [3, 3], + } patch_set = add_geomdl_nurbs_to_mesh( mesh, @@ -221,7 +234,7 @@ def test_nurbs_cylindrical_shell_sector( mesh, surf_obj, material=mat, - element_description="dummy", + element_description={"KINEM": "linear", "EAS": "none", "THICK": 1.0}, ) mesh.add(patch_set) @@ -246,9 +259,13 @@ def test_nurbs_couple_nurbs_meshes( # Create first patch set mat = MaterialStVenantKirchhoff(youngs_modulus=430, nu=0.10, density=4.2e-7) - element_description = ( - "KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" - ) + element_description = { + "KINEM": "linear", + "EAS": "none", + "THICK": 1.0, + "STRESS_STRAIN": "plane_strain", + "GP": [3, 3], + } patch_set_1 = add_geomdl_nurbs_to_mesh( mesh, @@ -295,9 +312,13 @@ def test_nurbs_sphere_surface( # Create first patch set mat = MaterialStVenantKirchhoff() - element_description = ( - "KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" - ) + element_description = { + "KINEM": "linear", + "EAS": "none", + "THICK": 1.0, + "STRESS_STRAIN": "plane_strain", + "GP": [3, 3], + } patch_set = add_geomdl_nurbs_to_mesh( mesh, @@ -331,8 +352,8 @@ def test_nurbs_string_types( mesh, surf_obj, material=mat, - element_string="STRING_TYPE", - element_description="STRING_DESCRIPTION", + element_string="WALLNURBS", + element_description={"KINEM": "linear", "EAS": "none", "THICK": 1.0}, ) mesh.add(patch_set) @@ -355,9 +376,13 @@ def test_nurbs_hemisphere_surface( # Create first patch set mat = MaterialStVenantKirchhoff() - element_description = ( - "KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" - ) + element_description = { + "KINEM": "linear", + "EAS": "none", + "THICK": 1.0, + "STRESS_STRAIN": "plane_strain", + "GP": [3, 3], + } # Add the patch sets of every surface section of the hemisphere to the input file for surf in surfs: @@ -388,7 +413,13 @@ def test_nurbs_torus_surface( # Define material and element description mat = MaterialStVenantKirchhoff() - dummy_string = "KINEM linear EAS none THICK 1.0 STRESS_STRAIN plane_strain GP 3 3" + element_description = { + "KINEM": "linear", + "EAS": "none", + "THICK": 1.0, + "STRESS_STRAIN": "plane_strain", + "GP": [3, 3], + } # Add the patch sets of every surface section of the torus to the input file for surf in surfs: @@ -396,7 +427,7 @@ def test_nurbs_torus_surface( mesh, surf, material=mat, - element_description=dummy_string, + element_description=element_description, ) mesh.add(patch_set) diff --git a/tests/test_performance.py b/tests/test_performance.py index 3c9b8eb4..5a8f1d89 100644 --- a/tests/test_performance.py +++ b/tests/test_performance.py @@ -296,7 +296,7 @@ def test_performance(tmp_path): ) test_performance.time_function( - "meshpy_write_dat", InputFile.write_input_file, args=[mesh, testing_beam] + "meshpy_write_dat", InputFile.dump, args=[mesh, testing_beam] ) # Use a smaller mesh for shorter times in vtk testing diff --git a/tutorial/tutorial.py b/tutorial/tutorial.py index 7c4c7d4b..cd40c33a 100644 --- a/tutorial/tutorial.py +++ b/tutorial/tutorial.py @@ -310,4 +310,4 @@ def beam_sinus(t): # Adapt this path to the directory you want to store the tutorial files in. tutorial_directory = "" input_file = meshpy_tutorial(tutorial_directory) - input_file.write_input_file(os.path.join(tutorial_directory, "tutorial.4C.yaml")) + input_file.dump(os.path.join(tutorial_directory, "tutorial.4C.yaml")) From b4cb809b41d709debd93118c8250fd1619acc174 Mon Sep 17 00:00:00 2001 From: David Rudlstorfer Date: Tue, 20 May 2025 12:21:25 +0200 Subject: [PATCH 2/6] Use new FourCIPP type converter --- pyproject.toml | 2 +- src/meshpy/core/node.py | 10 ++---- src/meshpy/core/nurbs_patch.py | 18 +++-------- src/meshpy/four_c/element_beam.py | 26 +++++----------- src/meshpy/four_c/input_file.py | 51 +++++++++++-------------------- tests/test_four_c_simulation.py | 2 +- 6 files changed, 34 insertions(+), 75 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ff53d35c..379759c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dynamic = ["version"] [project.optional-dependencies] cubitpy = ["cubitpy@git+https://github.com/imcs-compsim/cubitpy.git@main"] -fourc = ["fourcipp@git+https://github.com/4c-multiphysics/fourcipp.git@main"] +fourc = ["fourcipp@git+https://github.com/davidrudlstorfer/fourcipp.git@add_type_converter"] dev = [ "coverage-badge", "coverage", diff --git a/src/meshpy/core/node.py b/src/meshpy/core/node.py index 91af99af..7eb051a5 100644 --- a/src/meshpy/core/node.py +++ b/src/meshpy/core/node.py @@ -96,12 +96,9 @@ def rotate(self, *args, **kwargs): def dump_to_list(self): """Return a list with the legacy string representing this node.""" - # TODO here a numpy data type is converted to a standard Python - # data type. Once FourCIPP can handle non standard data types, - # this should be removed. return { "id": self.i_global, - "COORD": self.coordinates.tolist(), + "COORD": self.coordinates, "data": {"type": "NODE"}, } @@ -152,11 +149,8 @@ def dump_to_list(self): """Return a list with the legacy string representing this control point.""" - # TODO here a numpy data type is converted to a standard Python - # data type. Once FourCIPP can handle non standard data types, - # this should be removed. return { "id": self.i_global, - "COORD": self.coordinates.tolist(), + "COORD": self.coordinates, "data": {"type": "CP", "weight": self.weight}, } diff --git a/src/meshpy/core/nurbs_patch.py b/src/meshpy/core/nurbs_patch.py index b48e0d7b..e30862aa 100644 --- a/src/meshpy/core/nurbs_patch.py +++ b/src/meshpy/core/nurbs_patch.py @@ -108,7 +108,7 @@ def dump_element_specific_section(self, input_file): "DEGREE": self.polynomial_orders[dir_manifold], "TYPE": knotvector_type, "knots": [ - float(knot_vector_val) + knot_vector_val for knot_vector_val in self.knot_vectors[dir_manifold] ], } @@ -208,18 +208,15 @@ def get_ids_ctrlpts_surface(knot_span_u, knot_span_v): ): element_cps_ids = get_ids_ctrlpts_surface(knot_span_u, knot_span_v) - connectivity = [int(self.nodes[i].i_global) for i in element_cps_ids] + connectivity = [self.nodes[i].i_global for i in element_cps_ids] num_cp_in_element = (self.polynomial_orders[0] + 1) * ( self.polynomial_orders[1] + 1 ) - # TODO here a numpy data type is converted to a standard Python - # data type. Once FourCIPP can handle non standard data types, - # this should be removed. patch_elements.append( { - "id": int(self.i_global + j), + "id": self.i_global + j, "cell": { "type": f"NURBS{num_cp_in_element}", "connectivity": connectivity, @@ -308,9 +305,7 @@ def get_ids_ctrlpts_volume(knot_span_u, knot_span_v, knot_span_w): knot_span_u, knot_span_v, knot_span_w ) - connectivity = [ - int(self.nodes[i].i_global) for i in element_cps_ids - ] + connectivity = [self.nodes[i].i_global for i in element_cps_ids] num_cp_in_element = ( (self.polynomial_orders[0] + 1) @@ -318,12 +313,9 @@ def get_ids_ctrlpts_volume(knot_span_u, knot_span_v, knot_span_w): * (self.polynomial_orders[2] + 1) ) - # TODO here a numpy data type is converted to a standard Python - # data type. Once FourCIPP can handle non standard data types, - # this should be removed. patch_elements.append( { - "id": int(self.i_global + increment_ele), + "id": self.i_global + increment_ele, "cell": { "type": f"NURBS{num_cp_in_element}", "connectivity": connectivity, diff --git a/src/meshpy/four_c/element_beam.py b/src/meshpy/four_c/element_beam.py index 1936b461..2b654b9b 100644 --- a/src/meshpy/four_c/element_beam.py +++ b/src/meshpy/four_c/element_beam.py @@ -51,20 +51,17 @@ def dump_to_list(self): # Check the material. self._check_material() - # TODO here a numpy data type is converted to a standard Python - # data type. Once FourCIPP can handle non standard data types, - # this should be removed. return { "id": self.i_global, "cell": { "type": "HERM2LINE3", - "connectivity": [int(self.nodes[i].i_global) for i in [0, 2, 1]], + "connectivity": [self.nodes[i].i_global for i in [0, 2, 1]], }, "data": { "type": "BEAM3R", "MAT": self.material.i_global, "TRIADS": [ - float(item) + item for i in [0, 2, 1] for item in self.nodes[i].rotation.get_rotation_vector() ], @@ -89,20 +86,17 @@ def dump_to_list(self): # Check the material. self._check_material() - # TODO here a numpy data type is converted to a standard Python - # data type. Once FourCIPP can handle non standard data types, - # this should be removed. return { "id": self.i_global, "cell": { "type": "LINE2", - "connectivity": [int(self.nodes[i].i_global) for i in [0, 1]], + "connectivity": [self.nodes[i].i_global for i in [0, 1]], }, "data": { "type": "BEAM3R", "MAT": self.material.i_global, "TRIADS": [ - float(item) + item for i in [0, 1] for item in self.nodes[i].rotation.get_rotation_vector() ], @@ -141,14 +135,11 @@ def dump_to_list(self): # Check the material. self._check_material() - # TODO here a numpy data type is converted to a standard Python - # data type. Once FourCIPP can handle non standard data types, - # this should be removed. return { "id": self.i_global, "cell": { "type": "LINE3", - "connectivity": [int(self.nodes[i].i_global) for i in [0, 2, 1]], + "connectivity": [self.nodes[i].i_global for i in [0, 2, 1]], }, "data": { "type": "BEAM3K", @@ -156,7 +147,7 @@ def dump_to_list(self): "ROTVEC": 1 if self.rotvec else 0, "MAT": self.material.i_global, "TRIADS": [ - float(item) + item for i in [0, 2, 1] for item in self.nodes[i].rotation.get_rotation_vector() ], @@ -210,14 +201,11 @@ def dump_to_list(self): "The rotations do not match the direction of the Euler Bernoulli beam!" ) - # TODO here a numpy data type is converted to a standard Python - # data type. Once FourCIPP can handle non standard data types, - # this should be removed. return { "id": self.i_global, "cell": { "type": "LINE2", - "connectivity": [int(self.nodes[i].i_global) for i in [0, 1]], + "connectivity": [self.nodes[i].i_global for i in [0, 1]], }, "data": { "type": "BEAM3EB", diff --git a/src/meshpy/four_c/input_file.py b/src/meshpy/four_c/input_file.py index 48cebc82..26f6ce08 100644 --- a/src/meshpy/four_c/input_file.py +++ b/src/meshpy/four_c/input_file.py @@ -114,10 +114,17 @@ class InputFile(_FourCInput): def __init__(self, sections=None): """Initialize the input file.""" + super().__init__(sections=sections) + # Contents of NOX xml file. self.nox_xml_contents = "" - super().__init__(sections=sections) + # Register converters to directly convert non-primitive types + # to native Python types via the FourCIPP type converter. + self.type_converter.register_numpy_types() + self.type_converter.register_type( + _Function, lambda converter, obj: obj.i_global + ) def add(self, object_to_add, **kwargs): """Add a mesh or a dictionary to the input file. @@ -131,7 +138,7 @@ def add(self, object_to_add, **kwargs): self.add_mesh_to_input_file(mesh=object_to_add, **kwargs) else: - super().combine_sections(object_to_add, **kwargs) + super().combine_sections(object_to_add) def dump( self, @@ -336,36 +343,10 @@ def _dump_mesh_items(section_name, data_list): elif hasattr(item, "dump_to_list"): list.append(item.dump_to_list()) elif isinstance(item, _BoundaryCondition): - # Here we need to convert the function objects to their - # global index. - - def convert_function_field(key, value): - """Convert function objects in boundary condititions to - their global index. - - TODO improve this approach - """ - - if key != "FUNCT": - return value - - if isinstance(value, _List): - return [ - v.i_global if isinstance(v, _Function) else v - for v in value - ] - if isinstance(value, _Function): - return value.i_global - else: - return value - list.append( { "E": item.geometry_set.i_global, - **{ - key: convert_function_field(key, value) - for key, value in item.data.items() - }, + **item.data, } ) @@ -374,11 +355,15 @@ def convert_function_field(key, value): else: raise TypeError(f"Could not dump {item}") + # If section already exists, retrieve from input file and + # add newly. We always need to go through fourcipp to convert + # the data types correctly. if section_name in self.sections: - # If the section already exists, append the new data to it. - self.sections[section_name].extend(list) - else: - self.add({section_name: list}) + existing_entries = self.pop(section_name) + existing_entries.extend(list) + list = existing_entries + + self.add({section_name: list}) # Add sets from couplings and boundary conditions to a temp container. mesh.unlink_nodes() diff --git a/tests/test_four_c_simulation.py b/tests/test_four_c_simulation.py index 40673e14..8c574ddb 100644 --- a/tests/test_four_c_simulation.py +++ b/tests/test_four_c_simulation.py @@ -920,7 +920,7 @@ def test_four_c_simulation_dirichlet_boundary_to_neumann_boundary_with_all_value "VAL": [ 0, 0, - float(0.25 * np.sin(node.coordinates[0] * np.pi)), + 0.25 * np.sin(node.coordinates[0] * np.pi), 0, 0, 0, From e040999e96df8c4de45b30d1a0d036df4fdecfab Mon Sep 17 00:00:00 2001 From: David Rudlstorfer Date: Wed, 21 May 2025 10:39:57 +0200 Subject: [PATCH 3/6] Review comments --- src/meshpy/four_c/input_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meshpy/four_c/input_file.py b/src/meshpy/four_c/input_file.py index 26f6ce08..c54cfbb1 100644 --- a/src/meshpy/four_c/input_file.py +++ b/src/meshpy/four_c/input_file.py @@ -196,7 +196,7 @@ def dump( # Add information header to the input file if add_header_information: - self.sections["TITLE"] = self._get_header() + self.add({"TITLE": self._get_header()}) super().dump( input_file_path=input_file_path, From 426f3f58688ebd6a3fe509ab17748bceeeaf735d Mon Sep 17 00:00:00 2001 From: David Rudlstorfer Date: Wed, 21 May 2025 10:45:28 +0200 Subject: [PATCH 4/6] Move fourcipp to main repo again --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 379759c4..b6290239 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dynamic = ["version"] [project.optional-dependencies] cubitpy = ["cubitpy@git+https://github.com/imcs-compsim/cubitpy.git@main"] -fourc = ["fourcipp@git+https://github.com/davidrudlstorfer/fourcipp.git@add_type_converter"] +fourc = ["fourcipp@git+https://github.com/4C-multiphysics/fourcipp.git@main"] dev = [ "coverage-badge", "coverage", From f1c0aa67f90c0a87787e14822d832d142390a92d Mon Sep 17 00:00:00 2001 From: David Rudlstorfer Date: Mon, 26 May 2025 14:01:52 +0200 Subject: [PATCH 5/6] fix: convert nurbs knots to strings Follows https://github.com/4C-multiphysics/4C/pull/802 Follows https://github.com/4C-multiphysics/fourcipp/pull/55 --- .../test_meshpy_nurbs_import.4C.yaml | 108 ++-- ...est_meshpy_nurbs_import_solid_mesh.4C.yaml | 108 ++-- .../reference-files/test_nurbs_brick.4C.yaml | 48 +- .../test_nurbs_couple_nurbs_meshes.4C.yaml | 60 +-- ...est_nurbs_cylindrical_shell_sector.4C.yaml | 36 +- .../test_nurbs_flat_plate_2d.4C.yaml | 34 +- .../test_nurbs_hemisphere_surface.4C.yaml | 140 ++--- ...t_nurbs_hollow_cylinder_segment_2d.4C.yaml | 30 +- .../test_nurbs_rotation_nurbs_surface.4C.yaml | 34 +- .../test_nurbs_sphere_surface.4C.yaml | 30 +- .../test_nurbs_string_types.4C.yaml | 30 +- .../test_nurbs_torus_surface.4C.yaml | 480 +++++++++--------- ...test_nurbs_translate_nurbs_surface.4C.yaml | 30 +- 13 files changed, 584 insertions(+), 584 deletions(-) diff --git a/tests/reference-files/test_meshpy_nurbs_import.4C.yaml b/tests/reference-files/test_meshpy_nurbs_import.4C.yaml index ef4a7949..d5fa1216 100644 --- a/tests/reference-files/test_meshpy_nurbs_import.4C.yaml +++ b/tests/reference-files/test_meshpy_nurbs_import.4C.yaml @@ -752,88 +752,88 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - BEGIN NURBSPATCH - ID 2 - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - BEGIN NURBSPATCH - ID 3 - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_meshpy_nurbs_import_solid_mesh.4C.yaml b/tests/reference-files/test_meshpy_nurbs_import_solid_mesh.4C.yaml index 5c18284a..5c9d59c7 100644 --- a/tests/reference-files/test_meshpy_nurbs_import_solid_mesh.4C.yaml +++ b/tests/reference-files/test_meshpy_nurbs_import_solid_mesh.4C.yaml @@ -495,88 +495,88 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - BEGIN NURBSPATCH - ID 2 - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - BEGIN NURBSPATCH - ID 3 - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 6 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_brick.4C.yaml b/tests/reference-files/test_nurbs_brick.4C.yaml index 426e4329..0866d05b 100644 --- a/tests/reference-files/test_nurbs_brick.4C.yaml +++ b/tests/reference-files/test_nurbs_brick.4C.yaml @@ -497,34 +497,34 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 9 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.25 - - 0.5 - - 0.75 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.25' + - '0.5' + - '0.75' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_couple_nurbs_meshes.4C.yaml b/tests/reference-files/test_nurbs_couple_nurbs_meshes.4C.yaml index e7b6fb90..f4c0b9a0 100644 --- a/tests/reference-files/test_nurbs_couple_nurbs_meshes.4C.yaml +++ b/tests/reference-files/test_nurbs_couple_nurbs_meshes.4C.yaml @@ -184,24 +184,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -209,22 +209,22 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_cylindrical_shell_sector.4C.yaml b/tests/reference-files/test_nurbs_cylindrical_shell_sector.4C.yaml index 868706df..fd7ca3d7 100644 --- a/tests/reference-files/test_nurbs_cylindrical_shell_sector.4C.yaml +++ b/tests/reference-files/test_nurbs_cylindrical_shell_sector.4C.yaml @@ -153,25 +153,25 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 10 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.2 - - 0.4 - - 0.6000000000000001 - - 0.8 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.2' + - '0.4' + - '0.6000000000000001' + - '0.8' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_flat_plate_2d.4C.yaml b/tests/reference-files/test_nurbs_flat_plate_2d.4C.yaml index cdd6d8fa..808e7ddc 100644 --- a/tests/reference-files/test_nurbs_flat_plate_2d.4C.yaml +++ b/tests/reference-files/test_nurbs_flat_plate_2d.4C.yaml @@ -130,24 +130,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 10 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.2 - - 0.4 - - 0.6000000000000001 - - 0.8 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.2' + - '0.4' + - '0.6000000000000001' + - '0.8' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_hemisphere_surface.4C.yaml b/tests/reference-files/test_nurbs_hemisphere_surface.4C.yaml index adabb54a..606ef65e 100644 --- a/tests/reference-files/test_nurbs_hemisphere_surface.4C.yaml +++ b/tests/reference-files/test_nurbs_hemisphere_surface.4C.yaml @@ -376,23 +376,23 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -400,23 +400,23 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -424,23 +424,23 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -448,23 +448,23 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -472,21 +472,21 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_hollow_cylinder_segment_2d.4C.yaml b/tests/reference-files/test_nurbs_hollow_cylinder_segment_2d.4C.yaml index e5d94f3e..754795dd 100644 --- a/tests/reference-files/test_nurbs_hollow_cylinder_segment_2d.4C.yaml +++ b/tests/reference-files/test_nurbs_hollow_cylinder_segment_2d.4C.yaml @@ -102,22 +102,22 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_rotation_nurbs_surface.4C.yaml b/tests/reference-files/test_nurbs_rotation_nurbs_surface.4C.yaml index c7ad7b67..e96450e0 100644 --- a/tests/reference-files/test_nurbs_rotation_nurbs_surface.4C.yaml +++ b/tests/reference-files/test_nurbs_rotation_nurbs_surface.4C.yaml @@ -130,24 +130,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 10 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.2 - - 0.4 - - 0.6000000000000001 - - 0.8 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.2' + - '0.4' + - '0.6000000000000001' + - '0.8' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_sphere_surface.4C.yaml b/tests/reference-files/test_nurbs_sphere_surface.4C.yaml index 47de9973..e9a5a732 100644 --- a/tests/reference-files/test_nurbs_sphere_surface.4C.yaml +++ b/tests/reference-files/test_nurbs_sphere_surface.4C.yaml @@ -102,22 +102,22 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_string_types.4C.yaml b/tests/reference-files/test_nurbs_string_types.4C.yaml index 03c0401f..f6588e6c 100644 --- a/tests/reference-files/test_nurbs_string_types.4C.yaml +++ b/tests/reference-files/test_nurbs_string_types.4C.yaml @@ -102,22 +102,22 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_torus_surface.4C.yaml b/tests/reference-files/test_nurbs_torus_surface.4C.yaml index ed3d4581..7878a3f0 100644 --- a/tests/reference-files/test_nurbs_torus_surface.4C.yaml +++ b/tests/reference-files/test_nurbs_torus_surface.4C.yaml @@ -1392,24 +1392,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1417,24 +1417,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1442,24 +1442,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1467,24 +1467,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1492,24 +1492,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1517,24 +1517,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1542,24 +1542,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1567,24 +1567,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1592,24 +1592,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1617,24 +1617,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1642,24 +1642,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1667,24 +1667,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1692,24 +1692,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1717,24 +1717,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1742,24 +1742,24 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH - NURBS_DIMENSION 2 - BEGIN NURBSPATCH @@ -1767,22 +1767,22 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH diff --git a/tests/reference-files/test_nurbs_translate_nurbs_surface.4C.yaml b/tests/reference-files/test_nurbs_translate_nurbs_surface.4C.yaml index 21ebf017..67baf5cf 100644 --- a/tests/reference-files/test_nurbs_translate_nurbs_surface.4C.yaml +++ b/tests/reference-files/test_nurbs_translate_nurbs_surface.4C.yaml @@ -102,22 +102,22 @@ STRUCTURE KNOTVECTORS: - NUMKNOTS 7 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.5 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.5' + - '1.0' + - '1.0' + - '1.0' - NUMKNOTS 8 - DEGREE 2 - TYPE Interpolated - - 0.0 - - 0.0 - - 0.0 - - 0.3333333333333333 - - 0.6666666666666666 - - 1.0 - - 1.0 - - 1.0 + - '0.0' + - '0.0' + - '0.0' + - '0.3333333333333333' + - '0.6666666666666666' + - '1.0' + - '1.0' + - '1.0' - END NURBSPATCH From ae689a6706a87ff2283f523626d27b130d7fc847 Mon Sep 17 00:00:00 2001 From: David Rudlstorfer Date: Wed, 28 May 2025 15:30:57 +0200 Subject: [PATCH 6/6] Rework testing infrastructure --- tests/conftest.py | 234 +++++++++++++++++----------------------------- 1 file changed, 88 insertions(+), 146 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a6556392..e1ad1158 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,7 +27,7 @@ import subprocess from difflib import unified_diff from pathlib import Path -from typing import Callable, Dict, Optional, Union +from typing import Any, Callable, Dict, Optional, Union import numpy as np import pytest @@ -257,6 +257,67 @@ def _get_corresponding_reference_file_path( return _get_corresponding_reference_file_path +def custom_compare( + obj: Any, reference_obj: Any, rtol: float, atol: float +) -> bool | None: + """Custom comparison function for the FourCIPP + compare_nested_dicts_or_lists function. + + Comparison between two objects, either lists or numpy arrays. + + Args: + obj: The object to compare. + reference_obj: The reference object to compare against. + + Returns: + True if the objects are equal, otherwise raises an AssertionError. + If no comparison took place, None is returned. + """ + + if isinstance(obj, np.ndarray) or isinstance(reference_obj, np.ndarray): + if not np.allclose(obj, reference_obj, rtol=rtol, atol=atol): + raise AssertionError( + f"Custom MeshPy comparison failed!\n\nThe objects are not equal:\n\nobj: {obj}\n\nreference_obj: {reference_obj}" + ) + return True + + return None + + +def get_raw_data(obj: Any, get_string: Callable) -> dict | list | np.ndarray: + """Get the raw data for a given object. + + Args: + obj: The object to get the raw data from. + + Returns: + The raw data (either a dictionary, list, numpy array). + """ + + if isinstance(obj, Mesh): + # Internally convert Mesh to InputFile to allow for simple comparison via dictionary + # TODO this should be improved in the future to not fall back to use the 4C specific InputFile + input_file = InputFile() + input_file.add(obj) + obj = input_file + return obj.sections + + elif isinstance(obj, InputFile): + return obj.sections + + elif isinstance(obj, (dict, list, np.ndarray)): + return obj + + elif isinstance(obj, Path) and obj.name.endswith(".4C.yaml"): + return InputFile().from_4C_yaml(input_file_path=obj).sections + + elif isinstance(obj, Path) and obj.suffix == ".json": + return json.loads(get_string(obj)) + + else: + raise TypeError(f"The comparison for {type(obj)} is not yet implemented.") + + @pytest.fixture(scope="function") def assert_results_equal(get_string, tmp_path, current_test_name) -> Callable: """Return function to compare either string or files. @@ -273,10 +334,10 @@ def assert_results_equal(get_string, tmp_path, current_test_name) -> Callable: """ def _assert_results_equal( - reference: Union[Path, str, dict, InputFile, Mesh], - result: Union[Path, str, dict, InputFile, Mesh], - rtol: Optional[float] = 1e-05, - atol: Optional[float] = 1e-08, + reference: Union[Path, str, dict, list, np.ndarray, InputFile, Mesh], + result: Union[Path, str, dict, list, np.ndarray, InputFile, Mesh], + rtol: float = 1e-05, + atol: float = 1e-08, **kwargs, ) -> None: """Comparison between reference and result with relative or absolute @@ -291,11 +352,6 @@ def _assert_results_equal( atol: The absolute tolerance. """ - # Per default we do a string comparison of the objects. Some data types, e.g., - # vtu files or hdf5 data structures require special comparison functions. - # We first check if a special case is needed, if not we default to the - # string comparison. - if isinstance(reference, Path) and isinstance(result, Path): if reference.suffix != result.suffix: raise RuntimeError( @@ -309,158 +365,44 @@ def _assert_results_equal( f"Comparison is not yet implemented for {reference.suffix} files." ) - # Dictionary comparison - if isinstance(reference, dict) or isinstance(result, dict): - - def sanitize(obj): - """Sanitize the object for comparison. + if isinstance(reference, str) or isinstance(result, str): + reference_string = get_string(reference) + result_string = get_string(result) - Currently the FourCIPP function cannot handle numpy - arrays. TODO add this functionality to FourCIPP and - remove from here. - """ - - if isinstance(obj, np.ndarray): - return obj.tolist() - elif isinstance(obj, dict): - return {k: sanitize(v) for k, v in obj.items()} - elif isinstance(obj, list): - return [sanitize(i) for i in obj] - else: - return obj - - def get_dictionary(data) -> dict: - """Get the dictionary representation of the data object.""" - if isinstance(data, dict): - return sanitize(data) - elif isinstance(data, Path): - return json.loads(get_string(data)) - raise TypeError( - f"The comparison for {type(data)} is not yet implemented." + try: + compare_strings_with_tolerance_assert( + reference_string, result_string, rtol, atol, **kwargs ) + except AssertionError as error: + if isinstance(reference, Path): + handle_unequal_strings( + tmp_path, current_test_name, result_string, reference + ) + raise AssertionError(str(error)) - reference_dict = get_dictionary(reference) - result_dict = get_dictionary(result) - compare_nested_dicts_or_lists( - reference_dict, - result_dict, - rtol=rtol, - atol=atol, - allow_int_vs_float_comparison=True, - ) return - if isinstance(reference, (InputFile, Mesh)) or isinstance( - result, (InputFile, Mesh) - ): - - def get_dictionary(data) -> dict: - """Get the dictionary representation of the data object.""" - - # Internally convert Mesh to InputFile to allow for simple comparison via dictionary - # TODO this should be improved in the future - if isinstance(data, Mesh): - input_file = InputFile() - input_file.add(data) - data = input_file - - if isinstance(data, InputFile): - return data.sections + if isinstance( + reference, (InputFile, Mesh, dict, list, np.ndarray, Path) + ) or isinstance(result, (InputFile, Mesh, dict, list, np.ndarray, Path)): + reference_data = get_raw_data(reference, get_string) + result_data = get_raw_data(result, get_string) - if isinstance(data, dict): - return data - - elif isinstance(data, Path): - return InputFile().from_4C_yaml(input_file_path=data).sections - - raise TypeError( - f"The comparison for {type(data)} is not yet implemented." - ) - - reference_dict = get_dictionary(reference) - result_dict = get_dictionary(result) - - compare_nested_dicts_or_lists( - reference_dict, - result_dict, - rtol=rtol, - atol=atol, - allow_int_vs_float_comparison=True, - ) - return - - if isinstance(reference, (list, np.ndarray)) and isinstance( - result, (list, np.ndarray) - ): compare_nested_dicts_or_lists( - reference, - result, + reference_data, + result_data, rtol=rtol, atol=atol, allow_int_vs_float_comparison=True, + custom_compare=lambda obj, ref_obj: custom_compare( + obj, ref_obj, rtol=rtol, atol=atol + ), ) return - # We didn't raise an error or exit this function yet, so we default to a string - # based comparison. - [reference_string, result_string] = [ - get_string(data) for data in [reference, result] - ] - - # compare strings and handle non-matching strings - try: - compare_strings(reference_string, result_string, rtol, atol, **kwargs) - except AssertionError as error: - if isinstance(reference, Path): - handle_unequal_strings( - tmp_path, current_test_name, result_string, reference - ) - raise AssertionError(str(error)) - return _assert_results_equal -def compare_strings( - reference: str, - result: str, - rtol: Optional[float] = None, - atol: Optional[float] = None, - string_splitter: str = " ", -) -> None: - """Compare if two strings are identical, optionally within a given - tolerance. If the comparison fails, an error is raised. - - Args: - reference: The reference string. - result: The result string. - rtol: The relative tolerance. - atol: The absolute tolerance. - string_splitter: With which string the strings are split. - """ - - if rtol is None and atol is None: - compare_strings_equality_assert(reference, result) - else: - compare_strings_with_tolerance_assert( - reference, result, rtol, atol, string_splitter=string_splitter - ) - - -def compare_strings_equality_assert(reference: str, result: str) -> None: - """Check if two strings are exactly equal, if not raise an error. - - Args: - reference: The reference string. - result: The result string. - """ - diff = list(unified_diff(reference.splitlines(), result.splitlines(), lineterm="")) - if diff: - raise AssertionError( - "Exact string comparison failed! Difference between reference and result: \n" - + "\n".join(list(diff)) - ) - - def compare_strings_with_tolerance_assert( reference: str, result: str,