Skip to content

Commit

Permalink
Resolve "refactor import statements in __init__s"
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdinand Elhardt authored and c-meyer committed Dec 4, 2019
1 parent c85ebc6 commit 8f8224e
Show file tree
Hide file tree
Showing 19 changed files with 145 additions and 51 deletions.
30 changes: 3 additions & 27 deletions amfe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,16 @@
#
# Distributed under BSD-3-Clause License. See LICENSE-File for more information
#

"""
Module for advanced nonlinear finite element analysis. This software is developed and maintained at the Chair for
Applied Mechanics, Technical University of Munich.
Authors:
Christian Meyer, Christopher Lerch, Johannes Rutzmoser, Fabian Gruber, Andreas Seibold
"""
# from __future__ import absolute_import
#
# # Finite Element stuff
# from .assembly import *
# from .boundary import *
# from .element import *
# from .material import *
# from .mechanical_system import *
# from .mesh import *
# from .observers import *
# from .solver import *
# from .tools import *
# from .constraint import *
# from .io import *
#
# # Linalg submodule
# from .linalg import *
#
# # Reduction stuff
# from .reduced_basis import *
# from .hyper_red import *
#
# # Structural dynamics
# from .structural_dynamics import *
#
# # Commented out as a dill dependency is required only here
# from .num_exp_toolbox import *

from .ui import *

__author__ = 'Christian Meyer, Christopher Lerch, Johannes Rutzmoser, Fabian Gruber, Andreas Seibold'

Expand Down
6 changes: 2 additions & 4 deletions amfe/assembly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
Module for assembly algorithms.
"""

# --- ABSTRACT SUPER CLASS ---
# from .assembly import * # abstract super class


# --- STRUCTURAL ASSEMBLY ---
from .assembly import *
from .structural_assembly import *
from .tools import *
6 changes: 5 additions & 1 deletion amfe/component/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
"""

from .component_composite import *
from .component_base import *
from .component_connector import *
from .constants import *
from .mesh_component import *
from .partitioner import *
from .structural_component import *
from .tree_manager import *
14 changes: 13 additions & 1 deletion amfe/constraint/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Constraint Module
Module for nonholonomic and holonomic constraints
"""

# -- CONSTRAINT MANAGER --
from .constraint import *
from .constraint_manager import *
from .constraint_assembler import *
from .constraint_formulation_boolean_elimination import *
from .constraint_formulation_lagrange_multiplier import *
from .constraint_formulation_nullspace_elimination import *
from .constraint_manager import *
from .tools import *
1 change: 0 additions & 1 deletion amfe/element/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from .tet10 import *
from .hexa8 import *
from .hexa20 import *
# from .prism6 import * # no stiffness
from .bar_2d_lumped import *
from .linear_beam import *

Expand Down
4 changes: 3 additions & 1 deletion amfe/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
"""

from .tools import *
from .constants import *
from .constants import *
from .mesh import *
from .postprocessing import *
18 changes: 17 additions & 1 deletion amfe/linalg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Linear Algebra Module.
"""

from .linearsolvers import *
from .eigen import *
from .norms import *
from .orth import *
from .MKLutils import *
from .MKLutils import *
from .tools import *

# import subfolder
from .lib import *
13 changes: 13 additions & 0 deletions amfe/linalg/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
lib module.
"""

from .pardisoInterface import pardisoinit, pardiso
from .pardiso_wrapper import PardisoWrapper
7 changes: 4 additions & 3 deletions amfe/mapping/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) 2018, Lehrstuhl für Angewandte Mechanik, Technische Universität München.
#
# Distributed under BSD-3-Clause License. See LICENSE-File for more information
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Expand All @@ -9,5 +11,4 @@
"""

# -- STANDARD MAPPING --
from .mapping_base import *
from .mapping_standard import *
8 changes: 6 additions & 2 deletions amfe/mor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) 2018, Lehrstuhl für Angewandte Mechanik, Technische Universität München.
#
# Distributed under BSD-3-Clause License. See LICENSE-File for more information
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Expand All @@ -10,3 +12,5 @@
# -- Reduction Bases
from .reduction_basis import *
from .ui import *
# -- import subfolder
from .hyper_red import *
16 changes: 11 additions & 5 deletions amfe/mor/hyper_red/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
'''
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Hyper reduction module
'''
"""

# from .poly_reduction import *
# from .poly_system import *
from .ecsw import *
# from .deim import *
from .ecsw_assembly import *
from .poly3 import *
from .training_set_generation import *
3 changes: 1 addition & 2 deletions amfe/neumann/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
"""

from .neumann_manager import *
from .neumann_base import *
from .structural_neumann import *
from .tools import *
from .tools import *
17 changes: 17 additions & 0 deletions amfe/parametric/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Morphing module.
"""

from .basis_updating import *

# -- import subfolder
from .morphing import *
16 changes: 16 additions & 0 deletions amfe/parametric/morphing/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Morphing module.
"""

# -- import subfolders
from .implementer import *
from .morpher import *
14 changes: 13 additions & 1 deletion amfe/parametric/morphing/implementer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Implementer Morphing module.
"""

# -- import Base class (important for enduser for subclassing!) --
from .implementer import MorpherImplementer
from .implementer import *

# -- import ffd implementer --
from .ffdimplementer import *
12 changes: 12 additions & 0 deletions amfe/parametric/morphing/morpher/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#

"""
Morphing module.
"""

# -- import base morpher (important for subclassing) --
from .basemorpher import *
Expand Down
8 changes: 7 additions & 1 deletion amfe/solver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,10 @@
from .solution import *

# --- DOMAIN DECOMPOSITION SOLVERS ---
from .domain_decomposition_solver import *
from .domain_decomposition_solver import *

# --- INITIALIZERS ---
from .initializer import *

# --- TOOLS ---
from .tools import *
1 change: 1 addition & 0 deletions docs/release/1.1.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ Other changes
- Release notes have been added
- Setup.py was divided in conda setup und setup develop
- Setup.py general improvements
- The __init__ system has been changed such that only one level downwards must be imported by the user.
2 changes: 1 addition & 1 deletion tests/test_tree_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from copy import deepcopy

from amfe.component.tree_manager import *
from amfe.component import ComponentBase
from amfe.component.component_base import ComponentBase


class DummyComponent(ComponentBase):
Expand Down

0 comments on commit 8f8224e

Please sign in to comment.