Skip to content

Commit

Permalink
FEM: ccx unit tests, improve prints
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Sep 26, 2019
1 parent 1f8c686 commit ef72550
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/Mod/Fem/femtest/app/test_ccxtools.py
Expand Up @@ -73,7 +73,7 @@ def test_00print(
def test_1_static_analysis(
self
):
fcc_print("--------------- Start of FEM tests ---------------")
fcc_print("\n--------------- Start of FEM ccxtools static analysis test ---------------")

box = self.active_doc.addObject("Part::Box", "Box")

Expand Down Expand Up @@ -280,13 +280,14 @@ def test_1_static_analysis(
static_save_fc_file = static_analysis_dir + static_base_name + ".FCStd"
fcc_print("Save FreeCAD file for static analysis to {}...".format(static_save_fc_file))
self.active_doc.saveAs(static_save_fc_file)
fcc_print("--------------- End of FEM tests static and analysis ---------------")

fcc_print("--------------- End of FEM ccxtools static analysis test -------------------")

# ********************************************************************************************
def test_2_static_multiple_material(
self
):
fcc_print("--------------- Start of FEM ccxtools multiple material test ---------------")
fcc_print("\n--------------- Start of FEM ccxtools multiple material test -------------")

# set up the simple multimat example
from femexamples import multimaterial_twoboxes
Expand Down Expand Up @@ -331,13 +332,14 @@ def test_2_static_multiple_material(
static_save_fc_file = static_multiplemat_dir + static_base_name + ".FCStd"
fcc_print("Save FreeCAD file for static analysis to {}...".format(static_save_fc_file))
self.active_doc.saveAs(static_save_fc_file)
fcc_print("--------------- End of FEM ccxtools multiple material test ---------------")

fcc_print("--------------- End of FEM ccxtools multiple material test -----------------")

# ********************************************************************************************
def test_3_freq_analysis(
self
):
fcc_print("--------------- Start of FEM tests ---------------")
fcc_print("\n--------------- Start of FEM ccxtools frequency analysis test ------------")

self.active_doc.addObject("Part::Box", "Box")

Expand Down Expand Up @@ -493,14 +495,15 @@ def test_3_freq_analysis(
.format(frequency_save_fc_file)
)
self.active_doc.saveAs(frequency_save_fc_file)
fcc_print("--------------- End of FEM tests frequency analysis ---------------")

fcc_print("--------------- End of FEM ccxtools frequency analysis test ----------------")

# ********************************************************************************************
def test_4_thermomech_analysis(
self
):

fcc_print("--------------- Start of FEM tests ---------------")
fcc_print("\n--------------- Start of FEM ccxtools thermomechanical analysis test -----")

# set up the thermomech example
from femexamples.thermomech_spine import setup as thermomech
Expand Down Expand Up @@ -600,13 +603,13 @@ def test_4_thermomech_analysis(
)
self.active_doc.saveAs(thermomech_save_fc_file)

fcc_print("--------------- End of FEM tests thermomech analysis ---------------")
fcc_print("--------------- End of FEM ccxtools thermomechanical analysis test ---------")

# ********************************************************************************************
def test_5_Flow1D_thermomech_analysis(
self
):
fcc_print("--------------- Start of 1D Flow FEM tests ---------------")
fcc_print("\n--------------- Start of FEM ccxtools Flow1D analysis test ---------------")

# set up the thermomech flow1d example
from femexamples.thermomech_flow1d import setup as flow1d
Expand Down Expand Up @@ -708,7 +711,7 @@ def test_5_Flow1D_thermomech_analysis(
)
self.active_doc.saveAs(Flow1D_thermomech_save_fc_file)

fcc_print("--------------- End of FEM tests FLow 1D thermomech analysis ---------------")
fcc_print("--------------- End of FEM ccxtools Flow1D analysis test -------------------")

# ********************************************************************************************
def tearDown(
Expand Down

0 comments on commit ef72550

Please sign in to comment.