Skip to content

Commit

Permalink
FEM: use solver object as parameter value in FemInputWriter class
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Jun 3, 2016
1 parent f1858cf commit aa3b214
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
12 changes: 7 additions & 5 deletions src/Mod/Fem/FemInputWriter.py
Expand Up @@ -41,28 +41,30 @@


class FemInputWriter():
def __init__(self, analysis_obj, mesh_obj, mat_obj,
def __init__(self, analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
force_obj, pressure_obj,
displacement_obj,
beamsection_obj, shellthickness_obj,
analysis_type, eigenmode_parameters,
dir_name):
self.dir_name = dir_name
self.analysis = analysis_obj
self.solver_obj = solver_obj
self.mesh_object = mesh_obj
self.material_objects = mat_obj
self.fixed_objects = fixed_obj
self.force_objects = force_obj
self.pressure_objects = pressure_obj
self.displacement_objects = displacement_obj
self.beamsection_objects = beamsection_obj
self.shellthickness_objects = shellthickness_obj
self.analysis_type = analysis_type
if eigenmode_parameters:
self.no_of_eigenfrequencies = eigenmode_parameters[0]
self.eigenfrequeny_range_low = eigenmode_parameters[1]
self.eigenfrequeny_range_high = eigenmode_parameters[2]
self.analysis_type = analysis_type
self.beamsection_objects = beamsection_obj
self.shellthickness_objects = shellthickness_obj
self.dir_name = dir_name
if not dir_name:
print('Error: FemInputWriter has no working_dir --> we gone make a temporary one!')
self.dir_name = FreeCAD.ActiveDocument.TransientDir.replace('\\', '/') + '/FemAnl_' + analysis_obj.Uid[-4:]
Expand Down
6 changes: 4 additions & 2 deletions src/Mod/Fem/FemInputWriterCcx.py
Expand Up @@ -36,14 +36,16 @@


class FemInputWriterCcx(FemInputWriter.FemInputWriter):
def __init__(self, analysis_obj, mesh_obj, mat_obj,
def __init__(self, analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
force_obj, pressure_obj,
displacement_obj,
beamsection_obj, shellthickness_obj,
analysis_type=None, eigenmode_parameters=None,
dir_name=None):
FemInputWriter.FemInputWriter.__init__(self, analysis_obj, mesh_obj, mat_obj,
FemInputWriter.FemInputWriter.__init__(self, analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
force_obj, pressure_obj,
displacement_obj,
Expand Down
6 changes: 4 additions & 2 deletions src/Mod/Fem/FemInputWriterZ88.py
Expand Up @@ -33,14 +33,16 @@


class FemInputWriterZ88(FemInputWriter.FemInputWriter):
def __init__(self, analysis_obj, mesh_obj, mat_obj,
def __init__(self, analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
force_obj, pressure_obj,
displacement_obj,
beamsection_obj, shellthickness_obj,
analysis_type=None, eigenmode_parameters=None,
dir_name=None):
FemInputWriter.FemInputWriter.__init__(self, analysis_obj, mesh_obj, mat_obj,
FemInputWriter.FemInputWriter.__init__(self, analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
force_obj, pressure_obj,
displacement_obj,
Expand Down
3 changes: 2 additions & 1 deletion src/Mod/Fem/FemToolsCcx.py
Expand Up @@ -87,7 +87,8 @@ def write_inp_file(self):
import sys
self.inp_file_name = ""
try:
inp_writer = iw.FemInputWriterCcx(self.analysis, self.mesh, self.materials,
inp_writer = iw.FemInputWriterCcx(self.analysis, self.solver,
self.mesh, self.materials,
self.fixed_constraints,
self.force_constraints, self.pressure_constraints,
self.displacement_constraints,
Expand Down
3 changes: 2 additions & 1 deletion src/Mod/Fem/FemToolsZ88.py
Expand Up @@ -80,7 +80,8 @@ def write_inp_file(self):
import sys
self.inp_file_name = ""
try:
inp_writer = iw.FemInputWriterZ88(self.analysis, self.mesh, self.materials,
inp_writer = iw.FemInputWriterZ88(self.analysis, self.solver,
self.mesh, self.materials,
self.fixed_constraints,
self.force_constraints, self.pressure_constraints,
self.displacement_constraints,
Expand Down

0 comments on commit aa3b214

Please sign in to comment.