Merge branch 'development' into 43-wrong-stress-in-dotstate-and-deltastate
This commit is contained in:
commit
f98243e4ac
|
@ -29,6 +29,11 @@ before_script:
|
||||||
done
|
done
|
||||||
- source $DAMASKROOT/env/DAMASK.sh
|
- source $DAMASKROOT/env/DAMASK.sh
|
||||||
- cd $DAMASKROOT/PRIVATE/testing
|
- cd $DAMASKROOT/PRIVATE/testing
|
||||||
|
- echo Job start:" $(date)"
|
||||||
|
|
||||||
|
###################################################################################################
|
||||||
|
after_script:
|
||||||
|
- echo Job end:" $(date)"
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
variables:
|
variables:
|
||||||
|
@ -47,6 +52,7 @@ variables:
|
||||||
# ===============================================================================================
|
# ===============================================================================================
|
||||||
# ++++++++++++ Compiler ++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++ Compiler ++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
IntelCompiler16_0: "Compiler/Intel/16.0 Libraries/IMKL/2016"
|
IntelCompiler16_0: "Compiler/Intel/16.0 Libraries/IMKL/2016"
|
||||||
|
IntelCompiler16_4: "Compiler/Intel/16.4 Libraries/IMKL/2016-4"
|
||||||
IntelCompiler17_0: "Compiler/Intel/17.0 Libraries/IMKL/2017"
|
IntelCompiler17_0: "Compiler/Intel/17.0 Libraries/IMKL/2017"
|
||||||
IntelCompiler18_1: "Compiler/Intel/18.1 Libraries/IMKL/2018"
|
IntelCompiler18_1: "Compiler/Intel/18.1 Libraries/IMKL/2018"
|
||||||
GNUCompiler7_3: "Compiler/GNU/7.3"
|
GNUCompiler7_3: "Compiler/GNU/7.3"
|
||||||
|
@ -347,7 +353,7 @@ TextureComponents:
|
||||||
Marc_compileIfort2017:
|
Marc_compileIfort2017:
|
||||||
stage: compileMarc2017
|
stage: compileMarc2017
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler17_0 $MSC2017
|
- module load $IntelCompiler16_4 $MSC2017
|
||||||
- Marc_compileIfort/test.py -m 2017
|
- Marc_compileIfort/test.py -m 2017
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -357,7 +363,7 @@ Marc_compileIfort2017:
|
||||||
Hex_elastic:
|
Hex_elastic:
|
||||||
stage: marc
|
stage: marc
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler17_0 $MSC
|
- module load $IntelCompiler16_4 $MSC
|
||||||
- Hex_elastic/test.py
|
- Hex_elastic/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -366,7 +372,7 @@ Hex_elastic:
|
||||||
CubicFCC_elastic:
|
CubicFCC_elastic:
|
||||||
stage: marc
|
stage: marc
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler17_0 $MSC
|
- module load $IntelCompiler16_4 $MSC
|
||||||
- CubicFCC_elastic/test.py
|
- CubicFCC_elastic/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -375,7 +381,7 @@ CubicFCC_elastic:
|
||||||
CubicBCC_elastic:
|
CubicBCC_elastic:
|
||||||
stage: marc
|
stage: marc
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler17_0 $MSC
|
- module load $IntelCompiler16_4 $MSC
|
||||||
- CubicBCC_elastic/test.py
|
- CubicBCC_elastic/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -384,7 +390,7 @@ CubicBCC_elastic:
|
||||||
J2_plasticBehavior:
|
J2_plasticBehavior:
|
||||||
stage: marc
|
stage: marc
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler17_0 $MSC
|
- module load $IntelCompiler16_4 $MSC
|
||||||
- J2_plasticBehavior/test.py
|
- J2_plasticBehavior/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -394,7 +400,7 @@ J2_plasticBehavior:
|
||||||
Abaqus_compile2017:
|
Abaqus_compile2017:
|
||||||
stage: compileAbaqus2017
|
stage: compileAbaqus2017
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler16_0 $Abaqus2017
|
- module load $IntelCompiler16_4 $Abaqus2017
|
||||||
- Abaqus_compileIfort/test.py -a 2017
|
- Abaqus_compileIfort/test.py -a 2017
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
@ -410,7 +416,7 @@ SpectralExample:
|
||||||
AbaqusExample:
|
AbaqusExample:
|
||||||
stage: example
|
stage: example
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler16_0 $Abaqus
|
- module load $IntelCompiler16_4 $Abaqus
|
||||||
- Abaqus_example/test.py
|
- Abaqus_example/test.py
|
||||||
only:
|
only:
|
||||||
- development
|
- development
|
||||||
|
|
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit a764ade044735df35fac93a5204446291ee29abc
|
Subproject commit 2c40bb79f9a57d2178eb7be0e533fd5104f9f87e
|
|
@ -18,5 +18,5 @@ tau0_slip 405.8e6 456.7e6 # per family
|
||||||
tausat_slip 872.9e6 971.2e6 # per family
|
tausat_slip 872.9e6 971.2e6 # per family
|
||||||
h0_slipslip 563.0e9
|
h0_slipslip 563.0e9
|
||||||
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
||||||
w0_slip 2.0
|
a_slip 2.0
|
||||||
(output) totalshear
|
(output) totalshear
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTRAN $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTHIGH $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTLOW $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTRAN $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTHIGH $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTLOW $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -58,15 +58,9 @@ echo "Editor: $EDITOR"
|
||||||
echo ''
|
echo ''
|
||||||
echo 'adapting Marc tools...'
|
echo 'adapting Marc tools...'
|
||||||
theDIR=$INSTALLDIR/marc$VERSION/tools
|
theDIR=$INSTALLDIR/marc$VERSION/tools
|
||||||
for filename in 'comp_damask' \
|
for filename in 'comp_damask_mp' \
|
||||||
'comp_damask_l' \
|
|
||||||
'comp_damask_h' \
|
|
||||||
'comp_damask_mp' \
|
|
||||||
'comp_damask_lmp' \
|
'comp_damask_lmp' \
|
||||||
'comp_damask_hmp' \
|
'comp_damask_hmp' \
|
||||||
'run_damask' \
|
|
||||||
'run_damask_l' \
|
|
||||||
'run_damask_h' \
|
|
||||||
'run_damask_mp' \
|
'run_damask_mp' \
|
||||||
'run_damask_lmp' \
|
'run_damask_lmp' \
|
||||||
'run_damask_hmp' \
|
'run_damask_hmp' \
|
||||||
|
@ -85,15 +79,9 @@ for filename in 'edit_window' \
|
||||||
'submit4' \
|
'submit4' \
|
||||||
'submit5' \
|
'submit5' \
|
||||||
'submit6' \
|
'submit6' \
|
||||||
'submit7' \
|
|
||||||
'submit8' \
|
|
||||||
'submit9' \
|
|
||||||
'kill4' \
|
'kill4' \
|
||||||
'kill5' \
|
'kill5' \
|
||||||
'kill6' \
|
'kill6'; do
|
||||||
'kill7' \
|
|
||||||
'kill8' \
|
|
||||||
'kill9'; do
|
|
||||||
cp $SCRIPTLOCATION/$VERSION/Mentat_bin/$filename $theDIR
|
cp $SCRIPTLOCATION/$VERSION/Mentat_bin/$filename $theDIR
|
||||||
echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g"
|
echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g"
|
||||||
echo $theDIR/$filename | xargs perl -pi -e "s:%VERSION%:${VERSION}:g"
|
echo $theDIR/$filename | xargs perl -pi -e "s:%VERSION%:${VERSION}:g"
|
||||||
|
@ -122,8 +110,8 @@ echo ''
|
||||||
echo 'setting file access rights...'
|
echo 'setting file access rights...'
|
||||||
for filename in marc$VERSION/tools/run_damask* \
|
for filename in marc$VERSION/tools/run_damask* \
|
||||||
marc$VERSION/tools/comp_damask* \
|
marc$VERSION/tools/comp_damask* \
|
||||||
mentat$VERSION/bin/submit{4..9} \
|
mentat$VERSION/bin/submit{4..6} \
|
||||||
mentat$VERSION/bin/kill{4..9} ; do
|
mentat$VERSION/bin/kill{4..6} ; do
|
||||||
chmod 755 $INSTALLDIR/${filename}
|
chmod 755 $INSTALLDIR/${filename}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -142,10 +130,7 @@ if [ -d "$BIN_DIR" ]; then
|
||||||
echo 'creating symlinks ...'
|
echo 'creating symlinks ...'
|
||||||
echo''
|
echo''
|
||||||
theDIR=$INSTALLDIR/marc$VERSION/tools
|
theDIR=$INSTALLDIR/marc$VERSION/tools
|
||||||
for filename in 'run_damask' \
|
for filename in 'run_damask_mp' \
|
||||||
'run_damask_l' \
|
|
||||||
'run_damask_h' \
|
|
||||||
'run_damask_mp' \
|
|
||||||
'run_damask_lmp' \
|
'run_damask_lmp' \
|
||||||
'run_damask_hmp'; do
|
'run_damask_hmp'; do
|
||||||
echo ${filename:4}$VERSION
|
echo ${filename:4}$VERSION
|
||||||
|
|
|
@ -21,16 +21,10 @@ The structure of this directory should be (VERSION = 20XX or 20XX.Y)
|
||||||
./installation.txt this text
|
./installation.txt this text
|
||||||
./apply_MPIE_modifications script file to apply modifications to the installation
|
./apply_MPIE_modifications script file to apply modifications to the installation
|
||||||
./VERSION/Marc_tools/comp_user.original original file from installation
|
./VERSION/Marc_tools/comp_user.original original file from installation
|
||||||
./VERSION/Marc_tools/comp_damask modified version using -O1 optimization
|
|
||||||
./VERSION/Marc_tools/comp_damask_l modified version using -O0 optimization
|
|
||||||
./VERSION/Marc_tools/comp_damask_h modified version using -O2 optimization
|
|
||||||
./VERSION/Marc_tools/comp_damask_mp modified version using -O1 optimization and OpenMP
|
./VERSION/Marc_tools/comp_damask_mp modified version using -O1 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/comp_damask_lmp modified version using -O0 optimization and OpenMP
|
./VERSION/Marc_tools/comp_damask_lmp modified version using -O0 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/comp_damask_hmp modified version using -O2 optimization and OpenMP
|
./VERSION/Marc_tools/comp_damask_hmp modified version using -O2 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/run_marc.original original file from installation
|
./VERSION/Marc_tools/run_marc.original original file from installation
|
||||||
./VERSION/Marc_tools/run_damask modified version using -O1 optimization
|
|
||||||
./VERSION/Marc_tools/run_damask_l modified version using -O0 optimization
|
|
||||||
./VERSION/Marc_tools/run_damask_h modified version using -O2 optimization
|
|
||||||
./VERSION/Marc_tools/run_damask_mp modified version using -O1 optimization and OpenMP
|
./VERSION/Marc_tools/run_damask_mp modified version using -O1 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/run_damask_lmp modified version using -O0 optimization and OpenMP
|
./VERSION/Marc_tools/run_damask_lmp modified version using -O0 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/run_damask_hmp modified version using -O2 optimization and OpenMP
|
./VERSION/Marc_tools/run_damask_hmp modified version using -O2 optimization and OpenMP
|
||||||
|
@ -42,14 +36,8 @@ The structure of this directory should be (VERSION = 20XX or 20XX.Y)
|
||||||
./VERSION/Mentat_bin/submit4 modified version of original calling run_h_marc
|
./VERSION/Mentat_bin/submit4 modified version of original calling run_h_marc
|
||||||
./VERSION/Mentat_bin/submit5 modified version of original calling run_marc
|
./VERSION/Mentat_bin/submit5 modified version of original calling run_marc
|
||||||
./VERSION/Mentat_bin/submit6 modified version of original calling run_l_marc
|
./VERSION/Mentat_bin/submit6 modified version of original calling run_l_marc
|
||||||
./VERSION/Mentat_bin/submit7 modified version of original calling run_hmp_marc
|
|
||||||
./VERSION/Mentat_bin/submit8 modified version of original calling run_mp_marc
|
|
||||||
./VERSION/Mentat_bin/submit9 modified version of original calling run_lmp_marc
|
|
||||||
./VERSION/Mentat_bin/kill4 kill file for submit4, identical to original kill1
|
./VERSION/Mentat_bin/kill4 kill file for submit4, identical to original kill1
|
||||||
./VERSION/Mentat_bin/kill5 kill file for submit5, identical to original kill1
|
./VERSION/Mentat_bin/kill5 kill file for submit5, identical to original kill1
|
||||||
./VERSION/Mentat_bin/kill6 kill file for submit6, identical to original kill1
|
./VERSION/Mentat_bin/kill6 kill file for submit6, identical to original kill1
|
||||||
./VERSION/Mentat_bin/kill7 kill file for submit7, identical to original kill1
|
|
||||||
./VERSION/Mentat_bin/kill8 kill file for submit8, identical to original kill1
|
|
||||||
./VERSION/Mentat_bin/kill9 kill file for submit9, identical to original kill1
|
|
||||||
./VERSION/Mentat_menus/job_run.ms.original original file from installation
|
./VERSION/Mentat_menus/job_run.ms.original original file from installation
|
||||||
./VERSION/Mentat_menus/job_run.ms modified version adding DAMASK menu to run menu
|
./VERSION/Mentat_menus/job_run.ms modified version adding DAMASK menu to run menu
|
||||||
|
|
|
@ -25,8 +25,12 @@ add_library(IO OBJECT "IO.f90")
|
||||||
add_dependencies(IO DAMASK_INTERFACE)
|
add_dependencies(IO DAMASK_INTERFACE)
|
||||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:IO>)
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:IO>)
|
||||||
|
|
||||||
|
add_library(HDF5_UTILITIES OBJECT "HDF5_utilities.f90")
|
||||||
|
add_dependencies(HDF5_UTILITIES IO)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:HDF5_UTILITIES>)
|
||||||
|
|
||||||
add_library(NUMERICS OBJECT "numerics.f90")
|
add_library(NUMERICS OBJECT "numerics.f90")
|
||||||
add_dependencies(NUMERICS IO)
|
add_dependencies(NUMERICS HDF5_UTILITIES)
|
||||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:NUMERICS>)
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:NUMERICS>)
|
||||||
|
|
||||||
add_library(DEBUG OBJECT "debug.f90")
|
add_library(DEBUG OBJECT "debug.f90")
|
||||||
|
|
|
@ -27,9 +27,7 @@ program DAMASK_spectral
|
||||||
getSolverJobName, &
|
getSolverJobName, &
|
||||||
interface_restartInc
|
interface_restartInc
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_read, &
|
|
||||||
IO_isBlank, &
|
IO_isBlank, &
|
||||||
IO_open_file, &
|
|
||||||
IO_stringPos, &
|
IO_stringPos, &
|
||||||
IO_stringValue, &
|
IO_stringValue, &
|
||||||
IO_floatValue, &
|
IO_floatValue, &
|
||||||
|
@ -38,8 +36,7 @@ program DAMASK_spectral
|
||||||
IO_lc, &
|
IO_lc, &
|
||||||
IO_intOut, &
|
IO_intOut, &
|
||||||
IO_warning, &
|
IO_warning, &
|
||||||
IO_timeStamp, &
|
IO_timeStamp
|
||||||
IO_EOF
|
|
||||||
use debug, only: &
|
use debug, only: &
|
||||||
debug_level, &
|
debug_level, &
|
||||||
debug_spectral, &
|
debug_spectral, &
|
||||||
|
@ -90,7 +87,6 @@ program DAMASK_spectral
|
||||||
! variables related to information from load case and geom file
|
! variables related to information from load case and geom file
|
||||||
real(pReal), dimension(9) :: temp_valueVector = 0.0_pReal !< temporarily from loadcase file when reading in tensors (initialize to 0.0)
|
real(pReal), dimension(9) :: temp_valueVector = 0.0_pReal !< temporarily from loadcase file when reading in tensors (initialize to 0.0)
|
||||||
logical, dimension(9) :: temp_maskVector = .false. !< temporarily from loadcase file when reading in tensors
|
logical, dimension(9) :: temp_maskVector = .false. !< temporarily from loadcase file when reading in tensors
|
||||||
integer(pInt), parameter :: FILEUNIT = 234_pInt !< file unit, DAMASK IO does not support newunit feature
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
integer(pInt), allocatable, dimension(:) :: chunkPos
|
||||||
|
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
|
@ -118,7 +114,7 @@ program DAMASK_spectral
|
||||||
stagIterate
|
stagIterate
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
i, j, k, l, field, &
|
i, j, k, l, field, &
|
||||||
errorID, &
|
errorID = 0_pInt, &
|
||||||
cutBackLevel = 0_pInt, & !< cut back level \f$ t = \frac{t_{inc}}{2^l} \f$
|
cutBackLevel = 0_pInt, & !< cut back level \f$ t = \frac{t_{inc}}{2^l} \f$
|
||||||
stepFraction = 0_pInt !< fraction of current time interval
|
stepFraction = 0_pInt !< fraction of current time interval
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
|
@ -127,7 +123,8 @@ program DAMASK_spectral
|
||||||
totalIncsCounter = 0_pInt, & !< total # of increments
|
totalIncsCounter = 0_pInt, & !< total # of increments
|
||||||
convergedCounter = 0_pInt, & !< # of converged increments
|
convergedCounter = 0_pInt, & !< # of converged increments
|
||||||
notConvergedCounter = 0_pInt, & !< # of non-converged increments
|
notConvergedCounter = 0_pInt, & !< # of non-converged increments
|
||||||
resUnit = 0_pInt, & !< file unit for results writing
|
fileUnit = 0_pInt, & !< file unit for reading load case and writing results
|
||||||
|
myStat, &
|
||||||
statUnit = 0_pInt, & !< file unit for statistics output
|
statUnit = 0_pInt, & !< file unit for statistics output
|
||||||
lastRestartWritten = 0_pInt, & !< total increment # at which last restart information was written
|
lastRestartWritten = 0_pInt, & !< total increment # at which last restart information was written
|
||||||
stagIter
|
stagIter
|
||||||
|
@ -136,6 +133,7 @@ program DAMASK_spectral
|
||||||
incInfo, & !< string parsed to solution with information about current load case
|
incInfo, & !< string parsed to solution with information about current load case
|
||||||
workingDir
|
workingDir
|
||||||
type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases
|
type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases
|
||||||
|
type(tLoadCase) :: newLoadCase
|
||||||
type(tSolutionState), allocatable, dimension(:) :: solres
|
type(tSolutionState), allocatable, dimension(:) :: solres
|
||||||
integer(MPI_OFFSET_KIND) :: fileOffset
|
integer(MPI_OFFSET_KIND) :: fileOffset
|
||||||
integer(MPI_OFFSET_KIND), dimension(:), allocatable :: outputSize
|
integer(MPI_OFFSET_KIND), dimension(:), allocatable :: outputSize
|
||||||
|
@ -143,6 +141,12 @@ program DAMASK_spectral
|
||||||
integer(pInt), parameter :: maxRealOut = maxByteOut/pReal
|
integer(pInt), parameter :: maxRealOut = maxByteOut/pReal
|
||||||
integer(pLongInt), dimension(2) :: outputIndex
|
integer(pLongInt), dimension(2) :: outputIndex
|
||||||
integer :: ierr
|
integer :: ierr
|
||||||
|
procedure(basic_init), pointer :: &
|
||||||
|
mech_init
|
||||||
|
procedure(basic_forward), pointer :: &
|
||||||
|
mech_forward
|
||||||
|
procedure(basic_solution), pointer :: &
|
||||||
|
mech_solution
|
||||||
|
|
||||||
external :: &
|
external :: &
|
||||||
quit
|
quit
|
||||||
|
@ -162,15 +166,40 @@ program DAMASK_spectral
|
||||||
if (any(thermal_type == THERMAL_conduction_ID )) nActiveFields = nActiveFields + 1
|
if (any(thermal_type == THERMAL_conduction_ID )) nActiveFields = nActiveFields + 1
|
||||||
if (any(damage_type == DAMAGE_nonlocal_ID )) nActiveFields = nActiveFields + 1
|
if (any(damage_type == DAMAGE_nonlocal_ID )) nActiveFields = nActiveFields + 1
|
||||||
allocate(solres(nActiveFields))
|
allocate(solres(nActiveFields))
|
||||||
|
allocate(newLoadCase%ID(nActiveFields))
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! reading basic information from load case file and allocate data structure containing load cases
|
! assign mechanics solver depending on selected type
|
||||||
call IO_open_file(FILEUNIT,trim(loadCaseFile))
|
select case (spectral_solver)
|
||||||
rewind(FILEUNIT)
|
case (DAMASK_spectral_SolverBasic_label)
|
||||||
|
mech_init => basic_init
|
||||||
|
mech_forward => basic_forward
|
||||||
|
mech_solution => basic_solution
|
||||||
|
|
||||||
|
case (DAMASK_spectral_SolverPolarisation_label)
|
||||||
|
if(iand(debug_level(debug_spectral),debug_levelBasic)/= 0) &
|
||||||
|
call IO_warning(42_pInt, ext_msg='debug Divergence')
|
||||||
|
mech_init => polarisation_init
|
||||||
|
mech_forward => polarisation_forward
|
||||||
|
mech_solution => polarisation_solution
|
||||||
|
|
||||||
|
case default
|
||||||
|
call IO_error(error_ID = 891_pInt, ext_msg = trim(spectral_solver))
|
||||||
|
|
||||||
|
end select
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! reading information from load case file and to sanity checks
|
||||||
|
allocate (loadCases(0)) ! array of load cases
|
||||||
|
open(newunit=fileunit,iostat=myStat,file=trim(loadCaseFile),action='read')
|
||||||
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=trim(loadCaseFile))
|
||||||
do
|
do
|
||||||
line = IO_read(FILEUNIT)
|
read(fileUnit, '(A)', iostat=myStat) line
|
||||||
if (trim(line) == IO_EOF) exit
|
if ( myStat /= 0_pInt) exit
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
if (IO_isBlank(line)) cycle ! skip empty lines
|
||||||
|
|
||||||
|
currentLoadCase = currentLoadCase + 1_pInt
|
||||||
|
|
||||||
chunkPos = IO_stringPos(line)
|
chunkPos = IO_stringPos(line)
|
||||||
do i = 1_pInt, chunkPos(1) ! reading compulsory parameters for loadcase
|
do i = 1_pInt, chunkPos(1) ! reading compulsory parameters for loadcase
|
||||||
select case (IO_lc(IO_stringValue(line,chunkPos,i)))
|
select case (IO_lc(IO_stringValue(line,chunkPos,i)))
|
||||||
|
@ -181,83 +210,65 @@ program DAMASK_spectral
|
||||||
case('n','incs','increments','steps','logincs','logincrements','logsteps')
|
case('n','incs','increments','steps','logincs','logincrements','logsteps')
|
||||||
N_n = N_n + 1_pInt
|
N_n = N_n + 1_pInt
|
||||||
end select
|
end select
|
||||||
enddo ! count all identifiers to allocate memory and do sanity check
|
enddo
|
||||||
enddo
|
if ((N_def /= N_n) .or. (N_n /= N_t) .or. N_n < 1_pInt) & ! sanity check
|
||||||
|
call IO_error(error_ID=837_pInt,el=currentLoadCase,ext_msg = trim(loadCaseFile)) ! error message for incomplete loadcase
|
||||||
|
|
||||||
if ((N_def /= N_n) .or. (N_n /= N_t) .or. N_n < 1_pInt) & ! sanity check
|
newLoadCase%stress%myType='stress'
|
||||||
call IO_error(error_ID=837_pInt,ext_msg = trim(loadCaseFile)) ! error message for incomplete loadcase
|
|
||||||
allocate (loadCases(N_n)) ! array of load cases
|
|
||||||
loadCases%stress%myType='stress'
|
|
||||||
|
|
||||||
do i = 1, size(loadCases)
|
|
||||||
allocate(loadCases(i)%ID(nActiveFields))
|
|
||||||
field = 1
|
field = 1
|
||||||
loadCases(i)%ID(field) = FIELD_MECH_ID ! mechanical active by default
|
newLoadCase%ID(field) = FIELD_MECH_ID ! mechanical active by default
|
||||||
thermalActive: if (any(thermal_type == THERMAL_conduction_ID)) then
|
thermalActive: if (any(thermal_type == THERMAL_conduction_ID)) then
|
||||||
field = field + 1
|
field = field + 1
|
||||||
loadCases(i)%ID(field) = FIELD_THERMAL_ID
|
newLoadCase%ID(field) = FIELD_THERMAL_ID
|
||||||
endif thermalActive
|
endif thermalActive
|
||||||
damageActive: if (any(damage_type == DAMAGE_nonlocal_ID)) then
|
damageActive: if (any(damage_type == DAMAGE_nonlocal_ID)) then
|
||||||
field = field + 1
|
field = field + 1
|
||||||
loadCases(i)%ID(field) = FIELD_DAMAGE_ID
|
newLoadCase%ID(field) = FIELD_DAMAGE_ID
|
||||||
endif damageActive
|
endif damageActive
|
||||||
enddo
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
readIn: do i = 1_pInt, chunkPos(1)
|
||||||
! reading the load case and assign values to the allocated data structure
|
|
||||||
rewind(FILEUNIT)
|
|
||||||
do
|
|
||||||
line = IO_read(FILEUNIT)
|
|
||||||
if (trim(line) == IO_EOF) exit
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
currentLoadCase = currentLoadCase + 1_pInt
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
do i = 1_pInt, chunkPos(1)
|
|
||||||
select case (IO_lc(IO_stringValue(line,chunkPos,i)))
|
select case (IO_lc(IO_stringValue(line,chunkPos,i)))
|
||||||
case('fdot','dotf','l','velocitygrad','velgrad','velocitygradient','f') ! assign values for the deformation BC matrix
|
case('fdot','dotf','l','velocitygrad','velgrad','velocitygradient','f') ! assign values for the deformation BC matrix
|
||||||
temp_valueVector = 0.0_pReal
|
temp_valueVector = 0.0_pReal
|
||||||
if (IO_lc(IO_stringValue(line,chunkPos,i)) == 'fdot'.or. & ! in case of Fdot, set type to fdot
|
if (IO_lc(IO_stringValue(line,chunkPos,i)) == 'fdot'.or. & ! in case of Fdot, set type to fdot
|
||||||
IO_lc(IO_stringValue(line,chunkPos,i)) == 'dotf') then
|
IO_lc(IO_stringValue(line,chunkPos,i)) == 'dotf') then
|
||||||
loadCases(currentLoadCase)%deformation%myType = 'fdot'
|
newLoadCase%deformation%myType = 'fdot'
|
||||||
else if (IO_lc(IO_stringValue(line,chunkPos,i)) == 'f') then
|
else if (IO_lc(IO_stringValue(line,chunkPos,i)) == 'f') then
|
||||||
loadCases(currentLoadCase)%deformation%myType = 'f'
|
newLoadCase%deformation%myType = 'f'
|
||||||
else
|
else
|
||||||
loadCases(currentLoadCase)%deformation%myType = 'l'
|
newLoadCase%deformation%myType = 'l'
|
||||||
endif
|
endif
|
||||||
do j = 1_pInt, 9_pInt
|
do j = 1_pInt, 9_pInt
|
||||||
temp_maskVector(j) = IO_stringValue(line,chunkPos,i+j) /= '*' ! true if not a *
|
temp_maskVector(j) = IO_stringValue(line,chunkPos,i+j) /= '*' ! true if not a *
|
||||||
if (temp_maskVector(j)) temp_valueVector(j) = IO_floatValue(line,chunkPos,i+j) ! read value where applicable
|
if (temp_maskVector(j)) temp_valueVector(j) = IO_floatValue(line,chunkPos,i+j) ! read value where applicable
|
||||||
enddo
|
enddo
|
||||||
loadCases(currentLoadCase)%deformation%maskLogical = & ! logical mask in 3x3 notation
|
newLoadCase%deformation%maskLogical = transpose(reshape(temp_maskVector,[ 3,3])) ! logical mask in 3x3 notation
|
||||||
transpose(reshape(temp_maskVector,[ 3,3]))
|
newLoadCase%deformation%maskFloat = merge(ones,zeros,newLoadCase%deformation%maskLogical)! float (1.0/0.0) mask in 3x3 notation
|
||||||
loadCases(currentLoadCase)%deformation%maskFloat = & ! float (1.0/0.0) mask in 3x3 notation
|
newLoadCase%deformation%values = math_plain9to33(temp_valueVector) ! values in 3x3 notation
|
||||||
merge(ones,zeros,loadCases(currentLoadCase)%deformation%maskLogical)
|
|
||||||
loadCases(currentLoadCase)%deformation%values = math_plain9to33(temp_valueVector) ! values in 3x3 notation
|
|
||||||
case('p','pk1','piolakirchhoff','stress', 's')
|
case('p','pk1','piolakirchhoff','stress', 's')
|
||||||
temp_valueVector = 0.0_pReal
|
temp_valueVector = 0.0_pReal
|
||||||
do j = 1_pInt, 9_pInt
|
do j = 1_pInt, 9_pInt
|
||||||
temp_maskVector(j) = IO_stringValue(line,chunkPos,i+j) /= '*' ! true if not an asterisk
|
temp_maskVector(j) = IO_stringValue(line,chunkPos,i+j) /= '*' ! true if not an asterisk
|
||||||
if (temp_maskVector(j)) temp_valueVector(j) = IO_floatValue(line,chunkPos,i+j) ! read value where applicable
|
if (temp_maskVector(j)) temp_valueVector(j) = IO_floatValue(line,chunkPos,i+j) ! read value where applicable
|
||||||
enddo
|
enddo
|
||||||
loadCases(currentLoadCase)%stress%maskLogical = transpose(reshape(temp_maskVector,[ 3,3]))
|
newLoadCase%stress%maskLogical = transpose(reshape(temp_maskVector,[ 3,3]))
|
||||||
loadCases(currentLoadCase)%stress%maskFloat = merge(ones,zeros,&
|
newLoadCase%stress%maskFloat = merge(ones,zeros,newLoadCase%stress%maskLogical)
|
||||||
loadCases(currentLoadCase)%stress%maskLogical)
|
newLoadCase%stress%values = math_plain9to33(temp_valueVector)
|
||||||
loadCases(currentLoadCase)%stress%values = math_plain9to33(temp_valueVector)
|
|
||||||
case('t','time','delta') ! increment time
|
case('t','time','delta') ! increment time
|
||||||
loadCases(currentLoadCase)%time = IO_floatValue(line,chunkPos,i+1_pInt)
|
newLoadCase%time = IO_floatValue(line,chunkPos,i+1_pInt)
|
||||||
case('n','incs','increments','steps') ! number of increments
|
case('n','incs','increments','steps') ! number of increments
|
||||||
loadCases(currentLoadCase)%incs = IO_intValue(line,chunkPos,i+1_pInt)
|
newLoadCase%incs = IO_intValue(line,chunkPos,i+1_pInt)
|
||||||
case('logincs','logincrements','logsteps') ! number of increments (switch to log time scaling)
|
case('logincs','logincrements','logsteps') ! number of increments (switch to log time scaling)
|
||||||
loadCases(currentLoadCase)%incs = IO_intValue(line,chunkPos,i+1_pInt)
|
newLoadCase%incs = IO_intValue(line,chunkPos,i+1_pInt)
|
||||||
loadCases(currentLoadCase)%logscale = 1_pInt
|
newLoadCase%logscale = 1_pInt
|
||||||
case('freq','frequency','outputfreq') ! frequency of result writings
|
case('freq','frequency','outputfreq') ! frequency of result writings
|
||||||
loadCases(currentLoadCase)%outputfrequency = IO_intValue(line,chunkPos,i+1_pInt)
|
newLoadCase%outputfrequency = IO_intValue(line,chunkPos,i+1_pInt)
|
||||||
case('r','restart','restartwrite') ! frequency of writing restart information
|
case('r','restart','restartwrite') ! frequency of writing restart information
|
||||||
loadCases(currentLoadCase)%restartfrequency = &
|
newLoadCase%restartfrequency = &
|
||||||
max(0_pInt,IO_intValue(line,chunkPos,i+1_pInt))
|
max(0_pInt,IO_intValue(line,chunkPos,i+1_pInt))
|
||||||
case('guessreset','dropguessing')
|
case('guessreset','dropguessing')
|
||||||
loadCases(currentLoadCase)%followFormerTrajectory = .false. ! do not continue to predict deformation along former trajectory
|
newLoadCase%followFormerTrajectory = .false. ! do not continue to predict deformation along former trajectory
|
||||||
case('euler') ! rotation of currentLoadCase given in euler angles
|
case('euler') ! rotation of load case given in euler angles
|
||||||
temp_valueVector = 0.0_pReal
|
temp_valueVector = 0.0_pReal
|
||||||
l = 1_pInt ! assuming values given in degrees
|
l = 1_pInt ! assuming values given in degrees
|
||||||
k = 1_pInt ! assuming keyword indicating degree/radians present
|
k = 1_pInt ! assuming keyword indicating degree/radians present
|
||||||
|
@ -272,108 +283,90 @@ program DAMASK_spectral
|
||||||
temp_valueVector(j) = IO_floatValue(line,chunkPos,i+k+j)
|
temp_valueVector(j) = IO_floatValue(line,chunkPos,i+k+j)
|
||||||
enddo
|
enddo
|
||||||
if (l == 1_pInt) temp_valueVector(1:3) = temp_valueVector(1:3) * inRad ! convert to rad
|
if (l == 1_pInt) temp_valueVector(1:3) = temp_valueVector(1:3) * inRad ! convert to rad
|
||||||
loadCases(currentLoadCase)%rotation = math_EulerToR(temp_valueVector(1:3)) ! convert rad Eulers to rotation matrix
|
newLoadCase%rotation = math_EulerToR(temp_valueVector(1:3)) ! convert rad Eulers to rotation matrix
|
||||||
case('rotation','rot') ! assign values for the rotation of currentLoadCase matrix
|
case('rotation','rot') ! assign values for the rotation matrix
|
||||||
temp_valueVector = 0.0_pReal
|
temp_valueVector = 0.0_pReal
|
||||||
do j = 1_pInt, 9_pInt
|
do j = 1_pInt, 9_pInt
|
||||||
temp_valueVector(j) = IO_floatValue(line,chunkPos,i+j)
|
temp_valueVector(j) = IO_floatValue(line,chunkPos,i+j)
|
||||||
enddo
|
enddo
|
||||||
loadCases(currentLoadCase)%rotation = math_plain9to33(temp_valueVector)
|
newLoadCase%rotation = math_plain9to33(temp_valueVector)
|
||||||
end select
|
end select
|
||||||
enddo; enddo
|
enddo readIn
|
||||||
close(FILEUNIT)
|
|
||||||
|
newLoadCase%followFormerTrajectory = merge(.true.,.false.,currentLoadCase > 1_pInt) ! by default, guess from previous load case
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
! consistency checks and output of load case
|
reportAndCheck: if (worldrank == 0) then
|
||||||
loadCases(1)%followFormerTrajectory = .false. ! cannot guess along trajectory for first inc of first currentLoadCase
|
|
||||||
errorID = 0_pInt
|
|
||||||
if (worldrank == 0) then
|
|
||||||
checkLoadcases: do currentLoadCase = 1_pInt, size(loadCases)
|
|
||||||
write (loadcase_string, '(i6)' ) currentLoadCase
|
write (loadcase_string, '(i6)' ) currentLoadCase
|
||||||
write(6,'(1x,a,i6)') 'load case: ', currentLoadCase
|
write(6,'(1x,a,i6)') 'load case: ', currentLoadCase
|
||||||
if (.not. loadCases(currentLoadCase)%followFormerTrajectory) &
|
if (.not. newLoadCase%followFormerTrajectory) write(6,'(2x,a)') 'drop guessing along trajectory'
|
||||||
write(6,'(2x,a)') 'drop guessing along trajectory'
|
if (newLoadCase%deformation%myType == 'l') then
|
||||||
if (loadCases(currentLoadCase)%deformation%myType == 'l') then
|
|
||||||
do j = 1_pInt, 3_pInt
|
do j = 1_pInt, 3_pInt
|
||||||
if (any(loadCases(currentLoadCase)%deformation%maskLogical(j,1:3) .eqv. .true.) .and. &
|
if (any(newLoadCase%deformation%maskLogical(j,1:3) .eqv. .true.) .and. &
|
||||||
any(loadCases(currentLoadCase)%deformation%maskLogical(j,1:3) .eqv. .false.)) &
|
any(newLoadCase%deformation%maskLogical(j,1:3) .eqv. .false.)) errorID = 832_pInt ! each row should be either fully or not at all defined
|
||||||
errorID = 832_pInt ! each row should be either fully or not at all defined
|
|
||||||
enddo
|
enddo
|
||||||
write(6,'(2x,a)') 'velocity gradient:'
|
write(6,'(2x,a)') 'velocity gradient:'
|
||||||
else if (loadCases(currentLoadCase)%deformation%myType == 'f') then
|
else if (newLoadCase%deformation%myType == 'f') then
|
||||||
write(6,'(2x,a)') 'deformation gradient at end of load case:'
|
write(6,'(2x,a)') 'deformation gradient at end of load case:'
|
||||||
else
|
else
|
||||||
write(6,'(2x,a)') 'deformation gradient rate:'
|
write(6,'(2x,a)') 'deformation gradient rate:'
|
||||||
endif
|
endif
|
||||||
do i = 1_pInt, 3_pInt; do j = 1_pInt, 3_pInt
|
do i = 1_pInt, 3_pInt; do j = 1_pInt, 3_pInt
|
||||||
if(loadCases(currentLoadCase)%deformation%maskLogical(i,j)) then
|
if(newLoadCase%deformation%maskLogical(i,j)) then
|
||||||
write(6,'(2x,f12.7)',advance='no') loadCases(currentLoadCase)%deformation%values(i,j)
|
write(6,'(2x,f12.7)',advance='no') newLoadCase%deformation%values(i,j)
|
||||||
else
|
else
|
||||||
write(6,'(2x,12a)',advance='no') ' * '
|
write(6,'(2x,12a)',advance='no') ' * '
|
||||||
endif
|
endif
|
||||||
enddo; write(6,'(/)',advance='no')
|
enddo; write(6,'(/)',advance='no')
|
||||||
enddo
|
enddo
|
||||||
if (any(loadCases(currentLoadCase)%stress%maskLogical .eqv. &
|
if (any(newLoadCase%stress%maskLogical .eqv. &
|
||||||
loadCases(currentLoadCase)%deformation%maskLogical)) errorID = 831_pInt ! exclusive or masking only
|
newLoadCase%deformation%maskLogical)) errorID = 831_pInt ! exclusive or masking only
|
||||||
if (any(loadCases(currentLoadCase)%stress%maskLogical .and. &
|
if (any(newLoadCase%stress%maskLogical .and. &
|
||||||
transpose(loadCases(currentLoadCase)%stress%maskLogical) .and. &
|
transpose(newLoadCase%stress%maskLogical) .and. &
|
||||||
reshape([ .false.,.true.,.true.,.true.,.false.,.true.,.true.,.true.,.false.],[ 3,3]))) &
|
reshape([ .false.,.true.,.true.,.true.,.false.,.true.,.true.,.true.,.false.],[ 3,3]))) &
|
||||||
errorID = 838_pInt ! no rotation is allowed by stress BC
|
errorID = 838_pInt ! no rotation is allowed by stress BC
|
||||||
write(6,'(2x,a)') 'stress / GPa:'
|
write(6,'(2x,a)') 'stress / GPa:'
|
||||||
do i = 1_pInt, 3_pInt; do j = 1_pInt, 3_pInt
|
do i = 1_pInt, 3_pInt; do j = 1_pInt, 3_pInt
|
||||||
if(loadCases(currentLoadCase)%stress%maskLogical(i,j)) then
|
if(newLoadCase%stress%maskLogical(i,j)) then
|
||||||
write(6,'(2x,f12.7)',advance='no') loadCases(currentLoadCase)%stress%values(i,j)*1e-9_pReal
|
write(6,'(2x,f12.7)',advance='no') newLoadCase%stress%values(i,j)*1e-9_pReal
|
||||||
else
|
else
|
||||||
write(6,'(2x,12a)',advance='no') ' * '
|
write(6,'(2x,12a)',advance='no') ' * '
|
||||||
endif
|
endif
|
||||||
enddo; write(6,'(/)',advance='no')
|
enddo; write(6,'(/)',advance='no')
|
||||||
enddo
|
enddo
|
||||||
if (any(abs(math_mul33x33(loadCases(currentLoadCase)%rotation, &
|
if (any(abs(math_mul33x33(newLoadCase%rotation, &
|
||||||
math_transpose33(loadCases(currentLoadCase)%rotation))-math_I3) > &
|
transpose(newLoadCase%rotation))-math_I3) > &
|
||||||
reshape(spread(tol_math_check,1,9),[ 3,3]))&
|
reshape(spread(tol_math_check,1,9),[ 3,3]))&
|
||||||
.or. abs(math_det33(loadCases(currentLoadCase)%rotation)) > &
|
.or. abs(math_det33(newLoadCase%rotation)) > &
|
||||||
1.0_pReal + tol_math_check) errorID = 846_pInt ! given rotation matrix contains strain
|
1.0_pReal + tol_math_check) errorID = 846_pInt ! given rotation matrix contains strain
|
||||||
if (any(dNeq(loadCases(currentLoadCase)%rotation, math_I3))) &
|
if (any(dNeq(newLoadCase%rotation, math_I3))) &
|
||||||
write(6,'(2x,a,/,3(3(3x,f12.7,1x)/))',advance='no') 'rotation of loadframe:',&
|
write(6,'(2x,a,/,3(3(3x,f12.7,1x)/))',advance='no') 'rotation of loadframe:',&
|
||||||
math_transpose33(loadCases(currentLoadCase)%rotation)
|
transpose(newLoadCase%rotation)
|
||||||
if (loadCases(currentLoadCase)%time < 0.0_pReal) errorID = 834_pInt ! negative time increment
|
if (newLoadCase%time < 0.0_pReal) errorID = 834_pInt ! negative time increment
|
||||||
write(6,'(2x,a,f12.6)') 'time: ', loadCases(currentLoadCase)%time
|
write(6,'(2x,a,f12.6)') 'time: ', newLoadCase%time
|
||||||
if (loadCases(currentLoadCase)%incs < 1_pInt) errorID = 835_pInt ! non-positive incs count
|
if (newLoadCase%incs < 1_pInt) errorID = 835_pInt ! non-positive incs count
|
||||||
write(6,'(2x,a,i5)') 'increments: ', loadCases(currentLoadCase)%incs
|
write(6,'(2x,a,i5)') 'increments: ', newLoadCase%incs
|
||||||
if (loadCases(currentLoadCase)%outputfrequency < 1_pInt) errorID = 836_pInt ! non-positive result frequency
|
if (newLoadCase%outputfrequency < 1_pInt) errorID = 836_pInt ! non-positive result frequency
|
||||||
write(6,'(2x,a,i5)') 'output frequency: ', &
|
write(6,'(2x,a,i5)') 'output frequency: ', newLoadCase%outputfrequency
|
||||||
loadCases(currentLoadCase)%outputfrequency
|
write(6,'(2x,a,i5,/)') 'restart frequency: ', newLoadCase%restartfrequency
|
||||||
write(6,'(2x,a,i5,/)') 'restart frequency: ', &
|
|
||||||
loadCases(currentLoadCase)%restartfrequency
|
|
||||||
if (errorID > 0_pInt) call IO_error(error_ID = errorID, ext_msg = loadcase_string) ! exit with error message
|
if (errorID > 0_pInt) call IO_error(error_ID = errorID, ext_msg = loadcase_string) ! exit with error message
|
||||||
enddo checkLoadcases
|
endif reportAndCheck
|
||||||
endif
|
loadCases = [loadCases,newLoadCase] ! load case is ok, append it
|
||||||
|
enddo
|
||||||
|
close(fileUnit)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! doing initialization depending on selected solver
|
! doing initialization depending on active solvers
|
||||||
call Utilities_init()
|
call Utilities_init()
|
||||||
do field = 1, nActiveFields
|
do field = 1, nActiveFields
|
||||||
select case (loadCases(1)%ID(field))
|
select case (loadCases(1)%ID(field))
|
||||||
case(FIELD_MECH_ID)
|
case(FIELD_MECH_ID)
|
||||||
select case (spectral_solver)
|
call mech_init
|
||||||
case (DAMASK_spectral_SolverBasic_label)
|
|
||||||
call basic_init
|
|
||||||
|
|
||||||
case (DAMASK_spectral_SolverPolarisation_label)
|
|
||||||
if(iand(debug_level(debug_spectral),debug_levelBasic)/= 0) &
|
|
||||||
call IO_warning(42_pInt, ext_msg='debug Divergence')
|
|
||||||
call Polarisation_init
|
|
||||||
|
|
||||||
case default
|
|
||||||
call IO_error(error_ID = 891_pInt, ext_msg = trim(spectral_solver))
|
|
||||||
|
|
||||||
end select
|
|
||||||
|
|
||||||
case(FIELD_THERMAL_ID)
|
case(FIELD_THERMAL_ID)
|
||||||
call spectral_thermal_init
|
call spectral_thermal_init
|
||||||
|
|
||||||
case(FIELD_DAMAGE_ID)
|
case(FIELD_DAMAGE_ID)
|
||||||
call spectral_damage_init()
|
call spectral_damage_init
|
||||||
|
|
||||||
end select
|
end select
|
||||||
enddo
|
enddo
|
||||||
|
@ -382,22 +375,22 @@ program DAMASK_spectral
|
||||||
! write header of output file
|
! write header of output file
|
||||||
if (worldrank == 0) then
|
if (worldrank == 0) then
|
||||||
writeHeader: if (interface_restartInc < 1_pInt) then
|
writeHeader: if (interface_restartInc < 1_pInt) then
|
||||||
open(newunit=resUnit,file=trim(getSolverJobName())//&
|
open(newunit=fileUnit,file=trim(getSolverJobName())//&
|
||||||
'.spectralOut',form='UNFORMATTED',status='REPLACE')
|
'.spectralOut',form='UNFORMATTED',status='REPLACE')
|
||||||
write(resUnit) 'load:', trim(loadCaseFile) ! ... and write header
|
write(fileUnit) 'load:', trim(loadCaseFile) ! ... and write header
|
||||||
write(resUnit) 'workingdir:', trim(workingDir)
|
write(fileUnit) 'workingdir:', trim(workingDir)
|
||||||
write(resUnit) 'geometry:', trim(geometryFile)
|
write(fileUnit) 'geometry:', trim(geometryFile)
|
||||||
write(resUnit) 'grid:', grid
|
write(fileUnit) 'grid:', grid
|
||||||
write(resUnit) 'size:', geomSize
|
write(fileUnit) 'size:', geomSize
|
||||||
write(resUnit) 'materialpoint_sizeResults:', materialpoint_sizeResults
|
write(fileUnit) 'materialpoint_sizeResults:', materialpoint_sizeResults
|
||||||
write(resUnit) 'loadcases:', size(loadCases)
|
write(fileUnit) 'loadcases:', size(loadCases)
|
||||||
write(resUnit) 'frequencies:', loadCases%outputfrequency ! one entry per LoadCase
|
write(fileUnit) 'frequencies:', loadCases%outputfrequency ! one entry per LoadCase
|
||||||
write(resUnit) 'times:', loadCases%time ! one entry per LoadCase
|
write(fileUnit) 'times:', loadCases%time ! one entry per LoadCase
|
||||||
write(resUnit) 'logscales:', loadCases%logscale
|
write(fileUnit) 'logscales:', loadCases%logscale
|
||||||
write(resUnit) 'increments:', loadCases%incs ! one entry per LoadCase
|
write(fileUnit) 'increments:', loadCases%incs ! one entry per LoadCase
|
||||||
write(resUnit) 'startingIncrement:', restartInc ! start with writing out the previous inc
|
write(fileUnit) 'startingIncrement:', restartInc ! start with writing out the previous inc
|
||||||
write(resUnit) 'eoh'
|
write(fileUnit) 'eoh'
|
||||||
close(resUnit) ! end of header
|
close(fileUnit) ! end of header
|
||||||
open(newunit=statUnit,file=trim(getSolverJobName())//&
|
open(newunit=statUnit,file=trim(getSolverJobName())//&
|
||||||
'.sta',form='FORMATTED',status='REPLACE')
|
'.sta',form='FORMATTED',status='REPLACE')
|
||||||
write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded' ! statistics file
|
write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded' ! statistics file
|
||||||
|
@ -419,13 +412,13 @@ program DAMASK_spectral
|
||||||
call MPI_file_open(PETSC_COMM_WORLD, trim(getSolverJobName())//'.spectralOut', &
|
call MPI_file_open(PETSC_COMM_WORLD, trim(getSolverJobName())//'.spectralOut', &
|
||||||
MPI_MODE_WRONLY + MPI_MODE_APPEND, &
|
MPI_MODE_WRONLY + MPI_MODE_APPEND, &
|
||||||
MPI_INFO_NULL, &
|
MPI_INFO_NULL, &
|
||||||
resUnit, &
|
fileUnit, &
|
||||||
ierr)
|
ierr)
|
||||||
if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_open')
|
if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_open')
|
||||||
call MPI_file_get_position(resUnit,fileOffset,ierr) ! get offset from header
|
call MPI_file_get_position(fileUnit,fileOffset,ierr) ! get offset from header
|
||||||
if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_get_position')
|
if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_get_position')
|
||||||
fileOffset = fileOffset + sum(outputSize(1:worldrank)) ! offset of my process in file (header + processes before me)
|
fileOffset = fileOffset + sum(outputSize(1:worldrank)) ! offset of my process in file (header + processes before me)
|
||||||
call MPI_file_seek (resUnit,fileOffset,MPI_SEEK_SET,ierr)
|
call MPI_file_seek (fileUnit,fileOffset,MPI_SEEK_SET,ierr)
|
||||||
if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_seek')
|
if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_seek')
|
||||||
|
|
||||||
writeUndeformed: if (interface_restartInc < 1_pInt) then
|
writeUndeformed: if (interface_restartInc < 1_pInt) then
|
||||||
|
@ -433,7 +426,7 @@ program DAMASK_spectral
|
||||||
do i = 1, size(materialpoint_results,3)/(maxByteOut/(materialpoint_sizeResults*pReal))+1 ! slice the output of my process in chunks not exceeding the limit for one output
|
do i = 1, size(materialpoint_results,3)/(maxByteOut/(materialpoint_sizeResults*pReal))+1 ! slice the output of my process in chunks not exceeding the limit for one output
|
||||||
outputIndex = int([(i-1_pInt)*((maxRealOut)/materialpoint_sizeResults)+1_pInt, & ! QUESTION: why not starting i at 0 instead of murky 1?
|
outputIndex = int([(i-1_pInt)*((maxRealOut)/materialpoint_sizeResults)+1_pInt, & ! QUESTION: why not starting i at 0 instead of murky 1?
|
||||||
min(i*((maxRealOut)/materialpoint_sizeResults),size(materialpoint_results,3))],pLongInt)
|
min(i*((maxRealOut)/materialpoint_sizeResults),size(materialpoint_results,3))],pLongInt)
|
||||||
call MPI_file_write(resUnit,reshape(materialpoint_results(:,:,outputIndex(1):outputIndex(2)), &
|
call MPI_file_write(fileUnit,reshape(materialpoint_results(:,:,outputIndex(1):outputIndex(2)), &
|
||||||
[(outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)]), &
|
[(outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)]), &
|
||||||
int((outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)), &
|
int((outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)), &
|
||||||
MPI_DOUBLE, MPI_STATUS_IGNORE, ierr)
|
MPI_DOUBLE, MPI_STATUS_IGNORE, ierr)
|
||||||
|
@ -442,13 +435,13 @@ program DAMASK_spectral
|
||||||
fileOffset = fileOffset + sum(outputSize) ! forward to current file position
|
fileOffset = fileOffset + sum(outputSize) ! forward to current file position
|
||||||
endif writeUndeformed
|
endif writeUndeformed
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! looping over loadcases
|
! looping over load cases
|
||||||
loadCaseLooping: do currentLoadCase = 1_pInt, size(loadCases)
|
loadCaseLooping: do currentLoadCase = 1_pInt, size(loadCases)
|
||||||
time0 = time ! currentLoadCase start time
|
time0 = time ! load case start time
|
||||||
guess = loadCases(currentLoadCase)%followFormerTrajectory ! change of load case? homogeneous guess for the first inc
|
guess = loadCases(currentLoadCase)%followFormerTrajectory ! change of load case? homogeneous guess for the first inc
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! loop over incs defined in input file for current currentLoadCase
|
! loop over incs defined in input file for current load case
|
||||||
incLooping: do inc = 1_pInt, loadCases(currentLoadCase)%incs
|
incLooping: do inc = 1_pInt, loadCases(currentLoadCase)%incs
|
||||||
totalIncsCounter = totalIncsCounter + 1_pInt
|
totalIncsCounter = totalIncsCounter + 1_pInt
|
||||||
|
|
||||||
|
@ -458,13 +451,13 @@ program DAMASK_spectral
|
||||||
if (loadCases(currentLoadCase)%logscale == 0_pInt) then ! linear scale
|
if (loadCases(currentLoadCase)%logscale == 0_pInt) then ! linear scale
|
||||||
timeinc = loadCases(currentLoadCase)%time/real(loadCases(currentLoadCase)%incs,pReal)
|
timeinc = loadCases(currentLoadCase)%time/real(loadCases(currentLoadCase)%incs,pReal)
|
||||||
else
|
else
|
||||||
if (currentLoadCase == 1_pInt) then ! 1st currentLoadCase of logarithmic scale
|
if (currentLoadCase == 1_pInt) then ! 1st load case of logarithmic scale
|
||||||
if (inc == 1_pInt) then ! 1st inc of 1st currentLoadCase of logarithmic scale
|
if (inc == 1_pInt) then ! 1st inc of 1st load case of logarithmic scale
|
||||||
timeinc = loadCases(1)%time*(2.0_pReal**real( 1_pInt-loadCases(1)%incs ,pReal)) ! assume 1st inc is equal to 2nd
|
timeinc = loadCases(1)%time*(2.0_pReal**real( 1_pInt-loadCases(1)%incs ,pReal)) ! assume 1st inc is equal to 2nd
|
||||||
else ! not-1st inc of 1st currentLoadCase of logarithmic scale
|
else ! not-1st inc of 1st load case of logarithmic scale
|
||||||
timeinc = loadCases(1)%time*(2.0_pReal**real(inc-1_pInt-loadCases(1)%incs ,pReal))
|
timeinc = loadCases(1)%time*(2.0_pReal**real(inc-1_pInt-loadCases(1)%incs ,pReal))
|
||||||
endif
|
endif
|
||||||
else ! not-1st currentLoadCase of logarithmic scale
|
else ! not-1st load case of logarithmic scale
|
||||||
timeinc = time0 * &
|
timeinc = time0 * &
|
||||||
( (1.0_pReal + loadCases(currentLoadCase)%time/time0 )**(real( inc ,pReal)/&
|
( (1.0_pReal + loadCases(currentLoadCase)%time/time0 )**(real( inc ,pReal)/&
|
||||||
real(loadCases(currentLoadCase)%incs ,pReal))&
|
real(loadCases(currentLoadCase)%incs ,pReal))&
|
||||||
|
@ -512,24 +505,14 @@ program DAMASK_spectral
|
||||||
do field = 1, nActiveFields
|
do field = 1, nActiveFields
|
||||||
select case(loadCases(currentLoadCase)%ID(field))
|
select case(loadCases(currentLoadCase)%ID(field))
|
||||||
case(FIELD_MECH_ID)
|
case(FIELD_MECH_ID)
|
||||||
select case (spectral_solver)
|
call mech_forward (&
|
||||||
case (DAMASK_spectral_SolverBasic_label)
|
|
||||||
call Basic_forward (&
|
|
||||||
guess,timeinc,timeIncOld,remainingLoadCaseTime, &
|
guess,timeinc,timeIncOld,remainingLoadCaseTime, &
|
||||||
deformation_BC = loadCases(currentLoadCase)%deformation, &
|
deformation_BC = loadCases(currentLoadCase)%deformation, &
|
||||||
stress_BC = loadCases(currentLoadCase)%stress, &
|
stress_BC = loadCases(currentLoadCase)%stress, &
|
||||||
rotation_BC = loadCases(currentLoadCase)%rotation)
|
rotation_BC = loadCases(currentLoadCase)%rotation)
|
||||||
|
|
||||||
case (DAMASK_spectral_SolverPolarisation_label)
|
case(FIELD_THERMAL_ID); call spectral_thermal_forward()
|
||||||
call Polarisation_forward (&
|
case(FIELD_DAMAGE_ID); call spectral_damage_forward()
|
||||||
guess,timeinc,timeIncOld,remainingLoadCaseTime, &
|
|
||||||
deformation_BC = loadCases(currentLoadCase)%deformation, &
|
|
||||||
stress_BC = loadCases(currentLoadCase)%stress, &
|
|
||||||
rotation_BC = loadCases(currentLoadCase)%rotation)
|
|
||||||
end select
|
|
||||||
|
|
||||||
case(FIELD_THERMAL_ID); call spectral_thermal_forward()
|
|
||||||
case(FIELD_DAMAGE_ID); call spectral_damage_forward()
|
|
||||||
end select
|
end select
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
@ -541,20 +524,10 @@ program DAMASK_spectral
|
||||||
do field = 1, nActiveFields
|
do field = 1, nActiveFields
|
||||||
select case(loadCases(currentLoadCase)%ID(field))
|
select case(loadCases(currentLoadCase)%ID(field))
|
||||||
case(FIELD_MECH_ID)
|
case(FIELD_MECH_ID)
|
||||||
select case (spectral_solver)
|
solres(field) = mech_solution (&
|
||||||
case (DAMASK_spectral_SolverBasic_label)
|
incInfo,timeinc,timeIncOld, &
|
||||||
solres(field) = Basic_solution (&
|
stress_BC = loadCases(currentLoadCase)%stress, &
|
||||||
incInfo,timeinc,timeIncOld, &
|
rotation_BC = loadCases(currentLoadCase)%rotation)
|
||||||
stress_BC = loadCases(currentLoadCase)%stress, &
|
|
||||||
rotation_BC = loadCases(currentLoadCase)%rotation)
|
|
||||||
|
|
||||||
case (DAMASK_spectral_SolverPolarisation_label)
|
|
||||||
solres(field) = Polarisation_solution (&
|
|
||||||
incInfo,timeinc,timeIncOld, &
|
|
||||||
stress_BC = loadCases(currentLoadCase)%stress, &
|
|
||||||
rotation_BC = loadCases(currentLoadCase)%rotation)
|
|
||||||
|
|
||||||
end select
|
|
||||||
|
|
||||||
case(FIELD_THERMAL_ID)
|
case(FIELD_THERMAL_ID)
|
||||||
solres(field) = spectral_thermal_solution(timeinc,timeIncOld,remainingLoadCaseTime)
|
solres(field) = spectral_thermal_solution(timeinc,timeIncOld,remainingLoadCaseTime)
|
||||||
|
@ -595,7 +568,7 @@ program DAMASK_spectral
|
||||||
write(6,'(/,a)') ' cutting back '
|
write(6,'(/,a)') ' cutting back '
|
||||||
else ! no more options to continue
|
else ! no more options to continue
|
||||||
call IO_warning(850_pInt)
|
call IO_warning(850_pInt)
|
||||||
call MPI_file_close(resUnit,ierr)
|
call MPI_file_close(fileUnit,ierr)
|
||||||
close(statUnit)
|
close(statUnit)
|
||||||
call quit(-1_pInt*(lastRestartWritten+1_pInt)) ! quit and provide information about last restart inc written
|
call quit(-1_pInt*(lastRestartWritten+1_pInt)) ! quit and provide information about last restart inc written
|
||||||
endif
|
endif
|
||||||
|
@ -618,12 +591,12 @@ program DAMASK_spectral
|
||||||
write(6,'(1/,a)') ' ... writing results to file ......................................'
|
write(6,'(1/,a)') ' ... writing results to file ......................................'
|
||||||
flush(6)
|
flush(6)
|
||||||
call materialpoint_postResults()
|
call materialpoint_postResults()
|
||||||
call MPI_file_seek (resUnit,fileOffset,MPI_SEEK_SET,ierr)
|
call MPI_file_seek (fileUnit,fileOffset,MPI_SEEK_SET,ierr)
|
||||||
if (ierr /= 0_pInt) call IO_error(894_pInt, ext_msg='MPI_file_seek')
|
if (ierr /= 0_pInt) call IO_error(894_pInt, ext_msg='MPI_file_seek')
|
||||||
do i=1, size(materialpoint_results,3)/(maxByteOut/(materialpoint_sizeResults*pReal))+1 ! slice the output of my process in chunks not exceeding the limit for one output
|
do i=1, size(materialpoint_results,3)/(maxByteOut/(materialpoint_sizeResults*pReal))+1 ! slice the output of my process in chunks not exceeding the limit for one output
|
||||||
outputIndex=int([(i-1_pInt)*((maxRealOut)/materialpoint_sizeResults)+1_pInt, &
|
outputIndex=int([(i-1_pInt)*((maxRealOut)/materialpoint_sizeResults)+1_pInt, &
|
||||||
min(i*((maxRealOut)/materialpoint_sizeResults),size(materialpoint_results,3))],pLongInt)
|
min(i*((maxRealOut)/materialpoint_sizeResults),size(materialpoint_results,3))],pLongInt)
|
||||||
call MPI_file_write(resUnit,reshape(materialpoint_results(:,:,outputIndex(1):outputIndex(2)),&
|
call MPI_file_write(fileUnit,reshape(materialpoint_results(:,:,outputIndex(1):outputIndex(2)),&
|
||||||
[(outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)]), &
|
[(outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)]), &
|
||||||
int((outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)),&
|
int((outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)),&
|
||||||
MPI_DOUBLE, MPI_STATUS_IGNORE, ierr)
|
MPI_DOUBLE, MPI_STATUS_IGNORE, ierr)
|
||||||
|
@ -651,10 +624,9 @@ program DAMASK_spectral
|
||||||
convergedCounter, ' out of ', &
|
convergedCounter, ' out of ', &
|
||||||
notConvergedCounter + convergedCounter, ' (', &
|
notConvergedCounter + convergedCounter, ' (', &
|
||||||
real(convergedCounter, pReal)/&
|
real(convergedCounter, pReal)/&
|
||||||
real(notConvergedCounter + convergedCounter,pReal)*100.0_pReal, &
|
real(notConvergedCounter + convergedCounter,pReal)*100.0_pReal, ' %) increments converged!'
|
||||||
' %) increments converged!'
|
|
||||||
flush(6)
|
flush(6)
|
||||||
call MPI_file_close(resUnit,ierr)
|
call MPI_file_close(fileUnit,ierr)
|
||||||
close(statUnit)
|
close(statUnit)
|
||||||
|
|
||||||
if (notConvergedCounter > 0_pInt) call quit(3_pInt) ! error if some are not converged
|
if (notConvergedCounter > 0_pInt) call quit(3_pInt) ! error if some are not converged
|
||||||
|
@ -673,10 +645,13 @@ end program DAMASK_spectral
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine quit(stop_id)
|
subroutine quit(stop_id)
|
||||||
#include <petsc/finclude/petscsys.h>
|
#include <petsc/finclude/petscsys.h>
|
||||||
use MPI
|
#ifdef _OPENMP
|
||||||
|
use MPI, only: &
|
||||||
|
MPI_finalize
|
||||||
|
#endif
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
pInt
|
pInt
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: stop_id
|
integer(pInt), intent(in) :: stop_id
|
||||||
integer, dimension(8) :: dateAndTime ! type default integer
|
integer, dimension(8) :: dateAndTime ! type default integer
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
301
src/IO.f90
301
src/IO.f90
|
@ -22,6 +22,7 @@ module IO
|
||||||
public :: &
|
public :: &
|
||||||
IO_init, &
|
IO_init, &
|
||||||
IO_read, &
|
IO_read, &
|
||||||
|
IO_recursiveRead, &
|
||||||
IO_checkAndRewind, &
|
IO_checkAndRewind, &
|
||||||
IO_open_file_stat, &
|
IO_open_file_stat, &
|
||||||
IO_open_jobFile_stat, &
|
IO_open_jobFile_stat, &
|
||||||
|
@ -35,10 +36,6 @@ module IO
|
||||||
IO_hybridIA, &
|
IO_hybridIA, &
|
||||||
IO_isBlank, &
|
IO_isBlank, &
|
||||||
IO_getTag, &
|
IO_getTag, &
|
||||||
IO_countSections, &
|
|
||||||
IO_countTagInPart, &
|
|
||||||
IO_spotTagInPart, &
|
|
||||||
IO_globalTagInPart, &
|
|
||||||
IO_stringPos, &
|
IO_stringPos, &
|
||||||
IO_stringValue, &
|
IO_stringValue, &
|
||||||
IO_fixedStringValue ,&
|
IO_fixedStringValue ,&
|
||||||
|
@ -100,6 +97,7 @@ end subroutine IO_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief recursively reads a line from a text file.
|
!> @brief recursively reads a line from a text file.
|
||||||
!! Recursion is triggered by "{path/to/inputfile}" in a line
|
!! Recursion is triggered by "{path/to/inputfile}" in a line
|
||||||
|
!> @details unstable and buggy
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
recursive function IO_read(fileUnit,reset) result(line)
|
recursive function IO_read(fileUnit,reset) result(line)
|
||||||
|
|
||||||
|
@ -151,7 +149,7 @@ recursive function IO_read(fileUnit,reset) result(line)
|
||||||
pathOn(stack) = path(1:scan(path,SEP,.true.))//input ! glue include to current file's dir
|
pathOn(stack) = path(1:scan(path,SEP,.true.))//input ! glue include to current file's dir
|
||||||
endif
|
endif
|
||||||
|
|
||||||
open(newunit=unitOn(stack),iostat=myStat,file=pathOn(stack),action='read') ! open included file
|
open(newunit=unitOn(stack),iostat=myStat,file=pathOn(stack),action='read',status='old',position='rewind') ! open included file
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=pathOn(stack))
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=pathOn(stack))
|
||||||
|
|
||||||
line = IO_read(fileUnit)
|
line = IO_read(fileUnit)
|
||||||
|
@ -170,6 +168,80 @@ recursive function IO_read(fileUnit,reset) result(line)
|
||||||
|
|
||||||
end function IO_read
|
end function IO_read
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief recursively reads a text file.
|
||||||
|
!! Recursion is triggered by "{path/to/inputfile}" in a line
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
recursive function IO_recursiveRead(fileName,cnt) result(fileContent)
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
character(len=*), intent(in) :: fileName
|
||||||
|
integer(pInt), intent(in), optional :: cnt !< recursion counter
|
||||||
|
character(len=256), dimension(:), allocatable :: fileContent !< file content, separated per lines
|
||||||
|
character(len=256), dimension(:), allocatable :: includedContent
|
||||||
|
character(len=256) :: line
|
||||||
|
character(len=256), parameter :: dummy = 'https://damask.mpie.de' !< to fill up remaining array
|
||||||
|
character(len=:), allocatable :: rawData
|
||||||
|
integer(pInt) :: &
|
||||||
|
fileLength, &
|
||||||
|
fileUnit, &
|
||||||
|
startPos, endPos, &
|
||||||
|
myTotalLines, & !< # lines read from file without include statements
|
||||||
|
includedLines, & !< # lines included from other file(s)
|
||||||
|
missingLines, & !< # lines missing from current file
|
||||||
|
l,i, &
|
||||||
|
myStat
|
||||||
|
|
||||||
|
if (merge(cnt,0_pInt,present(cnt))>10_pInt) call IO_error(106_pInt,ext_msg=trim(fileName))
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! read data as stream
|
||||||
|
inquire(file = fileName, size=fileLength)
|
||||||
|
open(newunit=fileUnit, file=fileName, access='stream',&
|
||||||
|
status='old', position='rewind', action='read',iostat=myStat)
|
||||||
|
if(myStat /= 0_pInt) call IO_error(100_pInt,ext_msg=trim(fileName))
|
||||||
|
allocate(character(len=fileLength)::rawData)
|
||||||
|
read(fileUnit) rawData
|
||||||
|
close(fileUnit)
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! count lines to allocate string array
|
||||||
|
myTotalLines = 0_pInt
|
||||||
|
do l=1_pInt, len(rawData)
|
||||||
|
if (rawData(l:l) == new_line('')) myTotalLines = myTotalLines+1
|
||||||
|
enddo
|
||||||
|
allocate(fileContent(myTotalLines))
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! split raw data at end of line and handle includes
|
||||||
|
startPos = 1_pInt
|
||||||
|
endPos = 0_pInt
|
||||||
|
|
||||||
|
includedLines=0_pInt
|
||||||
|
l=0_pInt
|
||||||
|
do while (startPos <= len(rawData))
|
||||||
|
l = l + 1_pInt
|
||||||
|
endPos = endPos + scan(rawData(startPos:),new_line(''))
|
||||||
|
if(endPos - startPos >256) call IO_error(107_pInt,ext_msg=trim(fileName))
|
||||||
|
line = rawData(startPos:endPos-1_pInt)
|
||||||
|
startPos = endPos + 1_pInt
|
||||||
|
|
||||||
|
recursion: if(scan(trim(line),'{') < scan(trim(line),'}')) then
|
||||||
|
myTotalLines = myTotalLines - 1_pInt
|
||||||
|
includedContent = IO_recursiveRead(trim(line(scan(line,'{')+1_pInt:scan(line,'}')-1_pInt)), &
|
||||||
|
merge(cnt,1_pInt,present(cnt))) ! to track recursion depth
|
||||||
|
includedLines = includedLines + size(includedContent)
|
||||||
|
missingLines = myTotalLines + includedLines - size(fileContent(1:l-1)) -size(includedContent)
|
||||||
|
fileContent = [ fileContent(1:l-1_pInt), includedContent, [(dummy,i=1,missingLines)] ] ! add content and grow array
|
||||||
|
l = l - 1_pInt + size(includedContent)
|
||||||
|
else recursion
|
||||||
|
fileContent(l) = line
|
||||||
|
endif recursion
|
||||||
|
|
||||||
|
enddo
|
||||||
|
|
||||||
|
end function IO_recursiveRead
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief checks if unit is opened for reading, if true rewinds. Otherwise stops with
|
!> @brief checks if unit is opened for reading, if true rewinds. Otherwise stops with
|
||||||
|
@ -178,7 +250,7 @@ end function IO_read
|
||||||
subroutine IO_checkAndRewind(fileUnit)
|
subroutine IO_checkAndRewind(fileUnit)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: fileUnit !< file unit
|
integer(pInt), intent(in) :: fileUnit !< file unit
|
||||||
logical :: fileOpened
|
logical :: fileOpened
|
||||||
character(len=15) :: fileRead
|
character(len=15) :: fileRead
|
||||||
|
|
||||||
|
@ -203,7 +275,7 @@ subroutine IO_open_file(fileUnit,path)
|
||||||
|
|
||||||
integer(pInt) :: myStat
|
integer(pInt) :: myStat
|
||||||
|
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
||||||
|
|
||||||
end subroutine IO_open_file
|
end subroutine IO_open_file
|
||||||
|
@ -222,7 +294,8 @@ logical function IO_open_file_stat(fileUnit,path)
|
||||||
|
|
||||||
integer(pInt) :: myStat
|
integer(pInt) :: myStat
|
||||||
|
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
|
if (myStat /= 0_pInt) close(fileUnit)
|
||||||
IO_open_file_stat = (myStat == 0_pInt)
|
IO_open_file_stat = (myStat == 0_pInt)
|
||||||
|
|
||||||
end function IO_open_file_stat
|
end function IO_open_file_stat
|
||||||
|
@ -246,7 +319,7 @@ subroutine IO_open_jobFile(fileUnit,ext)
|
||||||
character(len=1024) :: path
|
character(len=1024) :: path
|
||||||
|
|
||||||
path = trim(getSolverJobName())//'.'//ext
|
path = trim(getSolverJobName())//'.'//ext
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
||||||
|
|
||||||
end subroutine IO_open_jobFile
|
end subroutine IO_open_jobFile
|
||||||
|
@ -270,7 +343,8 @@ logical function IO_open_jobFile_stat(fileUnit,ext)
|
||||||
character(len=1024) :: path
|
character(len=1024) :: path
|
||||||
|
|
||||||
path = trim(getSolverJobName())//'.'//ext
|
path = trim(getSolverJobName())//'.'//ext
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
|
if (myStat /= 0_pInt) close(fileUnit)
|
||||||
IO_open_jobFile_stat = (myStat == 0_pInt)
|
IO_open_jobFile_stat = (myStat == 0_pInt)
|
||||||
|
|
||||||
end function IO_open_JobFile_stat
|
end function IO_open_JobFile_stat
|
||||||
|
@ -296,11 +370,11 @@ subroutine IO_open_inputFile(fileUnit,modelName)
|
||||||
|
|
||||||
fileType = 1_pInt ! assume .pes
|
fileType = 1_pInt ! assume .pes
|
||||||
path = trim(modelName)//inputFileExtension(fileType) ! attempt .pes, if it exists: it should be used
|
path = trim(modelName)//inputFileExtension(fileType) ! attempt .pes, if it exists: it should be used
|
||||||
open(fileUnit+1,status='old',iostat=myStat,file=path)
|
open(fileUnit+1,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
if(myStat /= 0_pInt) then ! if .pes does not work / exist; use conventional extension, i.e.".inp"
|
if(myStat /= 0_pInt) then ! if .pes does not work / exist; use conventional extension, i.e.".inp"
|
||||||
fileType = 2_pInt
|
fileType = 2_pInt
|
||||||
path = trim(modelName)//inputFileExtension(fileType)
|
path = trim(modelName)//inputFileExtension(fileType)
|
||||||
open(fileUnit+1,status='old',iostat=myStat,file=path)
|
open(fileUnit+1,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
endif
|
endif
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
||||||
|
|
||||||
|
@ -335,7 +409,7 @@ subroutine IO_open_logFile(fileUnit)
|
||||||
character(len=1024) :: path
|
character(len=1024) :: path
|
||||||
|
|
||||||
path = trim(getSolverJobName())//LogFileExtension
|
path = trim(getSolverJobName())//LogFileExtension
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
||||||
|
|
||||||
end subroutine IO_open_logFile
|
end subroutine IO_open_logFile
|
||||||
|
@ -755,16 +829,22 @@ pure function IO_getTag(string,openChar,closeChar)
|
||||||
character(len=*), intent(in) :: string !< string to check for tag
|
character(len=*), intent(in) :: string !< string to check for tag
|
||||||
character(len=len_trim(string)) :: IO_getTag
|
character(len=len_trim(string)) :: IO_getTag
|
||||||
|
|
||||||
character(len=*), intent(in) :: openChar, & !< indicates beginning of tag
|
character, intent(in) :: openChar, & !< indicates beginning of tag
|
||||||
closeChar !< indicates end of tag
|
closeChar !< indicates end of tag
|
||||||
|
|
||||||
character(len=*), parameter :: SEP=achar(32)//achar(9)//achar(10)//achar(13) ! whitespaces
|
character(len=*), parameter :: SEP=achar(32)//achar(9)//achar(10)//achar(13) ! whitespaces
|
||||||
|
|
||||||
integer :: left,right ! no pInt
|
integer :: left,right ! no pInt
|
||||||
|
|
||||||
IO_getTag = ''
|
IO_getTag = ''
|
||||||
left = scan(string,openChar)
|
|
||||||
right = scan(string,closeChar)
|
|
||||||
|
if (openChar /= closeChar) then
|
||||||
|
left = scan(string,openChar)
|
||||||
|
right = scan(string,closeChar)
|
||||||
|
else
|
||||||
|
left = scan(string,openChar)
|
||||||
|
right = left + merge(scan(string(left+1:),openChar),0_pInt,len(string) > left)
|
||||||
|
endif
|
||||||
|
|
||||||
if (left == verify(string,SEP) .and. right > left) & ! openChar is first and closeChar occurs
|
if (left == verify(string,SEP) .and. right > left) & ! openChar is first and closeChar occurs
|
||||||
IO_getTag = string(left+1:right-1)
|
IO_getTag = string(left+1:right-1)
|
||||||
|
@ -772,173 +852,6 @@ pure function IO_getTag(string,openChar,closeChar)
|
||||||
end function IO_getTag
|
end function IO_getTag
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief count number of [sections] in <part> for given file handle
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
integer(pInt) function IO_countSections(fileUnit,part)
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: fileUnit !< file handle
|
|
||||||
character(len=*), intent(in) :: part !< part name in which sections are counted
|
|
||||||
|
|
||||||
character(len=65536) :: line
|
|
||||||
|
|
||||||
line = ''
|
|
||||||
IO_countSections = 0_pInt
|
|
||||||
rewind(fileUnit)
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif
|
|
||||||
if (IO_getTag(line,'[',']') /= '') & ! found [section] identifier
|
|
||||||
IO_countSections = IO_countSections + 1_pInt
|
|
||||||
enddo
|
|
||||||
|
|
||||||
end function IO_countSections
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief returns array of tag counts within <part> for at most N [sections]
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
function IO_countTagInPart(fileUnit,part,tag,Nsections)
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: Nsections !< maximum number of sections in which tag is searched for
|
|
||||||
integer(pInt), dimension(Nsections) :: IO_countTagInPart
|
|
||||||
integer(pInt), intent(in) :: fileUnit !< file handle
|
|
||||||
character(len=*),intent(in) :: part, & !< part in which tag is searched for
|
|
||||||
tag !< tag to search for
|
|
||||||
|
|
||||||
|
|
||||||
integer(pInt), dimension(Nsections) :: counter
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
|
||||||
integer(pInt) :: section
|
|
||||||
character(len=65536) :: line
|
|
||||||
|
|
||||||
line = ''
|
|
||||||
counter = 0_pInt
|
|
||||||
section = 0_pInt
|
|
||||||
|
|
||||||
rewind(fileUnit)
|
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif
|
|
||||||
if (IO_getTag(line,'[',']') /= '') section = section + 1_pInt ! found [section] identifier
|
|
||||||
if (section > 0) then
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
if (tag == trim(IO_lc(IO_stringValue(line,chunkPos,1_pInt)))) & ! match
|
|
||||||
counter(section) = counter(section) + 1_pInt
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
|
|
||||||
IO_countTagInPart = counter
|
|
||||||
|
|
||||||
end function IO_countTagInPart
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief returns array of tag presence within <part> for at most N [sections]
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
function IO_spotTagInPart(fileUnit,part,tag,Nsections)
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: Nsections !< maximum number of sections in which tag is searched for
|
|
||||||
logical, dimension(Nsections) :: IO_spotTagInPart
|
|
||||||
integer(pInt), intent(in) :: fileUnit !< file handle
|
|
||||||
character(len=*),intent(in) :: part, & !< part in which tag is searched for
|
|
||||||
tag !< tag to search for
|
|
||||||
|
|
||||||
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
|
||||||
integer(pInt) :: section
|
|
||||||
character(len=65536) :: line
|
|
||||||
|
|
||||||
IO_spotTagInPart = .false. ! assume to nowhere spot tag
|
|
||||||
section = 0_pInt
|
|
||||||
line = ''
|
|
||||||
|
|
||||||
rewind(fileUnit)
|
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif foundNextPart
|
|
||||||
if (IO_getTag(line,'[',']') /= '') section = section + 1_pInt ! found [section] identifier
|
|
||||||
if (section > 0_pInt) then
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
if (tag == trim(IO_lc(IO_stringValue(line,chunkPos,1_pInt)))) & ! match
|
|
||||||
IO_spotTagInPart(section) = .true.
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
|
|
||||||
end function IO_spotTagInPart
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief return logical whether tag is present within <part> before any [sections]
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
logical function IO_globalTagInPart(fileUnit,part,tag)
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: fileUnit !< file handle
|
|
||||||
character(len=*),intent(in) :: part, & !< part in which tag is searched for
|
|
||||||
tag !< tag to search for
|
|
||||||
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
|
||||||
character(len=65536) :: line
|
|
||||||
|
|
||||||
IO_globalTagInPart = .false. ! assume to nowhere spot tag
|
|
||||||
line =''
|
|
||||||
|
|
||||||
rewind(fileUnit)
|
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif foundNextPart
|
|
||||||
foundFirstSection: if (IO_getTag(line,'[',']') /= '') then
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif foundFirstSection
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
match: if (tag == trim(IO_lc(IO_stringValue(line,chunkPos,1_pInt)))) then
|
|
||||||
IO_globalTagInPart = .true.
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif match
|
|
||||||
enddo
|
|
||||||
|
|
||||||
end function IO_globalTagInPart
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief locates all space-separated chunks in given string and returns array containing number
|
!> @brief locates all space-separated chunks in given string and returns array containing number
|
||||||
!! them and the left/right position to be used by IO_xxxVal
|
!! them and the left/right position to be used by IO_xxxVal
|
||||||
|
@ -1450,12 +1363,16 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN)
|
||||||
pure function IO_intOut(intToPrint)
|
pure function IO_intOut(intToPrint)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=19) :: N_Digits ! maximum digits for 64 bit integer
|
|
||||||
character(len=40) :: IO_intOut
|
|
||||||
integer(pInt), intent(in) :: intToPrint
|
integer(pInt), intent(in) :: intToPrint
|
||||||
|
character(len=41) :: IO_intOut
|
||||||
|
integer(pInt) :: N_digits
|
||||||
|
character(len=19) :: width ! maximum digits for 64 bit integer
|
||||||
|
character(len=20) :: min_width ! longer for negative values
|
||||||
|
|
||||||
write(N_Digits, '(I19.19)') 1_pInt + int(log10(real(intToPrint)),pInt)
|
N_digits = 1_pInt + int(log10(real(max(abs(intToPrint),1_pInt))),pInt)
|
||||||
IO_intOut = 'I'//trim(N_Digits)//'.'//trim(N_Digits)
|
write(width, '(I19.19)') N_digits
|
||||||
|
write(min_width, '(I20.20)') N_digits + merge(1_pInt,0_pInt,intToPrint < 0_pInt)
|
||||||
|
IO_intOut = 'I'//trim(min_width)//'.'//trim(width)
|
||||||
|
|
||||||
end function IO_intOut
|
end function IO_intOut
|
||||||
|
|
||||||
|
@ -1513,6 +1430,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
msg = 'unknown output:'
|
msg = 'unknown output:'
|
||||||
case (106_pInt)
|
case (106_pInt)
|
||||||
msg = 'working directory does not exist:'
|
msg = 'working directory does not exist:'
|
||||||
|
case (107_pInt)
|
||||||
|
msg = 'line length exceeds limit of 256'
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! lattice error messages
|
! lattice error messages
|
||||||
|
@ -1558,6 +1477,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
msg = 'illegal texture transformation specified'
|
msg = 'illegal texture transformation specified'
|
||||||
case (160_pInt)
|
case (160_pInt)
|
||||||
msg = 'no entries in config part'
|
msg = 'no entries in config part'
|
||||||
|
case (161_pInt)
|
||||||
|
msg = 'config part found twice'
|
||||||
case (165_pInt)
|
case (165_pInt)
|
||||||
msg = 'homogenization configuration'
|
msg = 'homogenization configuration'
|
||||||
case (170_pInt)
|
case (170_pInt)
|
||||||
|
@ -1655,7 +1576,7 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
case (845_pInt)
|
case (845_pInt)
|
||||||
msg = 'incomplete information in spectral mesh header'
|
msg = 'incomplete information in spectral mesh header'
|
||||||
case (846_pInt)
|
case (846_pInt)
|
||||||
msg = 'not a rotation defined for loadcase rotation'
|
msg = 'rotation for load case rotation ill-defined (R:RT != I)'
|
||||||
case (847_pInt)
|
case (847_pInt)
|
||||||
msg = 'update of gamma operator not possible when pre-calculated'
|
msg = 'update of gamma operator not possible when pre-calculated'
|
||||||
case (880_pInt)
|
case (880_pInt)
|
||||||
|
|
327
src/config.f90
327
src/config.f90
|
@ -20,12 +20,17 @@ module config
|
||||||
type, public :: tPartitionedStringList
|
type, public :: tPartitionedStringList
|
||||||
type(tPartitionedString) :: string
|
type(tPartitionedString) :: string
|
||||||
type(tPartitionedStringList), pointer :: next => null()
|
type(tPartitionedStringList), pointer :: next => null()
|
||||||
|
|
||||||
contains
|
contains
|
||||||
procedure :: add => add
|
procedure :: add => add
|
||||||
procedure :: show => show
|
procedure :: show => show
|
||||||
procedure :: free => free
|
procedure :: free => free
|
||||||
|
|
||||||
|
! currently, a finalize is needed for all shapes of tPartitionedStringList.
|
||||||
|
! with Fortran 2015, we can define one recursive elemental function
|
||||||
|
! https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/543326
|
||||||
|
final :: finalize, &
|
||||||
|
finalizeArray
|
||||||
|
|
||||||
procedure :: keyExists => keyExists
|
procedure :: keyExists => keyExists
|
||||||
procedure :: countKeys => countKeys
|
procedure :: countKeys => countKeys
|
||||||
|
|
||||||
|
@ -37,11 +42,10 @@ module config
|
||||||
procedure :: getInts => getInts
|
procedure :: getInts => getInts
|
||||||
procedure :: getStrings => getStrings
|
procedure :: getStrings => getStrings
|
||||||
|
|
||||||
|
|
||||||
end type tPartitionedStringList
|
end type tPartitionedStringList
|
||||||
|
|
||||||
type(tPartitionedStringList), public :: emptyList
|
type(tPartitionedStringList), public, protected, allocatable, dimension(:) :: &
|
||||||
|
|
||||||
type(tPartitionedStringList), public, protected, allocatable, dimension(:) :: & ! QUESTION: rename to config_XXX?
|
|
||||||
config_phase, &
|
config_phase, &
|
||||||
config_microstructure, &
|
config_microstructure, &
|
||||||
config_homogenization, &
|
config_homogenization, &
|
||||||
|
@ -76,7 +80,6 @@ module config
|
||||||
MATERIAL_configFile = 'material.config', & !< generic name for material configuration file
|
MATERIAL_configFile = 'material.config', & !< generic name for material configuration file
|
||||||
MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file
|
MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file
|
||||||
|
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
config_init, &
|
config_init, &
|
||||||
config_deallocate
|
config_deallocate
|
||||||
|
@ -92,12 +95,14 @@ subroutine config_init()
|
||||||
compiler_version, &
|
compiler_version, &
|
||||||
compiler_options
|
compiler_options
|
||||||
#endif
|
#endif
|
||||||
|
use prec, only: &
|
||||||
|
pStringLen
|
||||||
|
use DAMASK_interface, only: &
|
||||||
|
getSolverJobName
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_error, &
|
IO_error, &
|
||||||
IO_open_file, &
|
|
||||||
IO_read, &
|
|
||||||
IO_lc, &
|
IO_lc, &
|
||||||
IO_open_jobFile_stat, &
|
IO_recursiveRead, &
|
||||||
IO_getTag, &
|
IO_getTag, &
|
||||||
IO_timeStamp, &
|
IO_timeStamp, &
|
||||||
IO_EOF
|
IO_EOF
|
||||||
|
@ -107,12 +112,13 @@ subroutine config_init()
|
||||||
debug_levelBasic
|
debug_levelBasic
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
integer(pInt) :: myDebug,i
|
||||||
integer(pInt) :: myDebug
|
|
||||||
|
|
||||||
character(len=65536) :: &
|
character(len=pStringLen) :: &
|
||||||
line, &
|
line, &
|
||||||
part
|
part
|
||||||
|
character(len=pStringLen), dimension(:), allocatable :: fileContent
|
||||||
|
logical :: fileExists
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- config init -+>>>'
|
write(6,'(/,a)') ' <<<+- config init -+>>>'
|
||||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||||
|
@ -120,39 +126,40 @@ subroutine config_init()
|
||||||
|
|
||||||
myDebug = debug_level(debug_material)
|
myDebug = debug_level(debug_material)
|
||||||
|
|
||||||
if (.not. IO_open_jobFile_stat(FILEUNIT,material_localFileExt)) & ! no local material configuration present...
|
inquire(file=trim(getSolverJobName())//'.'//material_localFileExt,exist=fileExists)
|
||||||
call IO_open_file(FILEUNIT,material_configFile) ! ...open material.config file
|
if(fileExists) then
|
||||||
|
fileContent = IO_recursiveRead(trim(getSolverJobName())//'.'//material_localFileExt)
|
||||||
|
else
|
||||||
|
inquire(file='material.config',exist=fileExists)
|
||||||
|
if(.not. fileExists) call IO_error(100_pInt,ext_msg='material.config')
|
||||||
|
fileContent = IO_recursiveRead('material.config')
|
||||||
|
endif
|
||||||
|
|
||||||
rewind(fileUnit)
|
do i = 1_pInt, size(fileContent)
|
||||||
line = '' ! to have it initialized
|
line = trim(fileContent(i))
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
part = IO_lc(IO_getTag(line,'<','>'))
|
part = IO_lc(IO_getTag(line,'<','>'))
|
||||||
|
|
||||||
select case (trim(part))
|
select case (trim(part))
|
||||||
|
|
||||||
case (trim(material_partPhase))
|
case (trim(material_partPhase))
|
||||||
call parseFile(line,phase_name,config_phase,FILEUNIT)
|
call parseFile(phase_name,config_phase,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Phase parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Phase parsed'; flush(6)
|
||||||
|
|
||||||
case (trim(material_partMicrostructure))
|
case (trim(material_partMicrostructure))
|
||||||
call parseFile(line,microstructure_name,config_microstructure,FILEUNIT)
|
call parseFile(microstructure_name,config_microstructure,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Microstructure parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Microstructure parsed'; flush(6)
|
||||||
|
|
||||||
case (trim(material_partCrystallite))
|
case (trim(material_partCrystallite))
|
||||||
call parseFile(line,crystallite_name,config_crystallite,FILEUNIT)
|
call parseFile(crystallite_name,config_crystallite,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Crystallite parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Crystallite parsed'; flush(6)
|
||||||
|
|
||||||
case (trim(material_partHomogenization))
|
case (trim(material_partHomogenization))
|
||||||
call parseFile(line,homogenization_name,config_homogenization,FILEUNIT)
|
call parseFile(homogenization_name,config_homogenization,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Homogenization parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Homogenization parsed'; flush(6)
|
||||||
|
|
||||||
case (trim(material_partTexture))
|
case (trim(material_partTexture))
|
||||||
call parseFile(line,texture_name,config_texture,FILEUNIT)
|
call parseFile(texture_name,config_texture,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Texture parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Texture parsed'; flush(6)
|
||||||
|
|
||||||
case default
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
@ -173,107 +180,83 @@ end subroutine config_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief parses the material.config file
|
!> @brief parses the material.config file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine parseFile(line,&
|
subroutine parseFile(sectionNames,part,line, &
|
||||||
sectionNames,part,fileUnit)
|
fileContent)
|
||||||
|
use prec, only: &
|
||||||
|
pStringLen
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_read, &
|
|
||||||
IO_error, &
|
IO_error, &
|
||||||
IO_lc, &
|
IO_getTag
|
||||||
IO_getTag, &
|
|
||||||
IO_isBlank, &
|
|
||||||
IO_stringValue, &
|
|
||||||
IO_stringPos, &
|
|
||||||
IO_EOF
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: fileUnit
|
character(len=64), allocatable, dimension(:), intent(out) :: sectionNames
|
||||||
character(len=*), dimension(:), allocatable, intent(inout) :: sectionNames
|
|
||||||
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: part
|
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: part
|
||||||
character(len=65536),intent(out) :: line
|
character(len=pStringLen), intent(inout) :: line
|
||||||
|
character(len=pStringLen), dimension(:), intent(in) :: fileContent
|
||||||
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
integer(pInt), allocatable, dimension(:) :: partPosition ! position of [] tags + last line in section
|
||||||
integer(pInt) :: s
|
integer(pInt) :: i, j
|
||||||
character(len=65536) :: devNull
|
|
||||||
character(len=64) :: tag
|
|
||||||
logical :: echo
|
logical :: echo
|
||||||
|
|
||||||
echo = .false.
|
echo = .false.
|
||||||
allocate(part(0))
|
|
||||||
|
|
||||||
s = 0_pInt
|
if (allocated(part)) call IO_error(161_pInt,ext_msg=trim(line))
|
||||||
do while (trim(line) /= IO_EOF) ! read through sections of material part
|
allocate(partPosition(0))
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
do i = 1_pInt, size(fileContent)
|
||||||
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
|
line = trim(fileContent(i))
|
||||||
devNull = IO_read(fileUnit, .true.) ! reset IO_read to close any recursively included files
|
if (IO_getTag(line,'<','>') /= '') exit
|
||||||
exit
|
|
||||||
endif foundNextPart
|
|
||||||
nextSection: if (IO_getTag(line,'[',']') /= '') then
|
nextSection: if (IO_getTag(line,'[',']') /= '') then
|
||||||
s = s + 1_pInt
|
partPosition = [partPosition, i]
|
||||||
part = [part, emptyList]
|
|
||||||
tag = IO_getTag(line,'[',']')
|
|
||||||
GfortranBug86033: if (.not. allocated(sectionNames)) then
|
|
||||||
allocate(sectionNames(1),source=tag)
|
|
||||||
else GfortranBug86033
|
|
||||||
sectionNames = [sectionNames,tag]
|
|
||||||
endif GfortranBug86033
|
|
||||||
cycle
|
cycle
|
||||||
endif nextSection
|
endif nextSection
|
||||||
chunkPos = IO_stringPos(line)
|
if (size(partPosition) < 1_pInt) &
|
||||||
tag = IO_lc(IO_stringValue(trim(line),chunkPos,1_pInt)) ! extract key
|
echo = (trim(IO_getTag(line,'/','/')) == 'echo') .or. echo
|
||||||
inSection: if (s > 0_pInt) then
|
|
||||||
call part(s)%add(IO_lc(trim(line)))
|
|
||||||
else inSection
|
|
||||||
echo = (trim(tag) == '/echo/')
|
|
||||||
endif inSection
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if (echo) then
|
allocate(sectionNames(size(partPosition)))
|
||||||
do s = 1, size(sectionNames)
|
allocate(part(size(partPosition)))
|
||||||
call part(s)%show()
|
|
||||||
end do
|
partPosition = [partPosition, i] ! needed when actually storing content
|
||||||
end if
|
|
||||||
|
do i = 1_pInt, size(partPosition) -1_pInt
|
||||||
|
sectionNames(i) = trim(adjustl(fileContent(partPosition(i))))
|
||||||
|
do j = partPosition(i) + 1_pInt, partPosition(i+1) -1_pInt
|
||||||
|
call part(i)%add(trim(adjustl(fileContent(j))))
|
||||||
|
enddo
|
||||||
|
if (echo) then
|
||||||
|
write(6,*) 'section',i, '"'//trim(sectionNames(i))//'"'
|
||||||
|
call part(i)%show()
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
end subroutine parseFile
|
end subroutine parseFile
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief deallocates the linked lists that store the content of the configuration files
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine config_deallocate(what)
|
subroutine config_deallocate(what)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_error
|
IO_error
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=*), intent(in) :: what
|
character(len=*), intent(in) :: what
|
||||||
integer(pInt) :: i
|
|
||||||
|
|
||||||
select case(what)
|
select case(trim(what))
|
||||||
|
|
||||||
case('material.config/phase')
|
case('material.config/phase')
|
||||||
do i=1, size(config_phase)
|
|
||||||
call config_phase(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_phase)
|
deallocate(config_phase)
|
||||||
|
|
||||||
case('material.config/microstructure')
|
case('material.config/microstructure')
|
||||||
do i=1, size(config_microstructure)
|
|
||||||
call config_microstructure(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_microstructure)
|
deallocate(config_microstructure)
|
||||||
|
|
||||||
case('material.config/crystallite')
|
case('material.config/crystallite')
|
||||||
do i=1, size(config_crystallite)
|
|
||||||
call config_crystallite(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_crystallite)
|
deallocate(config_crystallite)
|
||||||
|
|
||||||
case('material.config/homogenization')
|
case('material.config/homogenization')
|
||||||
do i=1, size(config_homogenization)
|
|
||||||
call config_homogenization(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_homogenization)
|
deallocate(config_homogenization)
|
||||||
|
|
||||||
case('material.config/texture')
|
case('material.config/texture')
|
||||||
do i=1, size(config_texture)
|
|
||||||
call config_texture(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_texture)
|
deallocate(config_texture)
|
||||||
|
|
||||||
case default
|
case default
|
||||||
|
@ -284,11 +267,17 @@ subroutine config_deallocate(what)
|
||||||
end subroutine config_deallocate
|
end subroutine config_deallocate
|
||||||
|
|
||||||
|
|
||||||
|
!##################################################################################################
|
||||||
|
! The folowing functions are part of the tPartitionedStringList object
|
||||||
|
!##################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief add element
|
!> @brief add element
|
||||||
!> @details Adds a string together with the start/end position of chunks in this string. The new
|
!> @details Adds a string together with the start/end position of chunks in this string. The new
|
||||||
!! element is added at the end of the list. Empty strings are not added. All strings are converted
|
!! element is added at the end of the list. Empty strings are not added. All strings are converted
|
||||||
!! to lower case
|
!! to lower case. The data is not stored in the new element but in the current.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine add(this,string)
|
subroutine add(this,string)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
|
@ -299,19 +288,18 @@ subroutine add(this,string)
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), target, intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: string
|
character(len=*), intent(in) :: string
|
||||||
type(tPartitionedStringList), pointer :: new, item
|
type(tPartitionedStringList), pointer :: new, temp
|
||||||
|
|
||||||
if (IO_isBlank(string)) return
|
if (IO_isBlank(string)) return
|
||||||
|
|
||||||
allocate(new)
|
allocate(new)
|
||||||
new%string%val = IO_lc (trim(string))
|
temp => this
|
||||||
new%string%pos = IO_stringPos(trim(string))
|
do while (associated(temp%next))
|
||||||
|
temp => temp%next
|
||||||
item => this
|
|
||||||
do while (associated(item%next))
|
|
||||||
item => item%next
|
|
||||||
enddo
|
enddo
|
||||||
item%next => new
|
temp%string%val = IO_lc (trim(string))
|
||||||
|
temp%string%pos = IO_stringPos(trim(string))
|
||||||
|
temp%next => new
|
||||||
|
|
||||||
end subroutine add
|
end subroutine add
|
||||||
|
|
||||||
|
@ -323,12 +311,12 @@ end subroutine add
|
||||||
subroutine show(this)
|
subroutine show(this)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
write(6,'(a)') trim(item%string%val)
|
write(6,'(a)') ' '//trim(item%string%val)
|
||||||
item => item%next
|
item => item%next
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
@ -336,28 +324,55 @@ end subroutine show
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief cleans entire list
|
!> @brief empties list and frees associated memory
|
||||||
!> @details list head is remains alive
|
!> @details explicit interface to reset list. Triggers final statement (and following chain reaction)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine free(this)
|
subroutine free(this)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), target, intent(in) :: this
|
class(tPartitionedStringList), intent(inout) :: this
|
||||||
type(tPartitionedStringList), pointer :: new, item
|
|
||||||
|
|
||||||
if (.not. associated(this%next)) return
|
if(associated(this%next)) deallocate(this%next)
|
||||||
|
|
||||||
item => this%next
|
|
||||||
do while (associated(item%next))
|
|
||||||
new => item
|
|
||||||
deallocate(item)
|
|
||||||
item => new%next
|
|
||||||
enddo
|
|
||||||
deallocate(item)
|
|
||||||
|
|
||||||
end subroutine free
|
end subroutine free
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief empties list and frees associated memory
|
||||||
|
!> @details called when variable goes out of scope. Triggers chain reaction for list
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
recursive subroutine finalize(this)
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
type(tPartitionedStringList), intent(inout) :: this
|
||||||
|
|
||||||
|
if(associated(this%next)) deallocate(this%next)
|
||||||
|
|
||||||
|
end subroutine finalize
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief cleans entire array of linke lists
|
||||||
|
!> @details called when variable goes out of scope and deallocates the list at each array entry
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine finalizeArray(this)
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
integer :: i
|
||||||
|
type(tPartitionedStringList), intent(inout), dimension(:) :: this
|
||||||
|
type(tPartitionedStringList), pointer :: temp ! bug in Gfortran?
|
||||||
|
|
||||||
|
do i=1, size(this)
|
||||||
|
if (associated(this(i)%next)) then
|
||||||
|
temp => this(i)%next
|
||||||
|
!deallocate(this(i)) !internal compiler error: in gfc_build_final_call, at fortran/trans.c:975
|
||||||
|
deallocate(temp)
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
|
end subroutine finalizeArray
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief reports wether a given key (string value at first position) exists in the list
|
!> @brief reports wether a given key (string value at first position) exists in the list
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -366,14 +381,14 @@ logical function keyExists(this,key)
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
|
|
||||||
keyExists = .false.
|
keyExists = .false.
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item) .and. .not. keyExists)
|
do while (associated(item%next) .and. .not. keyExists)
|
||||||
keyExists = trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)
|
keyExists = trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)
|
||||||
item => item%next
|
item => item%next
|
||||||
end do
|
end do
|
||||||
|
@ -391,14 +406,14 @@ integer(pInt) function countKeys(this,key)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
|
|
||||||
countKeys = 0_pInt
|
countKeys = 0_pInt
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) &
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) &
|
||||||
countKeys = countKeys + 1_pInt
|
countKeys = countKeys + 1_pInt
|
||||||
item => item%next
|
item => item%next
|
||||||
|
@ -419,17 +434,17 @@ real(pReal) function getFloat(this,key,defaultVal)
|
||||||
IO_FloatValue
|
IO_FloatValue
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
real(pReal), intent(in), optional :: defaultVal
|
real(pReal), intent(in), optional :: defaultVal
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found
|
logical :: found
|
||||||
|
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
if (found) getFloat = defaultVal
|
if (found) getFloat = defaultVal
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
||||||
|
@ -455,17 +470,17 @@ integer(pInt) function getInt(this,key,defaultVal)
|
||||||
IO_IntValue
|
IO_IntValue
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
integer(pInt), intent(in), optional :: defaultVal
|
integer(pInt), intent(in), optional :: defaultVal
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found
|
logical :: found
|
||||||
|
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
if (found) getInt = defaultVal
|
if (found) getInt = defaultVal
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
||||||
|
@ -491,13 +506,13 @@ character(len=65536) function getString(this,key,defaultVal,raw)
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
character(len=65536), intent(in), optional :: defaultVal
|
character(len=65536), intent(in), optional :: defaultVal
|
||||||
logical, intent(in), optional :: raw
|
logical, intent(in), optional :: raw
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found, &
|
logical :: found, &
|
||||||
whole
|
whole
|
||||||
|
|
||||||
whole = merge(raw,.false.,present(raw)) ! whole string or white space splitting
|
whole = merge(raw,.false.,present(raw)) ! whole string or white space splitting
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
|
@ -506,8 +521,8 @@ character(len=65536) function getString(this,key,defaultVal,raw)
|
||||||
if (len_trim(getString) /= len_trim(defaultVal)) call IO_error(0_pInt,ext_msg='getString')
|
if (len_trim(getString) /= len_trim(defaultVal)) call IO_error(0_pInt,ext_msg='getString')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
||||||
|
@ -539,7 +554,7 @@ function getFloats(this,key,defaultVal,requiredShape)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), dimension(:), allocatable :: getFloats
|
real(pReal), dimension(:), allocatable :: getFloats
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
real(pReal), dimension(:), intent(in), optional :: defaultVal
|
real(pReal), dimension(:), intent(in), optional :: defaultVal
|
||||||
integer(pInt), dimension(:), intent(in), optional :: requiredShape
|
integer(pInt), dimension(:), intent(in), optional :: requiredShape
|
||||||
|
@ -553,8 +568,8 @@ function getFloats(this,key,defaultVal,requiredShape)
|
||||||
|
|
||||||
allocate(getFloats(0))
|
allocate(getFloats(0))
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (.not. cumulative) getFloats = [real(pReal)::]
|
if (.not. cumulative) getFloats = [real(pReal)::]
|
||||||
|
@ -586,7 +601,7 @@ function getInts(this,key,defaultVal,requiredShape)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), dimension(:), allocatable :: getInts
|
integer(pInt), dimension(:), allocatable :: getInts
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
integer(pInt), dimension(:), intent(in), optional :: defaultVal, &
|
integer(pInt), dimension(:), intent(in), optional :: defaultVal, &
|
||||||
requiredShape
|
requiredShape
|
||||||
|
@ -600,8 +615,8 @@ function getInts(this,key,defaultVal,requiredShape)
|
||||||
|
|
||||||
allocate(getInts(0))
|
allocate(getInts(0))
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (.not. cumulative) getInts = [integer(pInt)::]
|
if (.not. cumulative) getInts = [integer(pInt)::]
|
||||||
|
@ -633,7 +648,7 @@ function getStrings(this,key,defaultVal,requiredShape,raw)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=65536),dimension(:), allocatable :: getStrings
|
character(len=65536),dimension(:), allocatable :: getStrings
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
character(len=65536),dimension(:), intent(in), optional :: defaultVal
|
character(len=65536),dimension(:), intent(in), optional :: defaultVal
|
||||||
integer(pInt), dimension(:), intent(in), optional :: requiredShape
|
integer(pInt), dimension(:), intent(in), optional :: requiredShape
|
||||||
|
@ -649,8 +664,8 @@ function getStrings(this,key,defaultVal,requiredShape,raw)
|
||||||
whole = merge(raw,.false.,present(raw))
|
whole = merge(raw,.false.,present(raw))
|
||||||
found = .false.
|
found = .false.
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (allocated(getStrings) .and. .not. cumulative) deallocate(getStrings)
|
if (allocated(getStrings) .and. .not. cumulative) deallocate(getStrings)
|
||||||
|
|
|
@ -58,14 +58,15 @@ subroutine constitutive_init()
|
||||||
IO_write_jobIntFile, &
|
IO_write_jobIntFile, &
|
||||||
IO_timeStamp
|
IO_timeStamp
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_deallocate
|
config_phase
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
FE_geomtype
|
FE_geomtype
|
||||||
use config, only: &
|
use config, only: &
|
||||||
material_Nphase, &
|
material_Nphase, &
|
||||||
material_localFileExt, &
|
material_localFileExt, &
|
||||||
phase_name, &
|
phase_name, &
|
||||||
material_configFile
|
material_configFile, &
|
||||||
|
config_deallocate
|
||||||
use material, only: &
|
use material, only: &
|
||||||
material_phase, &
|
material_phase, &
|
||||||
phase_plasticity, &
|
phase_plasticity, &
|
||||||
|
@ -138,7 +139,7 @@ subroutine constitutive_init()
|
||||||
use kinematics_hydrogen_strain
|
use kinematics_hydrogen_strain
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
integer(pInt), parameter :: FILEUNIT = 204_pInt
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
o, & !< counter in output loop
|
o, & !< counter in output loop
|
||||||
ph, & !< counter in phase loop
|
ph, & !< counter in phase loop
|
||||||
|
|
|
@ -114,6 +114,7 @@ module crystallite
|
||||||
end enum
|
end enum
|
||||||
integer(kind(undefined_ID)),dimension(:,:), allocatable, private :: &
|
integer(kind(undefined_ID)),dimension(:,:), allocatable, private :: &
|
||||||
crystallite_outputID !< ID of each post result output
|
crystallite_outputID !< ID of each post result output
|
||||||
|
procedure(), pointer :: integrateState
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
crystallite_init, &
|
crystallite_init, &
|
||||||
|
@ -122,6 +123,7 @@ module crystallite
|
||||||
crystallite_push33ToRef, &
|
crystallite_push33ToRef, &
|
||||||
crystallite_postResults
|
crystallite_postResults
|
||||||
private :: &
|
private :: &
|
||||||
|
integrateState, &
|
||||||
crystallite_integrateStateFPI, &
|
crystallite_integrateStateFPI, &
|
||||||
crystallite_integrateStateEuler, &
|
crystallite_integrateStateEuler, &
|
||||||
crystallite_integrateStateAdaptiveEuler, &
|
crystallite_integrateStateAdaptiveEuler, &
|
||||||
|
@ -149,6 +151,7 @@ subroutine crystallite_init
|
||||||
debug_crystallite, &
|
debug_crystallite, &
|
||||||
debug_levelBasic
|
debug_levelBasic
|
||||||
use numerics, only: &
|
use numerics, only: &
|
||||||
|
numerics_integrator, &
|
||||||
worldrank, &
|
worldrank, &
|
||||||
usePingPong
|
usePingPong
|
||||||
use math, only: &
|
use math, only: &
|
||||||
|
@ -172,12 +175,13 @@ subroutine crystallite_init
|
||||||
IO_error
|
IO_error
|
||||||
use material
|
use material
|
||||||
use config, only: &
|
use config, only: &
|
||||||
|
config_deallocate, &
|
||||||
config_crystallite, &
|
config_crystallite, &
|
||||||
crystallite_name, &
|
crystallite_name, &
|
||||||
config_deallocate
|
material_Nphase
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_initialFi, &
|
constitutive_initialFi, &
|
||||||
constitutive_microstructure ! derived (shortcut) quantities of given state
|
constitutive_microstructure ! derived (shortcut) quantities of given state
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
|
@ -187,7 +191,8 @@ subroutine crystallite_init
|
||||||
i, & !< counter in integration point loop
|
i, & !< counter in integration point loop
|
||||||
e, & !< counter in element loop
|
e, & !< counter in element loop
|
||||||
o = 0_pInt, & !< counter in output loop
|
o = 0_pInt, & !< counter in output loop
|
||||||
r, & !< counter in crystallite loop
|
r, &
|
||||||
|
ph, & !< counter in crystallite loop
|
||||||
cMax, & !< maximum number of integration point components
|
cMax, & !< maximum number of integration point components
|
||||||
iMax, & !< maximum number of integration points
|
iMax, & !< maximum number of integration points
|
||||||
eMax, & !< maximum number of elements
|
eMax, & !< maximum number of elements
|
||||||
|
@ -269,6 +274,20 @@ subroutine crystallite_init
|
||||||
allocate(crystallite_sizePostResult(maxval(crystallite_Noutput), &
|
allocate(crystallite_sizePostResult(maxval(crystallite_Noutput), &
|
||||||
size(config_crystallite)), source=0_pInt)
|
size(config_crystallite)), source=0_pInt)
|
||||||
|
|
||||||
|
select case(numerics_integrator(1))
|
||||||
|
case(1_pInt)
|
||||||
|
integrateState => crystallite_integrateStateFPI
|
||||||
|
case(2_pInt)
|
||||||
|
integrateState => crystallite_integrateStateEuler
|
||||||
|
case(3_pInt)
|
||||||
|
integrateState => crystallite_integrateStateAdaptiveEuler
|
||||||
|
case(4_pInt)
|
||||||
|
integrateState => crystallite_integrateStateRK4
|
||||||
|
case(5_pInt)
|
||||||
|
integrateState => crystallite_integrateStateRKCK45
|
||||||
|
end select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
do c = 1_pInt, size(config_crystallite)
|
do c = 1_pInt, size(config_crystallite)
|
||||||
#if defined(__GFORTRAN__)
|
#if defined(__GFORTRAN__)
|
||||||
|
@ -421,6 +440,19 @@ subroutine crystallite_init
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! propagate dependent states to materialpoint and boundary value problem level
|
||||||
|
! do ph = 1_pInt,material_Nphase
|
||||||
|
! plasticState(ph)%partionedState0(plasticState(ph)%offsetDeltaState+plasticState(ph)%sizeDeltaState: &
|
||||||
|
! plasticState(ph)%sizeState,:) &
|
||||||
|
! = plasticState(ph)%state(plasticState(ph)%offsetDeltaState+plasticState(ph)%sizeDeltaState: &
|
||||||
|
! plasticState(ph)%sizeState,:)
|
||||||
|
! plasticState(ph)%state0 (plasticState(ph)%offsetDeltaState+plasticState(ph)%sizeDeltaState: &
|
||||||
|
! plasticState(ph)%sizeState,:) &
|
||||||
|
! = plasticState(ph)%state(plasticState(ph)%offsetDeltaState+plasticState(ph)%sizeDeltaState: &
|
||||||
|
! plasticState(ph)%sizeState,:)
|
||||||
|
! enddo
|
||||||
|
|
||||||
call crystallite_stressAndItsTangent(.true.) ! request elastic answers
|
call crystallite_stressAndItsTangent(.true.) ! request elastic answers
|
||||||
crystallite_fallbackdPdF = crystallite_dPdF ! use initial elastic stiffness as fallback
|
crystallite_fallbackdPdF = crystallite_dPdF ! use initial elastic stiffness as fallback
|
||||||
|
|
||||||
|
@ -494,8 +526,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
||||||
subStepMinCryst, &
|
subStepMinCryst, &
|
||||||
subStepSizeCryst, &
|
subStepSizeCryst, &
|
||||||
stepIncreaseCryst, &
|
stepIncreaseCryst, &
|
||||||
numerics_integrator, &
|
|
||||||
numerics_integrationMode, &
|
|
||||||
numerics_timeSyncing
|
numerics_timeSyncing
|
||||||
use debug, only: &
|
use debug, only: &
|
||||||
debug_level, &
|
debug_level, &
|
||||||
|
@ -614,6 +644,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
||||||
if (crystallite_requested(c,i,e)) then
|
if (crystallite_requested(c,i,e)) then
|
||||||
plasticState (phaseAt(c,i,e))%subState0( :,phasememberAt(c,i,e)) = &
|
plasticState (phaseAt(c,i,e))%subState0( :,phasememberAt(c,i,e)) = &
|
||||||
plasticState (phaseAt(c,i,e))%partionedState0(:,phasememberAt(c,i,e))
|
plasticState (phaseAt(c,i,e))%partionedState0(:,phasememberAt(c,i,e))
|
||||||
|
|
||||||
do mySource = 1_pInt, phase_Nsources(phaseAt(c,i,e))
|
do mySource = 1_pInt, phase_Nsources(phaseAt(c,i,e))
|
||||||
sourceState(phaseAt(c,i,e))%p(mySource)%subState0( :,phasememberAt(c,i,e)) = &
|
sourceState(phaseAt(c,i,e))%p(mySource)%subState0( :,phasememberAt(c,i,e)) = &
|
||||||
sourceState(phaseAt(c,i,e))%p(mySource)%partionedState0(:,phasememberAt(c,i,e))
|
sourceState(phaseAt(c,i,e))%p(mySource)%partionedState0(:,phasememberAt(c,i,e))
|
||||||
|
@ -647,7 +678,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
||||||
endif singleRun
|
endif singleRun
|
||||||
|
|
||||||
NiterationCrystallite = 0_pInt
|
NiterationCrystallite = 0_pInt
|
||||||
numerics_integrationMode = 1_pInt
|
|
||||||
cutbackLooping: do while (any(crystallite_todo(:,startIP:endIP,FEsolving_execELem(1):FEsolving_execElem(2))))
|
cutbackLooping: do while (any(crystallite_todo(:,startIP:endIP,FEsolving_execELem(1):FEsolving_execElem(2))))
|
||||||
|
|
||||||
if (iand(debug_level(debug_crystallite),debug_levelExtensive) /= 0_pInt) &
|
if (iand(debug_level(debug_crystallite),debug_levelExtensive) /= 0_pInt) &
|
||||||
|
@ -990,7 +1020,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
||||||
|
|
||||||
timeSyncing2: if(numerics_timeSyncing) then
|
timeSyncing2: if(numerics_timeSyncing) then
|
||||||
if (any(.not. crystallite_localPlasticity .and. .not. crystallite_todo .and. .not. crystallite_converged &
|
if (any(.not. crystallite_localPlasticity .and. .not. crystallite_todo .and. .not. crystallite_converged &
|
||||||
.and. crystallite_subStep <= subStepMinCryst)) then ! no way of rescuing a nonlocal ip that violated the lower time step limit, ...
|
.and. crystallite_subStep <= subStepMinCryst)) then ! no way of rescuing a nonlocal ip that violated the lower time step limit, ...
|
||||||
if (iand(debug_level(debug_crystallite),debug_levelExtensive) /= 0_pInt) then
|
if (iand(debug_level(debug_crystallite),debug_levelExtensive) /= 0_pInt) then
|
||||||
elementLooping4: do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
elementLooping4: do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
myNcomponents = homogenization_Ngrains(mesh_element(3,e))
|
myNcomponents = homogenization_Ngrains(mesh_element(3,e))
|
||||||
|
@ -1004,7 +1034,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
||||||
enddo elementLooping4
|
enddo elementLooping4
|
||||||
endif
|
endif
|
||||||
where(.not. crystallite_localPlasticity)
|
where(.not. crystallite_localPlasticity)
|
||||||
crystallite_todo = .false. ! ... so let all nonlocal ips die peacefully
|
crystallite_todo = .false. ! ... so let all nonlocal ips die peacefully
|
||||||
crystallite_subStep = 0.0_pReal
|
crystallite_subStep = 0.0_pReal
|
||||||
endwhere
|
endwhere
|
||||||
endif
|
endif
|
||||||
|
@ -1025,25 +1055,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
||||||
|
|
||||||
! --- integrate --- requires fully defined state array (basic + dependent state)
|
! --- integrate --- requires fully defined state array (basic + dependent state)
|
||||||
|
|
||||||
if (any(crystallite_todo)) then
|
if (any(crystallite_todo)) call integrateState()
|
||||||
if (iand(debug_level(debug_crystallite),debug_levelExtensive) /= 0_pInt) then
|
|
||||||
write(6,'(/,a,i3)') '<< CRYST >> using state integrator ',numerics_integrator(numerics_integrationMode)
|
|
||||||
flush(6)
|
|
||||||
endif
|
|
||||||
select case(numerics_integrator(numerics_integrationMode))
|
|
||||||
case(1_pInt)
|
|
||||||
call crystallite_integrateStateFPI()
|
|
||||||
case(2_pInt)
|
|
||||||
call crystallite_integrateStateEuler()
|
|
||||||
case(3_pInt)
|
|
||||||
call crystallite_integrateStateAdaptiveEuler()
|
|
||||||
case(4_pInt)
|
|
||||||
call crystallite_integrateStateRK4()
|
|
||||||
case(5_pInt)
|
|
||||||
call crystallite_integrateStateRKCK45()
|
|
||||||
end select
|
|
||||||
endif
|
|
||||||
|
|
||||||
where(.not. crystallite_converged .and. crystallite_subStep > subStepMinCryst) & ! do not try non-converged & fully cutbacked any further
|
where(.not. crystallite_converged .and. crystallite_subStep > subStepMinCryst) & ! do not try non-converged & fully cutbacked any further
|
||||||
crystallite_todo = .true.
|
crystallite_todo = .true.
|
||||||
|
|
||||||
|
@ -1056,9 +1068,9 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
||||||
|
|
||||||
elementLooping5: do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
elementLooping5: do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
myNcomponents = homogenization_Ngrains(mesh_element(3,e))
|
myNcomponents = homogenization_Ngrains(mesh_element(3,e))
|
||||||
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed
|
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed
|
||||||
do c = 1,myNcomponents
|
do c = 1,myNcomponents
|
||||||
if (.not. crystallite_converged(c,i,e)) then ! respond fully elastically (might be not required due to becoming terminally ill anyway)
|
if (.not. crystallite_converged(c,i,e)) then ! respond fully elastically (might be not required due to becoming terminally ill anyway)
|
||||||
if(iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) &
|
if(iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) &
|
||||||
write(6,'(a,i8,1x,a,i8,a,1x,i2,1x,i3,/)') '<< CRYST >> no convergence: respond fully elastic at el (elFE) ip ipc ', &
|
write(6,'(a,i8,1x,a,i8,a,1x,i2,1x,i3,/)') '<< CRYST >> no convergence: respond fully elastic at el (elFE) ip ipc ', &
|
||||||
e,'(',mesh_element(1,e),')',i,c
|
e,'(',mesh_element(1,e),')',i,c
|
||||||
|
@ -2013,8 +2025,7 @@ subroutine crystallite_integrateStateAdaptiveEuler()
|
||||||
debug_levelExtensive, &
|
debug_levelExtensive, &
|
||||||
debug_levelSelective
|
debug_levelSelective
|
||||||
use numerics, only: &
|
use numerics, only: &
|
||||||
rTol_crystalliteState, &
|
rTol_crystalliteState
|
||||||
numerics_integrationMode
|
|
||||||
use FEsolving, only: &
|
use FEsolving, only: &
|
||||||
FEsolving_execElem, &
|
FEsolving_execElem, &
|
||||||
FEsolving_execIP
|
FEsolving_execIP
|
||||||
|
@ -2082,7 +2093,6 @@ subroutine crystallite_integrateStateAdaptiveEuler()
|
||||||
sourceStateResiduum = 0.0_pReal
|
sourceStateResiduum = 0.0_pReal
|
||||||
relSourceStateResiduum = 0.0_pReal
|
relSourceStateResiduum = 0.0_pReal
|
||||||
|
|
||||||
integrationMode: if (numerics_integrationMode == 1_pInt) then
|
|
||||||
|
|
||||||
!$OMP PARALLEL
|
!$OMP PARALLEL
|
||||||
! --- DOT STATE (EULER INTEGRATION) ---
|
! --- DOT STATE (EULER INTEGRATION) ---
|
||||||
|
@ -2183,7 +2193,6 @@ subroutine crystallite_integrateStateAdaptiveEuler()
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
!$OMP ENDDO
|
!$OMP ENDDO
|
||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
endif integrationMode
|
|
||||||
|
|
||||||
|
|
||||||
! --- STRESS INTEGRATION (EULER INTEGRATION) ---
|
! --- STRESS INTEGRATION (EULER INTEGRATION) ---
|
||||||
|
@ -2203,9 +2212,6 @@ subroutine crystallite_integrateStateAdaptiveEuler()
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
|
|
||||||
if (numerics_integrationMode == 1_pInt) then
|
|
||||||
|
|
||||||
!$OMP PARALLEL
|
!$OMP PARALLEL
|
||||||
! --- DOT STATE (HEUN METHOD) ---
|
! --- DOT STATE (HEUN METHOD) ---
|
||||||
|
|
||||||
|
@ -2325,17 +2331,6 @@ subroutine crystallite_integrateStateAdaptiveEuler()
|
||||||
!$OMP ENDDO
|
!$OMP ENDDO
|
||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
elseif (numerics_integrationMode > 1) then ! stiffness calculation
|
|
||||||
|
|
||||||
!$OMP PARALLEL DO
|
|
||||||
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
|
|
||||||
crystallite_converged(g,i,e) = crystallite_todo(g,i,e) .or. crystallite_converged(g,i,e) ! ... converged per definitionem
|
|
||||||
enddo; enddo; enddo
|
|
||||||
!$OMP END PARALLEL DO
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
! --- NONLOCAL CONVERGENCE CHECK ---
|
! --- NONLOCAL CONVERGENCE CHECK ---
|
||||||
|
|
||||||
|
@ -2366,7 +2361,6 @@ subroutine crystallite_integrateStateEuler()
|
||||||
debug_levelExtensive, &
|
debug_levelExtensive, &
|
||||||
debug_levelSelective
|
debug_levelSelective
|
||||||
use numerics, only: &
|
use numerics, only: &
|
||||||
numerics_integrationMode, &
|
|
||||||
numerics_timeSyncing
|
numerics_timeSyncing
|
||||||
use FEsolving, only: &
|
use FEsolving, only: &
|
||||||
FEsolving_execElem, &
|
FEsolving_execElem, &
|
||||||
|
@ -2413,7 +2407,6 @@ eIter = FEsolving_execElem(1:2)
|
||||||
|
|
||||||
singleRun = (eIter(1) == eIter(2) .and. iIter(1,eIter(1)) == iIter(2,eIter(2)))
|
singleRun = (eIter(1) == eIter(2) .and. iIter(1,eIter(1)) == iIter(2,eIter(2)))
|
||||||
|
|
||||||
if (numerics_integrationMode == 1_pInt) then
|
|
||||||
!$OMP PARALLEL
|
!$OMP PARALLEL
|
||||||
|
|
||||||
! --- DOT STATE ---
|
! --- DOT STATE ---
|
||||||
|
@ -2519,7 +2512,6 @@ eIter = FEsolving_execElem(1:2)
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
!$OMP ENDDO
|
!$OMP ENDDO
|
||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
!$OMP PARALLEL
|
!$OMP PARALLEL
|
||||||
|
|
|
@ -102,13 +102,16 @@ subroutine debug_init
|
||||||
IO_EOF
|
IO_EOF
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 300_pInt
|
integer(pInt), parameter :: FILEUNIT = 330_pInt
|
||||||
|
|
||||||
integer(pInt) :: i, what
|
integer(pInt) :: i, what
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
integer(pInt), allocatable, dimension(:) :: chunkPos
|
||||||
character(len=65536) :: tag, line
|
character(len=65536) :: tag, line
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- debug init -+>>>'
|
write(6,'(/,a)') ' <<<+- debug init -+>>>'
|
||||||
|
#ifdef DEBUG
|
||||||
|
write(6,'(a)') achar(27)//'[31m <<<+- DEBUG version -+>>>'//achar(27)//'[0m'
|
||||||
|
#endif
|
||||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
|
|
||||||
|
|
|
@ -85,9 +85,9 @@ subroutine homogenization_init
|
||||||
use crystallite, only: &
|
use crystallite, only: &
|
||||||
crystallite_maxSizePostResults
|
crystallite_maxSizePostResults
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_deallocate, &
|
|
||||||
material_configFile, &
|
material_configFile, &
|
||||||
material_localFileExt, &
|
material_localFileExt, &
|
||||||
|
config_deallocate, &
|
||||||
config_homogenization, &
|
config_homogenization, &
|
||||||
homogenization_name
|
homogenization_name
|
||||||
use material
|
use material
|
||||||
|
|
|
@ -111,6 +111,9 @@ module lattice
|
||||||
-1,-1, 0, -1, 1,-1 & ! D6
|
-1,-1, 0, -1, 1,-1 & ! D6
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Nslip]) !< Slip system <110>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Nslip]) !< Slip system <110>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
||||||
|
|
||||||
|
character(len=*), dimension(1), parameter, public :: LATTICE_FCC_SLIPFAMILY_NAME = &
|
||||||
|
['<0 1 -1>{1 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_fcc_Ntwin), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_fcc_Ntwin), parameter, private :: &
|
||||||
LATTICE_fcc_systemTwin = reshape(real( [&
|
LATTICE_fcc_systemTwin = reshape(real( [&
|
||||||
-2, 1, 1, 1, 1, 1, &
|
-2, 1, 1, 1, 1, 1, &
|
||||||
|
@ -127,6 +130,9 @@ module lattice
|
||||||
-1, 1, 2, -1, 1,-1 &
|
-1, 1, 2, -1, 1,-1 &
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ntwin]) !< Twin system <112>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ntwin]) !< Twin system <112>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
||||||
|
|
||||||
|
character(len=*), dimension(1), parameter, public :: LATTICE_FCC_TWINFAMILY_NAME = &
|
||||||
|
['<-2 1 1>{1 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_fcc_Ntrans), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_fcc_Ntrans), parameter, private :: &
|
||||||
LATTICE_fccTohex_systemTrans = reshape(real( [&
|
LATTICE_fccTohex_systemTrans = reshape(real( [&
|
||||||
-2, 1, 1, 1, 1, 1, &
|
-2, 1, 1, 1, 1, 1, &
|
||||||
|
@ -433,6 +439,10 @@ module lattice
|
||||||
! 1,-1, 1, 3, 2,-1 &
|
! 1,-1, 1, 3, 2,-1 &
|
||||||
],pReal),[ 3_pInt + 3_pInt ,LATTICE_bcc_Nslip])
|
],pReal),[ 3_pInt + 3_pInt ,LATTICE_bcc_Nslip])
|
||||||
|
|
||||||
|
character(len=*), dimension(2), parameter, public :: LATTICE_BCC_SLIPFAMILY_NAME = &
|
||||||
|
['<1 -1 1>{0 1 1}', &
|
||||||
|
'<1 -1 1>{2 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_bcc_Ntwin), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_bcc_Ntwin), parameter, private :: &
|
||||||
LATTICE_bcc_systemTwin = reshape(real([&
|
LATTICE_bcc_systemTwin = reshape(real([&
|
||||||
! Twin system <111>{112}
|
! Twin system <111>{112}
|
||||||
|
@ -450,6 +460,9 @@ module lattice
|
||||||
1, 1, 1, 1, 1,-2 &
|
1, 1, 1, 1, 1,-2 &
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_bcc_Ntwin])
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_bcc_Ntwin])
|
||||||
|
|
||||||
|
character(len=*), dimension(1), parameter, public :: LATTICE_BCC_TWINFAMILY_NAME = &
|
||||||
|
['<1 1 1>{2 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(LATTICE_bcc_Ntwin), parameter, private :: &
|
real(pReal), dimension(LATTICE_bcc_Ntwin), parameter, private :: &
|
||||||
LATTICE_bcc_shearTwin = 0.5_pReal*sqrt(2.0_pReal)
|
LATTICE_bcc_shearTwin = 0.5_pReal*sqrt(2.0_pReal)
|
||||||
|
|
||||||
|
@ -618,6 +631,14 @@ module lattice
|
||||||
1, 1, -2, 3, -1, -1, 2, 2 &
|
1, 1, -2, 3, -1, -1, 2, 2 &
|
||||||
],pReal),[ 4_pInt + 4_pInt,LATTICE_hex_Nslip]) !< slip systems for hex sorted by A. Alankar & P. Eisenlohr
|
],pReal),[ 4_pInt + 4_pInt,LATTICE_hex_Nslip]) !< slip systems for hex sorted by A. Alankar & P. Eisenlohr
|
||||||
|
|
||||||
|
character(len=*), dimension(6), parameter, public :: LATTICE_HEX_SLIPFAMILY_NAME = &
|
||||||
|
['<1 1 . 1>{0 0 . 1} ', &
|
||||||
|
'<1 1 . 1>{1 0 . 0} ', &
|
||||||
|
'<1 0 . 0>{1 1 . 0} ', &
|
||||||
|
'<1 1 . 0>{-1 1 . 1} ', &
|
||||||
|
'<1 1 . 3>{-1 0 . 1} ', &
|
||||||
|
'<1 1 . 3>{-1 -1 . 2}']
|
||||||
|
|
||||||
real(pReal), dimension(4+4,LATTICE_hex_Ntwin), parameter, private :: &
|
real(pReal), dimension(4+4,LATTICE_hex_Ntwin), parameter, private :: &
|
||||||
LATTICE_hex_systemTwin = reshape(real([&
|
LATTICE_hex_systemTwin = reshape(real([&
|
||||||
! Compression or Tension =f(twinning shear=f(c/a)) for each metal ! (according to Yoo 1981)
|
! Compression or Tension =f(twinning shear=f(c/a)) for each metal ! (according to Yoo 1981)
|
||||||
|
@ -650,6 +671,12 @@ module lattice
|
||||||
1, 1, -2, -3, 1, 1, -2, 2 &
|
1, 1, -2, -3, 1, 1, -2, 2 &
|
||||||
],pReal),[ 4_pInt + 4_pInt ,LATTICE_hex_Ntwin]) !< twin systems for hex, order follows Prof. Tom Bieler's scheme; but numbering in data was restarted from 1
|
],pReal),[ 4_pInt + 4_pInt ,LATTICE_hex_Ntwin]) !< twin systems for hex, order follows Prof. Tom Bieler's scheme; but numbering in data was restarted from 1
|
||||||
|
|
||||||
|
character(len=*), dimension(4), parameter, public :: LATTICE_HEX_TWINFAMILY_NAME = &
|
||||||
|
['<-1 0 . 1>{1 0 . 2} ', &
|
||||||
|
'<1 1 . 6>{-1 -1 . 1}', &
|
||||||
|
'<1 0 . -2>{1 0 . 1} ', &
|
||||||
|
'<1 1 . -3>{1 1 . 2} ']
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_hex_Ntwin), parameter, private :: &
|
integer(pInt), dimension(LATTICE_hex_Ntwin), parameter, private :: &
|
||||||
LATTICE_hex_shearTwin = reshape(int( [& ! indicator to formula further below
|
LATTICE_hex_shearTwin = reshape(int( [& ! indicator to formula further below
|
||||||
1, & ! <-10.1>{10.2}
|
1, & ! <-10.1>{10.2}
|
||||||
|
@ -926,6 +953,21 @@ module lattice
|
||||||
1, 1, 1, 1,-2, 1 &
|
1, 1, 1, 1,-2, 1 &
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_bct_Nslip]) !< slip systems for bct sorted by Bieler
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_bct_Nslip]) !< slip systems for bct sorted by Bieler
|
||||||
|
|
||||||
|
character(len=*), dimension(13), parameter, public :: LATTICE_BCT_SLIPFAMILY_NAME = &
|
||||||
|
['{1 0 0)<0 0 1] ', &
|
||||||
|
'{1 1 0)<0 0 1] ', &
|
||||||
|
'{1 0 0)<0 1 0] ', &
|
||||||
|
'{1 1 0)<1 -1 1]', &
|
||||||
|
'{1 1 0)<1 -1 0]', &
|
||||||
|
'{1 0 0)<0 1 1] ', &
|
||||||
|
'{0 0 1)<0 1 0] ', &
|
||||||
|
'{0 0 1)<1 1 0] ', &
|
||||||
|
'{0 1 1)<0 1 -1]', &
|
||||||
|
'{0 1 1)<1 -1 1]', &
|
||||||
|
'{0 1 1)<1 0 0] ', &
|
||||||
|
'{2 1 1)<0 1 -1]', &
|
||||||
|
'{2 1 1)<-1 1 1]']
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: &
|
integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: &
|
||||||
LATTICE_bct_interactionSlipSlip = reshape(int( [&
|
LATTICE_bct_interactionSlipSlip = reshape(int( [&
|
||||||
1, 2, 3, 3, 7, 7, 13, 13, 13, 13, 21, 21, 31, 31, 31, 31, 43, 43, 57, 57, 73, 73, 73, 73, 91, 91, 91, 91, 91, 91, 91, 91, 111, 111, 111, 111, 133,133,133,133,133,133,133,133, 157,157,157,157,157,157,157,157, &
|
1, 2, 3, 3, 7, 7, 13, 13, 13, 13, 21, 21, 31, 31, 31, 31, 43, 43, 57, 57, 73, 73, 73, 73, 91, 91, 91, 91, 91, 91, 91, 91, 111, 111, 111, 111, 133,133,133,133,133,133,133,133, 157,157,157,157,157,157,157,157, &
|
||||||
|
|
|
@ -360,8 +360,7 @@ subroutine material_init()
|
||||||
homogenization_name, &
|
homogenization_name, &
|
||||||
microstructure_name, &
|
microstructure_name, &
|
||||||
phase_name, &
|
phase_name, &
|
||||||
texture_name, &
|
texture_name
|
||||||
config_deallocate
|
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_maxNips, &
|
mesh_maxNips, &
|
||||||
mesh_NcpElems, &
|
mesh_NcpElems, &
|
||||||
|
@ -370,7 +369,7 @@ subroutine material_init()
|
||||||
FE_geomtype
|
FE_geomtype
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
integer(pInt), parameter :: FILEUNIT = 210_pInt
|
||||||
integer(pInt) :: m,c,h, myDebug, myPhase, myHomog
|
integer(pInt) :: m,c,h, myDebug, myPhase, myHomog
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
g, & !< grain number
|
g, & !< grain number
|
||||||
|
@ -469,7 +468,6 @@ subroutine material_init()
|
||||||
endif debugOut
|
endif debugOut
|
||||||
|
|
||||||
call material_populateGrains
|
call material_populateGrains
|
||||||
call config_deallocate('material.config/microstructure')
|
|
||||||
|
|
||||||
allocate(phaseAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
allocate(phaseAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
||||||
allocate(phasememberAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
allocate(phasememberAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
||||||
|
@ -921,8 +919,8 @@ subroutine material_parseTexture
|
||||||
IO_floatValue, &
|
IO_floatValue, &
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_texture, &
|
config_deallocate, &
|
||||||
config_deallocate
|
config_texture
|
||||||
use math, only: &
|
use math, only: &
|
||||||
inRad, &
|
inRad, &
|
||||||
math_sampleRandomOri, &
|
math_sampleRandomOri, &
|
||||||
|
@ -1061,7 +1059,7 @@ subroutine material_parseTexture
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
call config_deallocate('material.config/texture')
|
call config_deallocate('material.config/texture')
|
||||||
|
|
||||||
end subroutine material_parseTexture
|
end subroutine material_parseTexture
|
||||||
|
|
||||||
|
@ -1093,6 +1091,7 @@ subroutine material_populateGrains
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_homogenization, &
|
config_homogenization, &
|
||||||
config_microstructure, &
|
config_microstructure, &
|
||||||
|
config_deallocate, &
|
||||||
homogenization_name, &
|
homogenization_name, &
|
||||||
microstructure_name
|
microstructure_name
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
|
@ -1429,6 +1428,7 @@ subroutine material_populateGrains
|
||||||
deallocate(texture_transformation)
|
deallocate(texture_transformation)
|
||||||
deallocate(Nelems)
|
deallocate(Nelems)
|
||||||
deallocate(elemsOfHomogMicro)
|
deallocate(elemsOfHomogMicro)
|
||||||
|
call config_deallocate('material.config/microstructure')
|
||||||
|
|
||||||
end subroutine material_populateGrains
|
end subroutine material_populateGrains
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@ module math
|
||||||
|
|
||||||
real(pReal), dimension(6), parameter, private :: &
|
real(pReal), dimension(6), parameter, private :: &
|
||||||
nrmMandel = [&
|
nrmMandel = [&
|
||||||
1.0_pReal, 1.0_pReal, 1.0_pReal,&
|
1.0_pReal, 1.0_pReal, 1.0_pReal, &
|
||||||
1.414213562373095_pReal, 1.414213562373095_pReal, 1.414213562373095_pReal ] !< weighting for Mandel notation (forward)
|
sqrt(2.0_pReal), sqrt(2.0_pReal), sqrt(2.0_pReal) ] !< weighting for Mandel notation (forward)
|
||||||
|
|
||||||
real(pReal), dimension(6), parameter , public :: &
|
real(pReal), dimension(6), parameter , public :: &
|
||||||
invnrmMandel = [&
|
invnrmMandel = [&
|
||||||
1.0_pReal, 1.0_pReal, 1.0_pReal,&
|
1.0_pReal, 1.0_pReal, 1.0_pReal, &
|
||||||
0.7071067811865476_pReal, 0.7071067811865476_pReal, 0.7071067811865476_pReal ] !< weighting for Mandel notation (backward)
|
1.0_pReal/sqrt(2.0_pReal), 1.0_pReal/sqrt(2.0_pReal), 1.0_pReal/sqrt(2.0_pReal) ] !< weighting for Mandel notation (backward)
|
||||||
|
|
||||||
integer(pInt), dimension (2,6), parameter, private :: &
|
integer(pInt), dimension (2,6), parameter, private :: &
|
||||||
mapVoigt = reshape([&
|
mapVoigt = reshape([&
|
||||||
|
|
|
@ -26,9 +26,8 @@ module numerics
|
||||||
worldsize = 0_pInt !< MPI worldsize (/=0 for MPI simulations only)
|
worldsize = 0_pInt !< MPI worldsize (/=0 for MPI simulations only)
|
||||||
integer(4), protected, public :: &
|
integer(4), protected, public :: &
|
||||||
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
|
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
|
||||||
integer(pInt), public :: &
|
!< ToDo: numerics_integrator is an array for historical reasons, only element 1 is used!
|
||||||
numerics_integrationMode = 0_pInt !< integrationMode 1 = central solution; integrationMode 2 = perturbation, Default 0: undefined, is not read from file
|
integer(pInt), dimension(2), protected, public :: &
|
||||||
integer(pInt), dimension(2) , protected, public :: &
|
|
||||||
numerics_integrator = 1_pInt !< method used for state integration (central & perturbed state), Default 1: fix-point iteration for both states
|
numerics_integrator = 1_pInt !< method used for state integration (central & perturbed state), Default 1: fix-point iteration for both states
|
||||||
real(pReal), protected, public :: &
|
real(pReal), protected, public :: &
|
||||||
relevantStrain = 1.0e-7_pReal, & !< strain increment considered significant (used by crystallite to determine whether strain inc is considered significant)
|
relevantStrain = 1.0e-7_pReal, & !< strain increment considered significant (used by crystallite to determine whether strain inc is considered significant)
|
||||||
|
@ -314,9 +313,7 @@ subroutine numerics_init
|
||||||
case ('atol_crystallitestress')
|
case ('atol_crystallitestress')
|
||||||
aTol_crystalliteStress = IO_floatValue(line,chunkPos,2_pInt)
|
aTol_crystalliteStress = IO_floatValue(line,chunkPos,2_pInt)
|
||||||
case ('integrator')
|
case ('integrator')
|
||||||
numerics_integrator(1) = IO_intValue(line,chunkPos,2_pInt)
|
numerics_integrator = IO_intValue(line,chunkPos,2_pInt)
|
||||||
case ('integratorstiffness')
|
|
||||||
numerics_integrator(2) = IO_intValue(line,chunkPos,2_pInt)
|
|
||||||
case ('usepingpong')
|
case ('usepingpong')
|
||||||
usepingpong = IO_intValue(line,chunkPos,2_pInt) > 0_pInt
|
usepingpong = IO_intValue(line,chunkPos,2_pInt) > 0_pInt
|
||||||
case ('timesyncing')
|
case ('timesyncing')
|
||||||
|
|
|
@ -2382,8 +2382,7 @@ use, intrinsic :: &
|
||||||
use prec, only: dNeq0, &
|
use prec, only: dNeq0, &
|
||||||
dNeq, &
|
dNeq, &
|
||||||
dEq0
|
dEq0
|
||||||
use numerics, only: numerics_integrationMode, &
|
use numerics, only: numerics_timeSyncing
|
||||||
numerics_timeSyncing
|
|
||||||
use IO, only: IO_error
|
use IO, only: IO_error
|
||||||
use debug, only: debug_level, &
|
use debug, only: debug_level, &
|
||||||
debug_constitutive, &
|
debug_constitutive, &
|
||||||
|
@ -2942,14 +2941,12 @@ rhoDot = rhoDotFlux &
|
||||||
+ rhoDotAthermalAnnihilation &
|
+ rhoDotAthermalAnnihilation &
|
||||||
+ rhoDotThermalAnnihilation
|
+ rhoDotThermalAnnihilation
|
||||||
|
|
||||||
if (numerics_integrationMode == 1_pInt) then ! save rates for output if in central integration mode
|
rhoDotFluxOutput(1:ns,1:8,1_pInt,ip,el) = rhoDotFlux(1:ns,1:8)
|
||||||
rhoDotFluxOutput(1:ns,1:8,1_pInt,ip,el) = rhoDotFlux(1:ns,1:8)
|
rhoDotMultiplicationOutput(1:ns,1:2,1_pInt,ip,el) = rhoDotMultiplication(1:ns,[1,3])
|
||||||
rhoDotMultiplicationOutput(1:ns,1:2,1_pInt,ip,el) = rhoDotMultiplication(1:ns,[1,3])
|
rhoDotSingle2DipoleGlideOutput(1:ns,1:2,1_pInt,ip,el) = rhoDotSingle2DipoleGlide(1:ns,9:10)
|
||||||
rhoDotSingle2DipoleGlideOutput(1:ns,1:2,1_pInt,ip,el) = rhoDotSingle2DipoleGlide(1:ns,9:10)
|
rhoDotAthermalAnnihilationOutput(1:ns,1:2,1_pInt,ip,el) = rhoDotAthermalAnnihilation(1:ns,9:10)
|
||||||
rhoDotAthermalAnnihilationOutput(1:ns,1:2,1_pInt,ip,el) = rhoDotAthermalAnnihilation(1:ns,9:10)
|
rhoDotThermalAnnihilationOutput(1:ns,1:2,1_pInt,ip,el) = rhoDotThermalAnnihilation(1:ns,9:10)
|
||||||
rhoDotThermalAnnihilationOutput(1:ns,1:2,1_pInt,ip,el) = rhoDotThermalAnnihilation(1:ns,9:10)
|
rhoDotEdgeJogsOutput(1:ns,1_pInt,ip,el) = 2.0_pReal * rhoDotThermalAnnihilation(1:ns,1)
|
||||||
rhoDotEdgeJogsOutput(1:ns,1_pInt,ip,el) = 2.0_pReal * rhoDotThermalAnnihilation(1:ns,1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
@ -241,29 +241,29 @@ subroutine plastic_phenopowerlaw_init
|
||||||
select case(outputs(i))
|
select case(outputs(i))
|
||||||
case ('resistance_slip')
|
case ('resistance_slip')
|
||||||
outputID = resistance_slip_ID
|
outputID = resistance_slip_ID
|
||||||
outputSize = sum(prm%Nslip)
|
outputSize = prm%totalNslip
|
||||||
case ('accumulatedshear_slip')
|
case ('accumulatedshear_slip')
|
||||||
outputID = accumulatedshear_slip_ID
|
outputID = accumulatedshear_slip_ID
|
||||||
outputSize = sum(prm%Nslip)
|
outputSize = prm%totalNslip
|
||||||
case ('shearrate_slip')
|
case ('shearrate_slip')
|
||||||
outputID = shearrate_slip_ID
|
outputID = shearrate_slip_ID
|
||||||
outputSize = sum(prm%Nslip)
|
outputSize = prm%totalNslip
|
||||||
case ('resolvedstress_slip')
|
case ('resolvedstress_slip')
|
||||||
outputID = resolvedstress_slip_ID
|
outputID = resolvedstress_slip_ID
|
||||||
outputSize = sum(prm%Nslip)
|
outputSize = prm%totalNslip
|
||||||
|
|
||||||
case ('resistance_twin')
|
case ('resistance_twin')
|
||||||
outputID = resistance_twin_ID
|
outputID = resistance_twin_ID
|
||||||
outputSize = sum(prm%Ntwin)
|
outputSize = prm%totalNtwin
|
||||||
case ('accumulatedshear_twin')
|
case ('accumulatedshear_twin')
|
||||||
outputID = accumulatedshear_twin_ID
|
outputID = accumulatedshear_twin_ID
|
||||||
outputSize = sum(prm%Ntwin)
|
outputSize = prm%totalNtwin
|
||||||
case ('shearrate_twin')
|
case ('shearrate_twin')
|
||||||
outputID = shearrate_twin_ID
|
outputID = shearrate_twin_ID
|
||||||
outputSize = sum(prm%Ntwin)
|
outputSize = prm%totalNtwin
|
||||||
case ('resolvedstress_twin')
|
case ('resolvedstress_twin')
|
||||||
outputID = resolvedstress_twin_ID
|
outputID = resolvedstress_twin_ID
|
||||||
outputSize = sum(prm%Ntwin)
|
outputSize = prm%totalNtwin
|
||||||
|
|
||||||
case ('totalvolfrac_twin')
|
case ('totalvolfrac_twin')
|
||||||
outputID = totalvolfrac_twin_ID
|
outputID = totalvolfrac_twin_ID
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
!> @brief setting precision for real and int type
|
!> @brief setting precision for real and int type
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module prec
|
module prec
|
||||||
|
! ToDo: use, intrinsic :: iso_fortran_env, only : I8 => int64, WP => real64
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
#if (FLOAT==8)
|
#if (FLOAT==8)
|
||||||
|
@ -23,6 +24,7 @@ module prec
|
||||||
NO SUITABLE PRECISION FOR INTEGER SELECTED, STOPPING COMPILATION
|
NO SUITABLE PRECISION FOR INTEGER SELECTED, STOPPING COMPILATION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
integer, parameter, public :: pStringLen = 256 !< default string lenth
|
||||||
integer, parameter, public :: pLongInt = 8 !< integer representation 64 bit (was selected_int_kind(12), number with at least up to +- 1e12)
|
integer, parameter, public :: pLongInt = 8 !< integer representation 64 bit (was selected_int_kind(12), number with at least up to +- 1e12)
|
||||||
real(pReal), parameter, public :: tol_math_check = 1.0e-8_pReal !< tolerance for internal math self-checks (rotation)
|
real(pReal), parameter, public :: tol_math_check = 1.0e-8_pReal !< tolerance for internal math self-checks (rotation)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue