Merge remote-tracking branch 'origin/marc-solver-polish' into development

This commit is contained in:
Franz Roters 2021-08-26 08:59:02 +02:00
commit 69bafea023
1 changed files with 17 additions and 1 deletions

View File

@ -8,7 +8,7 @@ _msc_root = '/opt/msc'
_damask_root = str(Path(__file__).parents[3])
class Marc:
"""Wrapper to run DAMASK with MSCMarc."""
"""Wrapper to run DAMASK with MSC.Marc."""
def __init__(self,msc_version=_msc_version,msc_root=_msc_root,damask_root=_damask_root):
"""
@ -47,7 +47,23 @@ class Marc:
def submit_job(self, model, job,
compile = False,
optimization = ''):
"""
Assemble command line arguments and call Marc executable.
Parameters
----------
model : str
Name of model.
job : str
Name of job.
compile : bool, optional
Compile DAMASK_Marc user subroutine (and save for future use).
Defaults to False.
optimization : str, optional
Optimization level '' (-O0), 'l' (-O1), or 'h' (-O3).
Defaults to ''.
"""
usersub = (self.damask_root/'src/DAMASK_Marc').with_suffix('.f90' if compile else '.marc')
if not usersub.is_file():
raise FileNotFoundError(f'subroutine ({"source" if compile else "binary"}) "{usersub}" not found')