Skip to content

Commit

Permalink
FEM: do not write empty constraints to ccx input file
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Jul 21, 2016
1 parent 513bb65 commit ae9bc22
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 25 deletions.
21 changes: 14 additions & 7 deletions src/Mod/Fem/FemInputWriterCcx.py
Expand Up @@ -63,17 +63,24 @@ def write_calculix_input_file(self):
inpfile = open(self.file_name, 'a')
inpfile.write('\n\n')
self.write_element_sets_material_and_femelement_type(inpfile)
self.write_node_sets_constraints_fixed(inpfile)
self.write_node_sets_constraints_displacement(inpfile)
if self.fixed_objects:
self.write_node_sets_constraints_fixed(inpfile)
if self.displacement_objects:
self.write_node_sets_constraints_displacement(inpfile)
self.write_materials(inpfile)
self.write_femelementsets(inpfile)
self.write_step_begin(inpfile)
self.write_constraints_fixed(inpfile)
self.write_constraints_displacement(inpfile)
if self.fixed_objects:
self.write_constraints_fixed(inpfile)
if self.displacement_objects:
self.write_constraints_displacement(inpfile)
if self.analysis_type is None or self.analysis_type == "static":
self.write_constraints_selfweight(inpfile)
self.write_constraints_force(inpfile)
self.write_constraints_pressure(inpfile)
if self.selfweight_objects:
self.write_constraints_selfweight(inpfile)
if self.force_objects:
self.write_constraints_force(inpfile)
if self.pressure_objects:
self.write_constraints_pressure(inpfile)
elif self.analysis_type == "frequency":
self.write_frequency(inpfile)
self.write_outputs_types(inpfile)
Expand Down
9 changes: 0 additions & 9 deletions src/Mod/Fem/test_files/ccx/cube_frequency.inp
Expand Up @@ -464,10 +464,6 @@ Eall
68,
69,

***********************************************************
** Node sets for prescribed displacement constraint
** written by write_node_sets_constraints_displacement function

***********************************************************
** Materials
** written by write_materials function
Expand Down Expand Up @@ -500,11 +496,6 @@ FemConstraintFixed,2
FemConstraintFixed,3


***********************************************************
** Displacement constraint applied
** written by write_constraints_displacement function


***********************************************************
** Frequency analysis
** written by write_frequency function
Expand Down
9 changes: 0 additions & 9 deletions src/Mod/Fem/test_files/ccx/cube_static.inp
Expand Up @@ -464,10 +464,6 @@ Eall
68,
69,

***********************************************************
** Node sets for prescribed displacement constraint
** written by write_node_sets_constraints_displacement function

***********************************************************
** Materials
** written by write_materials function
Expand Down Expand Up @@ -500,11 +496,6 @@ FemConstraintFixed,2
FemConstraintFixed,3


***********************************************************
** Displacement constraint applied
** written by write_constraints_displacement function


***********************************************************
** Node loads
** written by write_constraints_force function
Expand Down

0 comments on commit ae9bc22

Please sign in to comment.