File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
benchmarks/linear-elastic-plate-with-hole/FEniCS Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ def create_mesh(parameter_file, mesh_file):
47
47
.to_base_units ()
48
48
.magnitude
49
49
)
50
+
50
51
gmsh .option .setNumber ("Mesh.CharacteristicLengthMin" , element_size )
51
52
gmsh .option .setNumber ("Mesh.CharacteristicLengthMax" , element_size )
52
53
gmsh .option .setNumber ("Mesh.CharacteristicLengthFactor" , 1.0 )
@@ -91,15 +92,8 @@ def create_mesh(parameter_file, mesh_file):
91
92
92
93
93
94
if __name__ == "__main__" :
94
- PARSER = ArgumentParser (
95
- description = "Create input files and mesh for FEniCS simulation"
96
- )
97
- PARSER .add_argument (
98
- "--input_parameter_file" , required = True , help = "JSON file containing simulation parameters"
99
- )
100
- PARSER .add_argument (
101
- "--output_mesh_file" , required = True , help = "Output path for the generated mesh (.msh)"
102
- )
95
+ PARSER = ArgumentParser (description = "Create input files and mesh for FEniCS simulation" )
96
+ PARSER .add_argument ("--input_parameter_file" , required = True , help = "JSON file containing simulation parameters" )
97
+ PARSER .add_argument ("--output_mesh_file" , required = True , help = "Output path for the generated mesh (.msh)" )
103
98
ARGS = vars (PARSER .parse_args ())
104
-
105
99
create_mesh (ARGS ["input_parameter_file" ], ARGS ["output_mesh_file" ])
Original file line number Diff line number Diff line change @@ -211,8 +211,7 @@ def mises_stress(u):
211
211
# Save metrics
212
212
metrics = {
213
213
"max_von_mises_stress_nodes" : max_mises_stress_nodes ,
214
- "max_von_mises_stress_gauss_points" : max_mises_stress_gauss_points
215
- }
214
+ "max_von_mises_stress_gauss_points" : max_mises_stress_gauss_points }
216
215
217
216
if MPI .COMM_WORLD .rank == 0 :
218
217
with open (metrics_file , "w" ) as f :
You can’t perform that action at this time.
0 commit comments