From 103ed1dccff143659facb1a55dc665d8003cf99d Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 20 Jan 2020 05:43:34 +0100 Subject: [PATCH] FEM: examples, small code improvements --- src/Mod/Fem/femexamples/contact_shell_shell.py | 4 ++-- src/Mod/Fem/femexamples/manager.py | 2 +- src/Mod/Fem/femexamples/material_multiple_twoboxes.py | 4 ++-- src/Mod/Fem/femexamples/material_nl_platewithhole.py | 4 ++-- src/Mod/Fem/femexamples/rc_wall_2d.py | 4 ++-- src/Mod/Fem/femexamples/thermomech_flow1d.py | 4 ++-- src/Mod/Fem/femexamples/thermomech_spine.py | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Mod/Fem/femexamples/contact_shell_shell.py b/src/Mod/Fem/femexamples/contact_shell_shell.py index d2745b82db..c8439f1756 100644 --- a/src/Mod/Fem/femexamples/contact_shell_shell.py +++ b/src/Mod/Fem/femexamples/contact_shell_shell.py @@ -188,7 +188,7 @@ def setup(doc=None, solvertype="ccxtools"): """ -from femexamples import contact_shell_shell as shellcontact -shellcontact.setup() +from femexamples.contact_shell_shell import setup +setup() """ diff --git a/src/Mod/Fem/femexamples/manager.py b/src/Mod/Fem/femexamples/manager.py index 48389c86dc..ee965a5d69 100644 --- a/src/Mod/Fem/femexamples/manager.py +++ b/src/Mod/Fem/femexamples/manager.py @@ -195,7 +195,7 @@ def run_material_nl_platewithhole(solver=None, base_name=None): def run_rcwall2d(solver=None, base_name=None): - from .rc_wall_2d import setup as setup + from .rc_wall_2d import setup doc = setup() if base_name is None: diff --git a/src/Mod/Fem/femexamples/material_multiple_twoboxes.py b/src/Mod/Fem/femexamples/material_multiple_twoboxes.py index 603a95bf02..391a3e306a 100644 --- a/src/Mod/Fem/femexamples/material_multiple_twoboxes.py +++ b/src/Mod/Fem/femexamples/material_multiple_twoboxes.py @@ -157,7 +157,7 @@ def setup(doc=None, solvertype="ccxtools"): """ -from femexamples import material_multiple_twoboxes as twoboxes -twoboxes.setup() +from femexamples.material_multiple_twoboxes import setup +setup() """ diff --git a/src/Mod/Fem/femexamples/material_nl_platewithhole.py b/src/Mod/Fem/femexamples/material_nl_platewithhole.py index 3c060369cc..43d900949e 100644 --- a/src/Mod/Fem/femexamples/material_nl_platewithhole.py +++ b/src/Mod/Fem/femexamples/material_nl_platewithhole.py @@ -157,7 +157,7 @@ def setup(doc=None, solvertype="ccxtools"): """ -from femexamples import material_nl_platewithhole as nlmat -nlmat.setup() +from femexamples.material_nl_platewithhole import setup +setup() """ diff --git a/src/Mod/Fem/femexamples/rc_wall_2d.py b/src/Mod/Fem/femexamples/rc_wall_2d.py index ac22afa666..5b62b7b3c0 100644 --- a/src/Mod/Fem/femexamples/rc_wall_2d.py +++ b/src/Mod/Fem/femexamples/rc_wall_2d.py @@ -159,7 +159,7 @@ def setup(doc=None, solvertype="ccxtools"): """ -from femexamples import rc_wall_2d as rc -rc.setup() +from femexamples.rc_wall_2d import setup +setup() """ diff --git a/src/Mod/Fem/femexamples/thermomech_flow1d.py b/src/Mod/Fem/femexamples/thermomech_flow1d.py index 0e4532030e..ef13229ea0 100644 --- a/src/Mod/Fem/femexamples/thermomech_flow1d.py +++ b/src/Mod/Fem/femexamples/thermomech_flow1d.py @@ -250,7 +250,7 @@ def setup(doc=None, solvertype="ccxtools"): """ -from femexamples import thermomech_flow1d as flow -flow.setup() +from femexamples.thermomech_flow1d import setup +setup() """ diff --git a/src/Mod/Fem/femexamples/thermomech_spine.py b/src/Mod/Fem/femexamples/thermomech_spine.py index ebd85ce6f1..25adea8e70 100644 --- a/src/Mod/Fem/femexamples/thermomech_spine.py +++ b/src/Mod/Fem/femexamples/thermomech_spine.py @@ -143,7 +143,7 @@ def setup(doc=None, solvertype="ccxtools"): """ -from femexamples import thermomech_spine as spine -spine.setup() +from femexamples.thermomech_spine import setup +setup() """