Merge branch 'development' into consistent-naming
This commit is contained in:
commit
9cf2a5ed19
|
@ -2,4 +2,4 @@
|
||||||
set DAMASK_NUM_THREADS = 4
|
set DAMASK_NUM_THREADS = 4
|
||||||
|
|
||||||
set MSC_ROOT = /opt/msc
|
set MSC_ROOT = /opt/msc
|
||||||
set MARC_VERSION = 2019.1
|
set MSC_VERSION = 2019.1
|
||||||
|
|
|
@ -7,7 +7,7 @@ from pathlib import Path
|
||||||
|
|
||||||
import damask
|
import damask
|
||||||
|
|
||||||
marc_version = float(damask.environment.options['MARC_VERSION'])
|
marc_version = float(damask.environment.options['MSC_VERSION'])
|
||||||
if int(marc_version) == marc_version:
|
if int(marc_version) == marc_version:
|
||||||
marc_version = int(marc_version)
|
marc_version = int(marc_version)
|
||||||
msc_root = Path(damask.environment.options['MSC_ROOT'])
|
msc_root = Path(damask.environment.options['MSC_ROOT'])
|
||||||
|
@ -15,7 +15,7 @@ damask_root = damask.environment.root_dir
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Apply DAMASK modification to MSC.Marc/Mentat',
|
description='Apply DAMASK modification to MSC.Marc/Mentat',
|
||||||
epilog = f'MSC_ROOT={msc_root} and MARC_VERSION={marc_version} (from {damask_root}/env/CONFIG)')
|
epilog = f'MSC_ROOT={msc_root} and MSC_VERSION={marc_version} (from {damask_root}/env/CONFIG)')
|
||||||
parser.add_argument('--editor', dest='editor', metavar='string', default='vi',
|
parser.add_argument('--editor', dest='editor', metavar='string', default='vi',
|
||||||
help='Name of the editor for MSC.Mentat (executable)')
|
help='Name of the editor for MSC.Mentat (executable)')
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ parser.add_argument('--editor', dest='editor', metavar='string', default='vi',
|
||||||
def copy_and_replace(in_file,dst):
|
def copy_and_replace(in_file,dst):
|
||||||
with open(in_file) as f:
|
with open(in_file) as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
content = content.replace('%INSTALLDIR%',msc_root)
|
content = content.replace('%INSTALLDIR%',str(msc_root))
|
||||||
content = content.replace('%VERSION%',str(marc_version))
|
content = content.replace('%VERSION%',str(marc_version))
|
||||||
content = content.replace('%EDITOR%', parser.parse_args().editor)
|
content = content.replace('%EDITOR%', parser.parse_args().editor)
|
||||||
with open(dst/Path(in_file).name,'w') as f:
|
with open(dst/Path(in_file).name,'w') as f:
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Environment:
|
||||||
options = {}
|
options = {}
|
||||||
for item in ['DAMASK_NUM_THREADS',
|
for item in ['DAMASK_NUM_THREADS',
|
||||||
'MSC_ROOT',
|
'MSC_ROOT',
|
||||||
'MARC_VERSION',
|
'MSC_VERSION',
|
||||||
]:
|
]:
|
||||||
options[item] = os.environ[item] if item in os.environ else None
|
options[item] = os.environ[item] if item in os.environ else None
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ from .. import environment
|
||||||
class Marc:
|
class Marc:
|
||||||
"""Wrapper to run DAMASK with MSCMarc."""
|
"""Wrapper to run DAMASK with MSCMarc."""
|
||||||
|
|
||||||
def __init__(self,version=environment.options['MARC_VERSION']):
|
def __init__(self,version=environment.options['MSC_VERSION']):
|
||||||
"""
|
"""
|
||||||
Create a Marc solver object.
|
Create a Marc solver object.
|
||||||
|
|
||||||
|
|
|
@ -315,7 +315,6 @@ function crystallite_stress()
|
||||||
c, & !< counter in integration point component loop
|
c, & !< counter in integration point component loop
|
||||||
i, & !< counter in integration point loop
|
i, & !< counter in integration point loop
|
||||||
e, & !< counter in element loop
|
e, & !< counter in element loop
|
||||||
startIP, endIP, &
|
|
||||||
s
|
s
|
||||||
logical, dimension(homogenization_maxNconstituents,discretization_nIPs,discretization_Nelems) :: todo !ToDo: need to set some values to false for different Ngrains
|
logical, dimension(homogenization_maxNconstituents,discretization_nIPs,discretization_Nelems) :: todo !ToDo: need to set some values to false for different Ngrains
|
||||||
real(pReal), dimension(:,:,:,:,:), allocatable :: &
|
real(pReal), dimension(:,:,:,:,:), allocatable :: &
|
||||||
|
@ -356,17 +355,8 @@ function crystallite_stress()
|
||||||
enddo elementLooping1
|
enddo elementLooping1
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
singleRun: if (FEsolving_execELem(1) == FEsolving_execElem(2) .and. &
|
|
||||||
FEsolving_execIP (1) == FEsolving_execIP (2)) then
|
|
||||||
startIP = FEsolving_execIP(1)
|
|
||||||
endIP = startIP
|
|
||||||
else singleRun
|
|
||||||
startIP = 1
|
|
||||||
endIP = discretization_nIPs
|
|
||||||
endif singleRun
|
|
||||||
|
|
||||||
NiterationCrystallite = 0
|
NiterationCrystallite = 0
|
||||||
cutbackLooping: do while (any(todo(:,startIP:endIP,FEsolving_execELem(1):FEsolving_execElem(2))))
|
cutbackLooping: do while (any(todo(:,FEsolving_execIP(1):FEsolving_execIP(2),FEsolving_execELem(1):FEsolving_execElem(2))))
|
||||||
NiterationCrystallite = NiterationCrystallite + 1
|
NiterationCrystallite = NiterationCrystallite + 1
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -428,9 +418,9 @@ function crystallite_stress()
|
||||||
crystallite_subF(1:3,1:3,c,i,e) = crystallite_subF0(1:3,1:3,c,i,e) &
|
crystallite_subF(1:3,1:3,c,i,e) = crystallite_subF0(1:3,1:3,c,i,e) &
|
||||||
+ crystallite_subStep(c,i,e) *( crystallite_partitionedF (1:3,1:3,c,i,e) &
|
+ crystallite_subStep(c,i,e) *( crystallite_partitionedF (1:3,1:3,c,i,e) &
|
||||||
-crystallite_partitionedF0(1:3,1:3,c,i,e))
|
-crystallite_partitionedF0(1:3,1:3,c,i,e))
|
||||||
crystallite_Fe(1:3,1:3,c,i,e) = matmul(matmul(crystallite_subF(1:3,1:3,c,i,e), &
|
crystallite_Fe(1:3,1:3,c,i,e) = matmul(crystallite_subF(1:3,1:3,c,i,e), &
|
||||||
math_inv33(crystallite_Fp(1:3,1:3,c,i,e))), &
|
math_inv33(matmul(crystallite_Fi(1:3,1:3,c,i,e), &
|
||||||
math_inv33(crystallite_Fi(1:3,1:3,c,i,e)))
|
crystallite_Fp(1:3,1:3,c,i,e))))
|
||||||
crystallite_subdt(c,i,e) = crystallite_subStep(c,i,e) * crystallite_dt(c,i,e)
|
crystallite_subdt(c,i,e) = crystallite_subStep(c,i,e) * crystallite_dt(c,i,e)
|
||||||
crystallite_converged(c,i,e) = .false.
|
crystallite_converged(c,i,e) = .false.
|
||||||
call integrateState(c,i,e)
|
call integrateState(c,i,e)
|
||||||
|
|
Loading…
Reference in New Issue