FEM: improve logs

This commit is contained in:
Bernd Hahnebach
2020-01-06 07:58:38 +01:00
parent 22071351c1
commit 060433ef63
3 changed files with 20 additions and 19 deletions

View File

@@ -99,13 +99,14 @@ class FemInputWriterCcx(writerbase.FemInputWriter):
def write_calculix_input_file(self):
timestart = time.clock()
FreeCAD.Console.PrintMessage("Start writing CalculiX input file\n")
FreeCAD.Console.PrintMessage("Write ccx input file to: {}\n".format(self.file_name))
FreeCAD.Console.PrintLog(
"writerbaseCcx --> self.dir_name --> " + self.dir_name + "\n"
)
FreeCAD.Console.PrintLog(
"writerbaseCcx --> self.main_file_name --> " + self.main_file_name + "\n"
)
FreeCAD.Console.PrintMessage(
FreeCAD.Console.PrintLog(
"writerbaseCcx --> self.file_name --> " + self.file_name + "\n"
)
if self.solver_obj.SplitInputWriter is True:

View File

@@ -233,22 +233,22 @@ class FemInputWriter():
)
if femobj["RefShapeType"] == "Vertex":
FreeCAD.Console.PrintLog(
"load on vertices --> we do not need the "
"femelement_table and femnodes_mesh for node load calculation"
" load on vertices --> The femelement_table "
"and femnodes_mesh are not needed for node load calculation.\n"
)
elif femobj["RefShapeType"] == "Face" \
and meshtools.is_solid_femmesh(self.femmesh) \
and not meshtools.has_no_face_data(self.femmesh):
FreeCAD.Console.PrintLog(
"solid_mesh with face data --> we do not need the "
"femelement_table but we need the femnodes_mesh for node load calculation"
" solid_mesh with face data --> The femelement_table is not "
"needed but the femnodes_mesh is needed for node load calculation.\n"
)
if not self.femnodes_mesh:
self.femnodes_mesh = self.femmesh.Nodes
else:
FreeCAD.Console.PrintLog(
"mesh without needed data --> we need the "
"femelement_table and femnodes_mesh for node load calculation"
" mesh without needed data --> The femelement_table "
"and femnodes_mesh are not needed for node load calculation.\n"
)
if not self.femnodes_mesh:
self.femnodes_mesh = self.femmesh.Nodes
@@ -257,12 +257,12 @@ class FemInputWriter():
self.femmesh
)
# get node loads
FreeCAD.Console.PrintMessage(
" Finite element mesh nodes will be retrieved by searching "
FreeCAD.Console.PrintLog(
" Finite element mesh nodes will be retrieved by searching "
"the appropriate nodes in the finite element mesh.\n"
)
FreeCAD.Console.PrintMessage(
" The appropriate finite element mesh node load values will "
FreeCAD.Console.PrintLog(
" The appropriate finite element mesh node load values will "
"be calculated according to the finite element definition.\n"
)
for femobj in self.force_objects: