Skip to content

Commit

Permalink
FEM: unit test, add ccx canti faceload hexa20 writing
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Mar 1, 2020
1 parent eeb97b3 commit 3f39973
Show file tree
Hide file tree
Showing 4 changed files with 495 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Mod/Fem/CMakeLists.txt
Expand Up @@ -170,6 +170,7 @@ SET(FemTestsFiles_SRCS

SET(FemTestsCcx_SRCS
femtest/data/ccx/__init__.py
femtest/data/ccx/canti_ccx_faceload_hexa20.inp
femtest/data/ccx/constraint_contact_shell_shell.FCStd
femtest/data/ccx/constraint_contact_shell_shell.inp
femtest/data/ccx/constraint_contact_solid_solid.FCStd
Expand Down
4 changes: 4 additions & 0 deletions src/Mod/Fem/TestFem.py
Expand Up @@ -125,6 +125,7 @@
./bin/FreeCADCmd --run-test "femtest.app.test_femimport.TestObjectExistance.test_objects_existance"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_freq_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_static_analysis"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_static_constraint_force_faceload_hexa20"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_static_constraint_contact_shell_shell"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_static_constraint_contact_solid_solid"
./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_static_constraint_tie"
Expand Down Expand Up @@ -173,6 +174,9 @@
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_static_analysis"))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_static_constraint_force_faceload_hexa20"))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_static_constraint_contact_shell_shell"))
Expand Down
21 changes: 21 additions & 0 deletions src/Mod/Fem/femtest/app/test_ccxtools.py
Expand Up @@ -132,6 +132,27 @@ def test_static_analysis(
res_obj_name=res_obj_name,
)

# ********************************************************************************************
def test_static_constraint_force_faceload_hexa20(
self
):
# set up
from femexamples.ccx_cantilever_std import setup_cantileverhexa20faceload as setup
setup(self.active_doc, "ccxtools")
test_name = "canti ccx faceload hexa20"
base_name = "canti_ccx_faceload_hexa20"
analysis_dir = testtools.get_unit_test_tmp_dir(
self.temp_dir,
("FEM_" + base_name),
)
fcc_print(self.active_doc.Objects)
# test input file writing
self.input_file_writing_test(
test_name=test_name,
base_name=base_name,
analysis_dir=analysis_dir,
)

# ********************************************************************************************
def test_static_constraint_contact_shell_shell(
self
Expand Down

0 comments on commit 3f39973

Please sign in to comment.