2014-04-02 00:11:14 +05:30
|
|
|
# -*- coding: UTF-8 no BOM -*-
|
|
|
|
|
2011-12-22 16:00:25 +05:30
|
|
|
# $Id$
|
2013-02-19 21:27:51 +05:30
|
|
|
import sys, os
|
2011-12-22 16:00:25 +05:30
|
|
|
|
2011-12-15 14:21:16 +05:30
|
|
|
from .environment import Environment # only one class
|
|
|
|
from .asciitable import ASCIItable # only one class
|
2011-12-15 20:45:32 +05:30
|
|
|
from .config import Material # will be extended to debug and numerics
|
2013-01-09 00:17:44 +05:30
|
|
|
from .colormaps import Colormap, Color
|
2013-11-26 00:34:39 +05:30
|
|
|
from .orientation import Quaternion, Rodrigues, Symmetry, Orientation
|
2013-01-09 00:17:44 +05:30
|
|
|
#from .block import Block # only one class
|
2014-01-10 03:05:21 +05:30
|
|
|
from .result import Result # only one class
|
2011-12-15 14:21:16 +05:30
|
|
|
from .geometry import Geometry # one class with subclasses
|
|
|
|
from .solver import Solver # one class with subclasses
|
2011-12-22 16:00:25 +05:30
|
|
|
from .test import Test
|
2012-07-18 19:16:33 +05:30
|
|
|
|
2012-01-04 16:36:24 +05:30
|
|
|
try:
|
|
|
|
from . import core
|
2012-07-31 21:07:49 +05:30
|
|
|
# cleaning up namespace
|
|
|
|
###################################################################################################
|
|
|
|
# capitalize according to convention
|
|
|
|
core.IO = core.io
|
|
|
|
core.FEsolving = core.fesolving
|
|
|
|
core.DAMASK_interface = core.damask_interface
|
2013-02-19 20:26:26 +05:30
|
|
|
# remove modulePrefix_
|
2012-07-31 21:07:49 +05:30
|
|
|
core.prec.init = core.prec.prec_init
|
|
|
|
core.DAMASK_interface.init = core.DAMASK_interface.DAMASK_interface_init
|
|
|
|
core.IO.init = core.IO.IO_init
|
|
|
|
core.numerics.init = core.numerics.numerics_init
|
|
|
|
core.debug.init = core.debug.debug_init
|
|
|
|
core.math.init = core.math.math_init
|
2012-08-27 13:34:47 +05:30
|
|
|
core.math.curlFFT = core.math.math_curlFFT
|
|
|
|
core.math.divergenceFFT = core.math.math_divergenceFFT
|
|
|
|
core.math.divergenceFDM = core.math.math_divergenceFDM
|
2013-01-31 21:58:08 +05:30
|
|
|
core.math.periodicNearestNeighbor = core.math.math_periodicNearestNeighbor
|
2013-02-19 20:26:26 +05:30
|
|
|
core.math.periodicNearestNeighborDistances = core.math.math_periodicNearestNeighborDistances
|
2012-08-27 13:34:47 +05:30
|
|
|
core.math.tensorAvg = core.math.math_tensorAvg
|
|
|
|
core.math.logstrainSpat = core.math.math_logstrainSpat
|
|
|
|
core.math.logstrainMat = core.math.math_logstrainMat
|
|
|
|
core.math.cauchy = core.math.math_cauchy
|
2012-07-31 21:07:49 +05:30
|
|
|
core.FEsolving.init = core.FEsolving.FE_init
|
|
|
|
core.mesh.init = core.mesh.mesh_init
|
|
|
|
core.mesh.regrid = core.mesh.mesh_regrid
|
2013-01-31 21:58:08 +05:30
|
|
|
core.mesh.nodesAroundCentres = core.mesh.mesh_nodesAroundCentres
|
|
|
|
core.mesh.deformedCoordsLinear = core.mesh.mesh_deformedCoordsLinear
|
|
|
|
core.mesh.deformedCoordsFFT = core.mesh.mesh_deformedCoordsFFT
|
|
|
|
core.mesh.volumeMismatch = core.mesh.mesh_volumeMismatch
|
|
|
|
core.mesh.shapeMismatch = core.mesh.mesh_shapeMismatch
|
|
|
|
|
2013-02-01 17:15:20 +05:30
|
|
|
except (ImportError,AttributeError) as e:
|
2012-07-18 19:16:33 +05:30
|
|
|
core = None # from http://www.python.org/dev/peps/pep-0008/
|
2013-02-19 20:26:26 +05:30
|
|
|
if os.path.split(sys.argv[0])[1] not in ('symLink_Processing.py',
|
|
|
|
'compile_CoreModule.py',
|
|
|
|
):
|
2013-04-29 22:00:08 +05:30
|
|
|
sys.stderr.write('\nWARNING: Core module (Fortran code) not available, \n'\
|
|
|
|
'try to run setup_processing.sh or compile_CoreModule.py\n'\
|
2013-10-08 19:26:28 +05:30
|
|
|
'Error message when importing core.so: %s\n\n'%e)
|