relative imports within damask package
This commit is contained in:
parent
c5e956f386
commit
c6025925ac
|
@ -4,12 +4,12 @@ import shlex
|
|||
import string
|
||||
|
||||
from ._solver import Solver
|
||||
import damask
|
||||
from .._environment import Environment
|
||||
|
||||
class Marc(Solver):
|
||||
"""Wrapper to run DAMASK with MSCMarc."""
|
||||
|
||||
def __init__(self,version=damask.Environment().options['MARC_VERSION']):
|
||||
def __init__(self,version=Environment().options['MARC_VERSION']):
|
||||
"""
|
||||
Create a Marc solver object.
|
||||
|
||||
|
@ -29,7 +29,7 @@ class Marc(Solver):
|
|||
#--------------------------
|
||||
def libraryPath(self):
|
||||
|
||||
path_MSC = damask.Environment().options['MSC_ROOT']
|
||||
path_MSC = Environment().options['MSC_ROOT']
|
||||
path_lib = '{}/mentat{}/shlib/linux64'.format(path_MSC,self.version)
|
||||
|
||||
return path_lib if os.path.exists(path_lib) else ''
|
||||
|
@ -38,7 +38,7 @@ class Marc(Solver):
|
|||
#--------------------------
|
||||
def toolsPath(self):
|
||||
|
||||
path_MSC = damask.Environment().options['MSC_ROOT']
|
||||
path_MSC = Environment().options['MSC_ROOT']
|
||||
path_tools = '{}/marc{}/tools'.format(path_MSC,self.version)
|
||||
|
||||
return path_tools if os.path.exists(path_tools) else ''
|
||||
|
@ -54,7 +54,7 @@ class Marc(Solver):
|
|||
):
|
||||
|
||||
|
||||
damaskEnv = damask.Environment()
|
||||
damaskEnv = Environment()
|
||||
|
||||
user = os.path.join(damaskEnv.relPath('src'),'DAMASK_marc{}.{}'.format(self.version,'f90' if compile else 'marc'))
|
||||
if not os.path.isfile(user):
|
||||
|
|
Loading…
Reference in New Issue