first round of libraries
This commit is contained in:
parent
c1dd5febd5
commit
4d8aad36f1
|
@ -1,8 +1,7 @@
|
|||
# -*- coding: UTF-8 no BOM -*-
|
||||
"""Tools to control the various BVP solvers"""
|
||||
|
||||
# $Id$
|
||||
|
||||
from .solver import Solver # only one class
|
||||
from .spectral import Spectral # only one class
|
||||
from .marc import Marc # only one class
|
||||
from .abaqus import Abaqus # only one class
|
||||
from .solver import Solver # noqa
|
||||
from .spectral import Spectral # noqa
|
||||
from .marc import Marc # noqa
|
||||
from .abaqus import Abaqus # noqa
|
||||
|
|
|
@ -7,7 +7,8 @@ from .solver import Solver
|
|||
|
||||
class Abaqus(Solver):
|
||||
|
||||
def __init__(self,version='',solver=''): # example of version string: 6.12-2, solver: either std or exp
|
||||
|
||||
def __init__(self,version='',solver=''): # example version string: 6.12-2, solver: std or exp
|
||||
self.solver='Abaqus'
|
||||
if version =='':
|
||||
import subprocess
|
||||
|
|
|
@ -7,9 +7,7 @@ from .solver import Solver
|
|||
|
||||
class Marc(Solver):
|
||||
|
||||
#--------------------------
|
||||
def __init__(self):
|
||||
#--------------------------
|
||||
self.solver = 'Marc'
|
||||
self.releases = { \
|
||||
'2015': ['linux64',''],
|
||||
|
@ -24,7 +22,6 @@ class Marc(Solver):
|
|||
|
||||
#--------------------------
|
||||
def version(self,rootRelation = ''):
|
||||
#--------------------------
|
||||
import os,damask.environment
|
||||
|
||||
MSCpath = damask.environment.Environment(rootRelation).options['MSC_ROOT']
|
||||
|
@ -40,7 +37,6 @@ class Marc(Solver):
|
|||
|
||||
#--------------------------
|
||||
def libraryPath(self,rootRelation = '',releases = []):
|
||||
#--------------------------
|
||||
import os,damask.environment
|
||||
|
||||
MSCpath = damask.environment.Environment(rootRelation).options['MSC_ROOT']
|
||||
|
@ -59,7 +55,6 @@ class Marc(Solver):
|
|||
|
||||
#--------------------------
|
||||
def toolsPath(self,rootRelation = '',release = ''):
|
||||
#--------------------------
|
||||
import os,damask.environment
|
||||
|
||||
MSCpath = damask.environment.Environment(rootRelation).options['MSC_ROOT']
|
||||
|
@ -72,7 +67,6 @@ class Marc(Solver):
|
|||
|
||||
#--------------------------
|
||||
def submit_job(self,
|
||||
#--------------------------
|
||||
rootRelation = '',
|
||||
release = '',
|
||||
model = 'model',
|
||||
|
@ -84,7 +78,7 @@ class Marc(Solver):
|
|||
):
|
||||
|
||||
import os,damask.environment
|
||||
import subprocess,shlex,shutil
|
||||
import subprocess,shlex
|
||||
|
||||
if len(release) == 0: release = self.version(rootRelation)
|
||||
|
||||
|
@ -94,7 +88,7 @@ class Marc(Solver):
|
|||
|
||||
damaskEnv = damask.environment.Environment(rootRelation)
|
||||
|
||||
user = os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc') # might be updated if special version is found (usually symlink)
|
||||
user = os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc') # might be updated if special version (symlink) is found
|
||||
if compile:
|
||||
if os.path.isfile(os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc%s.f90'%release)):
|
||||
user = os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc%s'%release)
|
||||
|
@ -123,7 +117,6 @@ class Marc(Solver):
|
|||
|
||||
#--------------------------
|
||||
def exit_number_from_outFile(self,outFile=None):
|
||||
#--------------------------
|
||||
import string
|
||||
exitnumber = -1
|
||||
fid_out = open(outFile,'r')
|
||||
|
|
|
@ -5,10 +5,11 @@
|
|||
import damask.solver
|
||||
|
||||
class Solver():
|
||||
'''
|
||||
General class for solver specific functionality.
|
||||
Sub-classed by the individual solvers.
|
||||
'''
|
||||
"""
|
||||
General class for solver specific functionality.
|
||||
|
||||
Sub-classed by the individual solvers.
|
||||
"""
|
||||
|
||||
def __init__(self,solver=''):
|
||||
solverClass = {
|
||||
|
|
Loading…
Reference in New Issue