Skip to content

Commit

Permalink
FEM: examples, rename multi material example
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Oct 8, 2019
1 parent 84c8652 commit 128358b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Fem/CMakeLists.txt
Expand Up @@ -38,8 +38,8 @@ SET(FemExamples_SRCS
femexamples/boxanalysis.py
femexamples/ccx_cantilever_std.py
femexamples/manager.py
femexamples/material_multiple_twoboxes.py
femexamples/material_nl_platewithhole.py
femexamples/multimaterial_twoboxes.py
femexamples/rc_wall_2d.py
femexamples/thermomech_flow1d.py
femexamples/thermomech_spine.py
Expand All @@ -48,9 +48,9 @@ SET(FemExamples_SRCS
SET(FemExampleMeshes_SRCS
femexamples/meshes/__init__.py
femexamples/meshes/mesh_boxanalysis.py
femexamples/meshes/mesh_boxes_2_vertikal_tetra10.py
femexamples/meshes/mesh_canticcx_tetra10.py
femexamples/meshes/mesh_rc_wall_2d_tria6.py
femexamples/meshes/mesh_multimaterial_twoboxes.py
femexamples/meshes/mesh_platewithhole.py
femexamples/meshes/mesh_thermomech_flow1d.py
femexamples/meshes/mesh_thermomech_spine.py
Expand Down
16 changes: 8 additions & 8 deletions src/Mod/Fem/femexamples/manager.py
Expand Up @@ -80,7 +80,7 @@ def run_all():
run_ccx_cantilevernodeload()
run_ccx_cantileverprescribeddisplacement()
run_material_nl_platewithhole()
run_multimaterial_twoboxes()
run_material_multiple_twoboxes()
run_rcwall2d()
run_thermomech_flow1d()
run_thermomech_spine()
Expand Down Expand Up @@ -156,27 +156,27 @@ def run_ccx_cantileverprescribeddisplacement(solver=None, base_name=None):
return doc


def run_material_nl_platewithhole(solver=None, base_name=None):
def run_material_multiple_twoboxes(solver=None, base_name=None):

from .material_nl_platewithhole import setup
from .material_multiple_twoboxes import setup
doc = setup()

if base_name is None:
base_name = "Nonlinear_material_plate_with_hole"
base_name = "Multimaterial_Two-Boxes"
if solver is not None:
base_name += "_" + solver
run_analysis(doc, base_name)

return doc


def run_multimaterial_twoboxes(solver=None, base_name=None):
def run_material_nl_platewithhole(solver=None, base_name=None):

from .multimaterial_twoboxes import setup
from .material_nl_platewithhole import setup
doc = setup()

if base_name is None:
base_name = "Multimaterial_Two-Boxes"
base_name = "Nonlinear_material_plate_with_hole"
if solver is not None:
base_name += "_" + solver
run_analysis(doc, base_name)
Expand Down Expand Up @@ -236,8 +236,8 @@ def run_thermomech_spine(solver=None, base_name=None):
doc = run_ccx_cantileverfaceload()
doc = run_ccx_cantilevernodeload()
doc = run_ccx_cantileverprescribeddisplacement()
doc = run_material_multiple_twoboxes()
doc = run_material_nl_platewithhole()
doc = run_multimaterial_twoboxes()
doc = run_rcwall2d()
doc = run_thermomech_flow1d()
doc = run_thermomech_spine()
Expand Down
Expand Up @@ -139,7 +139,7 @@ def setup(doc=None, solver="ccxtools"):
pressure_constraint.Reversed = False

# mesh
from .meshes.mesh_multimaterial_twoboxes import create_nodes, create_elements
from .meshes.mesh_boxes_2_vertikal_tetra10 import create_nodes, create_elements
fem_mesh = Fem.FemMesh()
control = create_nodes(fem_mesh)
if not control:
Expand All @@ -157,7 +157,7 @@ def setup(doc=None, solver="ccxtools"):


"""
from femexamples import multimaterial_twoboxes as twoboxes
from femexamples import material_multiple_twoboxes as twoboxes
twoboxes.setup()
"""

0 comments on commit 128358b

Please sign in to comment.