FEM: use solver object as parameter value in FemInputWriter class
This commit is contained in:
parent
f1858cfdbf
commit
aa3b214cc5
|
@ -41,28 +41,30 @@ import os
|
|||
|
||||
|
||||
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:]
|
||||
|
|
|
@ -36,14 +36,16 @@ import FemInputWriter
|
|||
|
||||
|
||||
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,
|
||||
|
|
|
@ -33,14 +33,16 @@ import FemInputWriter
|
|||
|
||||
|
||||
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,
|
||||
|
|
|
@ -87,7 +87,8 @@ class FemToolsCcx(FemTools.FemTools):
|
|||
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,
|
||||
|
|
|
@ -80,7 +80,8 @@ class FemToolsZ88(FemTools.FemTools):
|
|||
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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user