Skip to content

Commit

Permalink
FEM: ccx unit tests, add material nonlinear input file writing test
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Jan 19, 2020
1 parent 2064410 commit 085bce3
Show file tree
Hide file tree
Showing 4 changed files with 20,183 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/Mod/Fem/CMakeLists.txt
Expand Up @@ -176,6 +176,7 @@ SET(FemTestsCcx_SRCS
femtest/data/ccx/cube_static_expected_values
femtest/data/ccx/cube_static.FCStd
femtest/data/ccx/cube.FCStd
femtest/data/ccx/mat_nonlinear.inp
femtest/data/ccx/multimat.inp
femtest/data/ccx/spine_thermomech.inp
femtest/data/ccx/spine_thermomech.dat
Expand Down
20 changes: 12 additions & 8 deletions src/Mod/Fem/TestFem.py
Expand Up @@ -125,10 +125,11 @@
./bin/FreeCADCmd --run-test "femtest.app.test_femimport.TestObjectExistance.test_objects_existance"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_1_static_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_2_static_multiple_material"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_3_freq_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_4_thermomech_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_5_Flow1D_thermomech_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_6_contact_shell_shell"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_3_static_material_nonlinar"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_4_freq_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_5_thermomech_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_6_Flow1D_thermomech_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_7_contact_shell_shell"
./bin/FreeCADCmd --run-test "femtest.app.test_common.TestFemCommon.test_adding_refshaps"
./bin/FreeCADCmd --run-test "femtest.app.test_common.TestFemCommon.test_pyimport_all_FEM_modules"
./bin/FreeCADCmd --run-test "femtest.app.test_material.TestMaterialUnits.test_known_quantity_units"
Expand Down Expand Up @@ -170,16 +171,19 @@
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_2_static_multiple_material"))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_3_freq_analysis"))
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_3_static_material_nonlinar"))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_4_thermomech_analysis"))
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_4_freq_analysis"))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_5_Flow1D_thermomech_analysis"))
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_5_thermomech_analysis"))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_6_contact_shell_shell"))
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_6_Flow1D_thermomech_analysis"))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_7_contact_shell_shell"))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_common.TestFemCommon.test_adding_refshaps"))
Expand Down
29 changes: 25 additions & 4 deletions src/Mod/Fem/femtest/app/test_ccxtools.py
Expand Up @@ -123,7 +123,28 @@ def test_2_static_multiple_material(
)

# ********************************************************************************************
def test_3_freq_analysis(
def test_3_static_material_nonlinar(
self
):
# set up
from femexamples.material_nl_platewithhole import setup
setup(self.active_doc, "ccxtools")
test_name = "nonlinear material test"
base_name = "mat_nonlinear"
analysis_dir = testtools.get_unit_test_tmp_dir(
self.temp_dir,
"FEM_ccx_matnonlinear"
)

# test input file writing
self.input_file_writing_test(
test_name=test_name,
base_name=base_name,
analysis_dir=analysis_dir,
)

# ********************************************************************************************
def test_4_freq_analysis(
self
):
# set up
Expand Down Expand Up @@ -156,7 +177,7 @@ def test_3_freq_analysis(
)

# ********************************************************************************************
def test_4_thermomech_analysis(
def test_5_thermomech_analysis(
self
):
# set up
Expand Down Expand Up @@ -189,7 +210,7 @@ def test_4_thermomech_analysis(
)

# ********************************************************************************************
def test_5_Flow1D_thermomech_analysis(
def test_6_Flow1D_thermomech_analysis(
self
):
# set up
Expand Down Expand Up @@ -222,7 +243,7 @@ def test_5_Flow1D_thermomech_analysis(
)

# ********************************************************************************************
def test_6_contact_shell_shell(
def test_7_contact_shell_shell(
self
):
# set up
Expand Down

0 comments on commit 085bce3

Please sign in to comment.