diff --git a/tests/create_cubit_input.py b/tests/create_cubit_input.py index 17c6447..9720ff4 100644 --- a/tests/create_cubit_input.py +++ b/tests/create_cubit_input.py @@ -252,14 +252,16 @@ def create_block(file_path): def create_solid_shell_meshes(file_path_blocks, file_path_dome): """Create the meshes needed for the solid shell tests.""" - def create_brick_mesh(dimensions, n_elements): + def create_brick_mesh( + dimensions, n_elements, *, element_type=cupy.element_type.hex8sh + ): """Create a MeshPy mesh with a solid brick""" cubit = CubitPy() create_brick( cubit, *dimensions, mesh_interval=n_elements, - element_type=cupy.element_type.hex8sh, + element_type=element_type, mesh=True ) mpy.import_mesh_full = True @@ -274,11 +276,23 @@ def rotate_list(original_list, n): """Rotate the list""" return original_list[-n:] + original_list[:-n] + # Add the plates in all directions (permute the dimension and number of elements + # in each direction) for i in range(3): brick = create_brick_mesh(rotate_list(dimensions, i), rotate_list(elements, i)) brick.translate([i * 4, 0, 0]) mesh.add(brick) + # Add a last plate with standard solid elements, to make sure that the algorithm + # skips those + brick = create_brick_mesh( + rotate_list(dimensions, 1), + rotate_list(elements, 1), + element_type=cupy.element_type.hex8, + ) + brick.translate([3 * 4, 0, 0]) + mesh.add(brick) + mesh.write_input_file(file_path_blocks, header=False) # Create the dome input diff --git a/tests/reference-files/4C_input_solid_shell_thickness_blocks.dat b/tests/reference-files/4C_input_solid_shell_thickness_blocks.dat index 9a3a0ed..13ace5d 100644 --- a/tests/reference-files/4C_input_solid_shell_thickness_blocks.dat +++ b/tests/reference-files/4C_input_solid_shell_thickness_blocks.dat @@ -53,6 +53,24 @@ NODE 51 COORD 9 0 -0.05 NODE 52 COORD 9 0 0.05 NODE 53 COORD 9 2 -0.05 NODE 54 COORD 9 2 0.05 +NODE 55 COORD 10 -0.05 1 +NODE 56 COORD 10 -0.05 0 +NODE 57 COORD 10 0.05 0 +NODE 58 COORD 10 0.05 1 +NODE 59 COORD 12 -0.05 1 +NODE 60 COORD 12 -0.05 0 +NODE 61 COORD 12 0.05 0 +NODE 62 COORD 12 0.05 1 +NODE 63 COORD 10 -0.05 -1 +NODE 64 COORD 10 0.05 -1 +NODE 65 COORD 12 -0.05 -1 +NODE 66 COORD 12 0.05 -1 +NODE 67 COORD 14 -0.05 1 +NODE 68 COORD 14 -0.05 0 +NODE 69 COORD 14 0.05 0 +NODE 70 COORD 14 0.05 1 +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 @@ -66,4 +84,8 @@ NODE 54 COORD 9 2 0.05 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 +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 +16 SOLID HEX8 60 65 66 61 68 71 72 69 MAT 1 KINEM nonlinear -----------------------------------------------------------------------------END diff --git a/tests/reference-files/test_four_c_solid_shell_direction_detection_blocks_reference.dat b/tests/reference-files/test_four_c_solid_shell_direction_detection_blocks_reference.dat index 3a36ce7..654b492 100644 --- a/tests/reference-files/test_four_c_solid_shell_direction_detection_blocks_reference.dat +++ b/tests/reference-files/test_four_c_solid_shell_direction_detection_blocks_reference.dat @@ -61,6 +61,24 @@ NODE 51 COORD 9 0 -0.05 NODE 52 COORD 9 0 0.05 NODE 53 COORD 9 2 -0.05 NODE 54 COORD 9 2 0.05 +NODE 55 COORD 10 -0.05 1 +NODE 56 COORD 10 -0.05 0 +NODE 57 COORD 10 0.05 0 +NODE 58 COORD 10 0.05 1 +NODE 59 COORD 12 -0.05 1 +NODE 60 COORD 12 -0.05 0 +NODE 61 COORD 12 0.05 0 +NODE 62 COORD 12 0.05 1 +NODE 63 COORD 10 -0.05 -1 +NODE 64 COORD 10 0.05 -1 +NODE 65 COORD 12 -0.05 -1 +NODE 66 COORD 12 0.05 -1 +NODE 67 COORD 14 -0.05 1 +NODE 68 COORD 14 -0.05 0 +NODE 69 COORD 14 0.05 0 +NODE 70 COORD 14 0.05 1 +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 @@ -74,4 +92,8 @@ NODE 54 COORD 9 2 0.05 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 +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 +16 SOLID HEX8 60 65 66 61 68 71 72 69 MAT 1 KINEM nonlinear -----------------------------------------------------------------------------END \ No newline at end of file