Merge branch 'development' into PRIVATEasSubmodule

This commit is contained in:
Martin Diehl 2017-04-13 16:17:17 +02:00
commit f8ae4b8f20
26 changed files with 560 additions and 99 deletions

489
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,489 @@
stages:
- prepareAll
- preprocessing
- postprocessing
- compileSpectralIntel
- compileSpectralGNU
- prepareSpectral
- spectral
- compileMarc2014
- compileMarc2014.2
- compileMarc2015
- compileMarc2016
- marc
- compileAbaqus2016
- compileAbaqus2017
- example
- updateMaster
- createDocumentation
- clean
###################################################################################################
before_script:
- source $DAMASKROOT/DAMASK_env.sh
- module purge
- cd $DAMASKROOT/PRIVATE/testing
###################################################################################################
variables:
#================================================================================================
# GitLab Settings
#================================================================================================
GIT_SUBMODULE_STRATEGY: none
#================================================================================================
# Shortcut names
#================================================================================================
DAMASKROOT: "$HOME/GitlabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
#================================================================================================
# Names of module files to load
#================================================================================================
# ++++++++++++ Compiler ++++++++++++++++++++++++++++++++++++++++++++++
IntelCompiler16_0: "Compiler/Intel/16.0 Libraries/IMKL/2016"
IntelCompiler17_0: "Compiler/Intel/17.0 Libraries/IMKL/2017"
GNUCompiler5_3: "Compiler/GNU/5.3"
# ------------ Defaults ----------------------------------------------
IntelCompiler: "$IntelCompiler17_0"
GNUCompiler: "$GNUCompiler5_3"
# ++++++++++++ MPI +++++++++++++++++++++++++++++++++++++++++++++++++++
MPICH3_2Intel17_0: "MPI/Intel/17.0/MPICH/3.2"
MPICH3_2GNU5_3: "MPI/GNU/5.3/MPICH/3.2"
# ------------ Defaults ----------------------------------------------
MPICH_GNU: "$MPICH3_2GNU5_3"
MPICH_Intel: "$MPICH3_2Intel17_0"
# ++++++++++++ PETSc +++++++++++++++++++++++++++++++++++++++++++++++++
PETSc3_6_4MPICH3_2Intel17_0: "Libraries/PETSc/3.6.4/Intel-17.0-MPICH-3.2"
PETSc3_7_5MPICH3_2Intel17_0: "Libraries/PETSc/3.7.5/Intel-17.0-MPICH-3.2"
PETSc3_7_5MPICH3_2GNU5_3: "Libraries/PETSc/3.7.5/GNU-5.3-MPICH-3.2"
# ------------ Defaults ----------------------------------------------
PETSc_MPICH_Intel: "$PETSc3_7_5MPICH3_2Intel17_0"
PETSc_MPICH_GNU: "$PETSc3_7_5MPICH3_2GNU5_3"
# ++++++++++++ FEM +++++++++++++++++++++++++++++++++++++++++++++++++++
Abaqus2016: "FEM/Abaqus/2016"
Abaqus2017: "FEM/Abaqus/2017"
MSC2014: "FEM/MSC/2014"
MSC2014_2: "FEM/MSC/2014.2"
MSC2015: "FEM/MSC/2015"
MSC2016: "FEM/MSC/2016"
# ------------ Defaults ----------------------------------------------
Abaqus: "$Abaqus2017"
MSC: "$MSC2016"
# ++++++++++++ Documentation +++++++++++++++++++++++++++++++++++++++++
Doxygen1_8_13: "Documentation/Doxygen/1.8.13"
# ------------ Defaults ----------------------------------------------
Doxygen: "$Doxygen1_8_13"
###################################################################################################
checkout:
stage: prepareAll
before_script:
- $HOME/wait.sh
- echo $CI_PIPELINE_ID > $HOME/GitLabCI.lock
script:
- mkdir -p $DAMASKROOT
- git clone -q git@magit1.mpie.de:damask/DAMASK.git $DAMASKROOT
- cd $DAMASKROOT
- git checkout $CI_COMMIT_SHA
- git clone -q git@magit1.mpie.de:damask/PRIVATE.git
- source $DAMASKROOT/DAMASK_env.sh
- make install
except:
- master
- release
###################################################################################################
OrientationRelationship:
stage: preprocessing
script: OrientationRelationship/test.py
except:
- master
- release
Pre_SeedGeneration:
stage: preprocessing
script: PreProcessing_SeedGeneration/test.py
except:
- master
- release
Pre_GeomGeneration:
stage: preprocessing
script: PreProcessing_GeomGeneration/test.py
except:
- master
- release
Pre_GeomModification:
stage: preprocessing
script: PreProcessing_GeomModification/test.py
except:
- master
- release
Pre_General:
stage: preprocessing
script: PreProcessing/test.py
except:
- master
- release
Spectral_geometryPacking:
stage: preprocessing
script: Spectral_geometryPacking/test.py
except:
- master
- release
###################################################################################################
Post_General:
stage: postprocessing
script: PostProcessing/test.py
except:
- master
- release
Post_GeometryReconstruction:
stage: postprocessing
script: Spectral_geometryReconstruction/test.py
except:
- master
- release
Post_addCurl:
stage: postprocessing
script: addCurl/test.py
except:
- master
- release
Post_addDivergence:
stage: postprocessing
script: addDivergence/test.py
except:
- master
- release
Post_addGradient:
stage: postprocessing
script: addGradient/test.py
except:
- master
- release
Post_ParaviewRelated:
stage: postprocessing
script: ParaviewRelated/test.py
except:
- master
- release
###################################################################################################
Compile_Intel:
stage: compileSpectralIntel
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- SpectralAll_compileIfort/test.py
except:
- master
- release
###################################################################################################
Compile_GNU:
stage: compileSpectralGNU
script:
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
- SpectralAll_compileGfortran/test.py
except:
- master
- release
###################################################################################################
Compile_Intel_Prepare:
stage: prepareSpectral
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- make -C $DAMASKROOT clean spectral install tidy
except:
- master
- release
###################################################################################################
Spectral_PackedGeometry:
stage: spectral
script: Spectral_PackedGeometry/test.py
except:
- master
- release
Spectral_parsingArguments:
stage: spectral
script: Spectral_parsingArguments/test.py
except:
- master
- release
StateIntegration_compareVariants:
stage: spectral
script: StateIntegration_compareVariants/test.py
except:
- master
- release
nonlocal_densityConservation:
stage: spectral
script: nonlocal_densityConservation/test.py
except:
- master
- release
Spectral_ipNeighborhood:
stage: spectral
script: Spectral_ipNeighborhood/test.py
except:
- master
- release
Nonlocal_Damage_DetectChanges:
stage: spectral
script: Nonlocal_Damage_DetectChanges/test.py
except:
- master
- release
SpectralAll_restart:
stage: spectral
script: SpectralAll_restart/test.py
except:
- master
- release
SpectralAll_parsingLoadCase:
stage: spectral
script: SpectralAll_parsingLoadCase/test.py
except:
- master
- release
SpectralBasic_loadCaseRotation:
stage: spectral
script: SpectralBasic_loadCaseRotation/test.py
except:
- master
- release
Spectral_MPI:
stage: spectral
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- Spectral_MPI/test.py
except:
- master
- release
Plasticity_DetectChanges:
stage: spectral
script: Plasticity_DetectChanges/test.py
except:
- master
- release
Homogenization:
stage: spectral
script: Homogenization/test.py
except:
- master
- release
Phenopowerlaw_singleSlip:
stage: spectral
script: Phenopowerlaw_singleSlip/test.py
except:
- master
- release
HybridIA:
stage: spectral
script: HybridIA/test.py
except:
- master
- release
###################################################################################################
Marc_compileIfort2014:
stage: compileMarc2014
script:
- module load $IntelCompiler16_0 $MSC2014
- Marc_compileIfort/test.py -m 2014
except:
- master
- release
###################################################################################################
Marc_compileIfort2014.2:
stage: compileMarc2014.2
script:
- module load $IntelCompiler16_0 $MSC2014_2
- Marc_compileIfort/test.py -m 2014.2
except:
- master
- release
###################################################################################################
Marc_compileIfort2015:
stage: compileMarc2015
script:
- module load $IntelCompiler16_0 $MSC2015
- Marc_compileIfort/test.py -m 2015
except:
- master
- release
###################################################################################################
Marc_compileIfort2016:
stage: compileMarc2016
script:
- module load $IntelCompiler16_0 $MSC2016
- Marc_compileIfort/test.py -m 2016
except:
- master
- release
###################################################################################################
Hex_elastic:
stage: marc
script:
- module load $IntelCompiler16_0 $MSC
- Hex_elastic/test.py
except:
- master
- release
CubicFCC_elastic:
stage: marc
script:
- module load $IntelCompiler16_0 $MSC
- CubicFCC_elastic/test.py
except:
- master
- release
CubicBCC_elastic:
stage: marc
script:
- module load $IntelCompiler16_0 $MSC
- CubicBCC_elastic/test.py
except:
- master
- release
J2_plasticBehavior:
stage: marc
script:
- module load $IntelCompiler16_0 $MSC
- J2_plasticBehavior/test.py
except:
- master
- release
###################################################################################################
Abaqus_compile2016:
stage: compileAbaqus2016
script:
- module load $IntelCompiler16_0 $Abaqus2016
- Abaqus_compileIfort/test.py -a 2016
except:
- master
- release
###################################################################################################
Abaqus_compile2017:
stage: compileAbaqus2017
script:
- module load $IntelCompiler16_0 $Abaqus2017
- Abaqus_compileIfort/test.py -a 2017
except:
- master
- release
###################################################################################################
SpectralExample:
stage: example
script: SpectralAll_example/test.py
only:
- development
AbaqusExample:
stage: example
script:
- module load $IntelCompiler16_0 $Abaqus
- Abaqus_example/test.py
only:
- development
##################################################################################################
mergeIntoMaster:
stage: updateMaster
script:
- cd $DAMASKROOT
- export TESTEDREV=$(git describe) # might be detached from development branch
- echo $TESTEDREV > VERSION
- git commit VERSION -m "[skip ci] updated version information after successful test of $TESTEDREV"
- export UPDATEDREV=$(git describe) # tested state + 1 commit
- git checkout master
- git merge $UPDATEDREV
- git push origin master # master is now tested version and has updated VERSION file
- git checkout development
- git merge master -s ours # only possible conflict is in VERSION file
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
only:
- development
###################################################################################################
AbaqusExp:
stage: createDocumentation
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT abaqus_exp
except:
- master
- release
AbaqusStd:
stage: createDocumentation
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT abaqus_std
except:
- master
- release
Marc:
stage: createDocumentation
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT marc
except:
- master
- release
Spectral:
stage: createDocumentation
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT spectral
except:
- master
- release
###################################################################################################
removeLock:
stage: clean
before_script:
- echo 'Do nothing'
when: always
script: rm $HOME/GitLabCI.lock
except:
- master
- release

View File

@ -25,11 +25,11 @@ if [[ "x$DAMASK_BIN" != "x" && ! $(echo ":$PATH:" | grep $DAMASK_BIN:) ]]; then
export PATH=$DAMASK_BIN:$PATH export PATH=$DAMASK_BIN:$PATH
fi fi
SOLVER=$(which DAMASK_spectral 2>/dev/null) SOLVER=$(which DAMASK_spectral || true 2>/dev/null)
if [ "x$SOLVER" == "x" ]; then if [ "x$SOLVER" == "x" ]; then
SOLVER='Not found!' SOLVER='Not found!'
fi fi
PROCESSING=$(which postResults 2>/dev/null) PROCESSING=$(which postResults || true 2>/dev/null)
if [ "x$PROCESSING" == "x" ]; then if [ "x$PROCESSING" == "x" ]; then
PROCESSING='Not found!' PROCESSING='Not found!'
fi fi

View File

@ -19,8 +19,8 @@ if [[ ( "x$DAMASK_BIN" != "x" ) && ( "x$MATCH" = "x" ) ]]; then
export PATH=$DAMASK_BIN:$PATH export PATH=$DAMASK_BIN:$PATH
fi fi
SOLVER=`which DAMASK_spectral 2>/dev/null` SOLVER=`which DAMASK_spectral || True 2>/dev/null`
PROCESSING=`which postResults 2>/dev/null` PROCESSING=`which postResults || True 2>/dev/null`
if [ "x$DAMASK_NUM_THREADS" = "x" ]; then if [ "x$DAMASK_NUM_THREADS" = "x" ]; then
DAMASK_NUM_THREADS=1 DAMASK_NUM_THREADS=1
fi fi

View File

@ -1,4 +1,4 @@
Copyright 2011-16 Max-Planck-Institut für Eisenforschung GmbH Copyright 2011-17 Max-Planck-Institut für Eisenforschung GmbH
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -1 +1 @@
v2.0.1-393-gf010aa9 v2.0.1-414-g81d0752

View File

@ -1181,6 +1181,9 @@ end function math_Voigt66to3333
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief random quaternion !> @brief random quaternion
! http://math.stackexchange.com/questions/131336/uniform-random-quaternion-in-a-restricted-angle-range
! K. Shoemake. Uniform random rotations. In D. Kirk, editor, Graphics Gems III, pages 124-132.
! Academic, New York, 1992.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function math_qRand() function math_qRand()

View File

@ -694,9 +694,9 @@ subroutine numerics_init
.not. memory_efficient) call IO_error(error_ID = 847_pInt) .not. memory_efficient) call IO_error(error_ID = 847_pInt)
if (err_stress_tolrel <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_stress_tolRel') if (err_stress_tolrel <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_stress_tolRel')
if (err_stress_tolabs <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_stress_tolAbs') if (err_stress_tolabs <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_stress_tolAbs')
if (err_div_tolRel <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_div_tolRel') if (err_div_tolRel < 0.0_pReal) call IO_error(301_pInt,ext_msg='err_div_tolRel')
if (err_div_tolAbs <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_div_tolAbs') if (err_div_tolAbs <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_div_tolAbs')
if (err_curl_tolRel <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_curl_tolRel') if (err_curl_tolRel < 0.0_pReal) call IO_error(301_pInt,ext_msg='err_curl_tolRel')
if (err_curl_tolAbs <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_curl_tolAbs') if (err_curl_tolAbs <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_curl_tolAbs')
if (polarAlpha <= 0.0_pReal .or. & if (polarAlpha <= 0.0_pReal .or. &
polarAlpha > 2.0_pReal) call IO_error(301_pInt,ext_msg='polarAlpha') polarAlpha > 2.0_pReal) call IO_error(301_pInt,ext_msg='polarAlpha')

View File

@ -20,7 +20,6 @@ module DAMASK_interface
geometryFile = '', & !< parameter given for geometry file geometryFile = '', & !< parameter given for geometry file
loadCaseFile = '' !< parameter given for load case file loadCaseFile = '' !< parameter given for load case file
character(len=1024), private :: workingDirectory !< accessed by getSolverWorkingDirectoryName for compatibility reasons character(len=1024), private :: workingDirectory !< accessed by getSolverWorkingDirectoryName for compatibility reasons
character, private,parameter :: pathSep = '/'
public :: & public :: &
getSolverWorkingDirectoryName, & getSolverWorkingDirectoryName, &
@ -96,7 +95,11 @@ subroutine DAMASK_interface_init()
call quit(1_pInt) call quit(1_pInt)
endif endif
if (error_unit /= 0) then if (error_unit /= 0) then
write(output_unit,'(a)') ' STERR != 0' write(output_unit,'(a)') ' STDERR != 0'
call quit(1_pInt)
endif
if (PETSC_VERSION_MAJOR /= 3 .or. PETSC_VERSION_MINOR /= 7) then
write(6,'(a,2(i1.1,a))') 'PETSc ',PETSC_VERSION_MAJOR,'.',PETSC_VERSION_MINOR,'.x not supported'
call quit(1_pInt) call quit(1_pInt)
endif endif
else mainProcess else mainProcess
@ -168,7 +171,7 @@ subroutine DAMASK_interface_init()
write(6,'(a)') ' Help:' write(6,'(a)') ' Help:'
write(6,'(/,a)')' --help' write(6,'(/,a)')' --help'
write(6,'(a,/)')' Prints this message and exits' write(6,'(a,/)')' Prints this message and exits'
call quit(0_pInt) ! normal Termination call quit(0_pInt) ! normal Termination
case ('-l', '--load', '--loadcase') case ('-l', '--load', '--loadcase')
loadcaseArg = IIO_stringValue(commandLine,chunkPos,i+1_pInt) loadcaseArg = IIO_stringValue(commandLine,chunkPos,i+1_pInt)
case ('-g', '--geom', '--geometry') case ('-g', '--geom', '--geometry')
@ -194,7 +197,6 @@ subroutine DAMASK_interface_init()
error = getHostName(hostName) error = getHostName(hostName)
write(6,'(a,a)') ' Host name: ', trim(hostName) write(6,'(a,a)') ' Host name: ', trim(hostName)
write(6,'(a,a)') ' User name: ', trim(userName) write(6,'(a,a)') ' User name: ', trim(userName)
write(6,'(a,a)') ' Path separator: ', pathSep
write(6,'(a,a)') ' Command line call: ', trim(commandLine) write(6,'(a,a)') ' Command line call: ', trim(commandLine)
if (len(trim(workingDirArg))>0) & if (len(trim(workingDirArg))>0) &
write(6,'(a,a)') ' Working dir argument: ', trim(workingDirArg) write(6,'(a,a)') ' Working dir argument: ', trim(workingDirArg)
@ -229,22 +231,22 @@ character(len=1024) function storeWorkingDirectory(workingDirectoryArg,geometryA
external :: quit external :: quit
wdGiven: if (len(workingDirectoryArg)>0) then wdGiven: if (len(workingDirectoryArg)>0) then
absolutePath: if (workingDirectoryArg(1:1) == pathSep) then absolutePath: if (workingDirectoryArg(1:1) == '/') then
storeWorkingDirectory = workingDirectoryArg storeWorkingDirectory = workingDirectoryArg
else absolutePath else absolutePath
error = getCWD(cwd) error = getCWD(cwd)
if (error) call quit(1_pInt) if (error) call quit(1_pInt)
storeWorkingDirectory = trim(cwd)//pathSep//workingDirectoryArg storeWorkingDirectory = trim(cwd)//'/'//workingDirectoryArg
endif absolutePath endif absolutePath
if (storeWorkingDirectory(len(trim(storeWorkingDirectory)):len(trim(storeWorkingDirectory))) /= pathSep) & if (storeWorkingDirectory(len(trim(storeWorkingDirectory)):len(trim(storeWorkingDirectory))) /= '/') &
storeWorkingDirectory = trim(storeWorkingDirectory)//pathSep ! if path seperator is not given, append it storeWorkingDirectory = trim(storeWorkingDirectory)//'/' ! if path seperator is not given, append it
else wdGiven else wdGiven
if (geometryArg(1:1) == pathSep) then ! absolute path given as command line argument if (geometryArg(1:1) == '/') then ! absolute path given as command line argument
storeWorkingDirectory = geometryArg(1:scan(geometryArg,pathSep,back=.true.)) storeWorkingDirectory = geometryArg(1:scan(geometryArg,'/',back=.true.))
else else
error = getCWD(cwd) ! relative path given as command line argument error = getCWD(cwd) ! relative path given as command line argument
if (error) call quit(1_pInt) if (error) call quit(1_pInt)
storeWorkingDirectory = trim(cwd)//pathSep//geometryArg(1:scan(geometryArg,pathSep,back=.true.)) storeWorkingDirectory = trim(cwd)//'/'//geometryArg(1:scan(geometryArg,'/',back=.true.))
endif endif
endif wdGiven endif wdGiven
@ -281,13 +283,13 @@ character(len=1024) function getSolverJobName()
tempString = geometryFile tempString = geometryFile
posExt = scan(tempString,'.',back=.true.) posExt = scan(tempString,'.',back=.true.)
posSep = scan(tempString,pathSep,back=.true.) posSep = scan(tempString,'/',back=.true.)
getSolverJobName = tempString(posSep+1:posExt-1) getSolverJobName = tempString(posSep+1:posExt-1)
tempString = loadCaseFile tempString = loadCaseFile
posExt = scan(tempString,'.',back=.true.) posExt = scan(tempString,'.',back=.true.)
posSep = scan(tempString,pathSep,back=.true.) posSep = scan(tempString,'/',back=.true.)
getSolverJobName = trim(getSolverJobName)//'_'//tempString(posSep+1:posExt-1) getSolverJobName = trim(getSolverJobName)//'_'//tempString(posSep+1:posExt-1)
@ -312,13 +314,13 @@ character(len=1024) function getGeometryFile(geometryParameter)
getGeometryFile = geometryParameter getGeometryFile = geometryParameter
posExt = scan(getGeometryFile,'.',back=.true.) posExt = scan(getGeometryFile,'.',back=.true.)
posSep = scan(getGeometryFile,pathSep,back=.true.) posSep = scan(getGeometryFile,'/',back=.true.)
if (posExt <= posSep) getGeometryFile = trim(getGeometryFile)//('.geom') ! no extension present if (posExt <= posSep) getGeometryFile = trim(getGeometryFile)//('.geom') ! no extension present
if (scan(getGeometryFile,pathSep) /= 1) then ! relative path given as command line argument if (scan(getGeometryFile,'/') /= 1) then ! relative path given as command line argument
error = getcwd(cwd) error = getcwd(cwd)
if (error) call quit(1_pInt) if (error) call quit(1_pInt)
getGeometryFile = rectifyPath(trim(cwd)//pathSep//getGeometryFile) getGeometryFile = rectifyPath(trim(cwd)//'/'//getGeometryFile)
else else
getGeometryFile = rectifyPath(getGeometryFile) getGeometryFile = rectifyPath(getGeometryFile)
endif endif
@ -346,13 +348,13 @@ character(len=1024) function getLoadCaseFile(loadCaseParameter)
getLoadCaseFile = loadcaseParameter getLoadCaseFile = loadcaseParameter
posExt = scan(getLoadCaseFile,'.',back=.true.) posExt = scan(getLoadCaseFile,'.',back=.true.)
posSep = scan(getLoadCaseFile,pathSep,back=.true.) posSep = scan(getLoadCaseFile,'/',back=.true.)
if (posExt <= posSep) getLoadCaseFile = trim(getLoadCaseFile)//('.load') ! no extension present if (posExt <= posSep) getLoadCaseFile = trim(getLoadCaseFile)//('.load') ! no extension present
if (scan(getLoadCaseFile,pathSep) /= 1) then ! relative path given as command line argument if (scan(getLoadCaseFile,'/') /= 1) then ! relative path given as command line argument
error = getcwd(cwd) error = getcwd(cwd)
if (error) call quit(1_pInt) if (error) call quit(1_pInt)
getLoadCaseFile = rectifyPath(trim(cwd)//pathSep//getLoadCaseFile) getLoadCaseFile = rectifyPath(trim(cwd)//'/'//getLoadCaseFile)
else else
getLoadCaseFile = rectifyPath(getLoadCaseFile) getLoadCaseFile = rectifyPath(getLoadCaseFile)
endif endif
@ -377,26 +379,26 @@ function rectifyPath(path)
l = len_trim(path) l = len_trim(path)
rectifyPath = path rectifyPath = path
do i = l,3,-1 do i = l,3,-1
if (rectifyPath(i-2:i) == pathSep//'.'//pathSep) & if (rectifyPath(i-2:i) == '/'//'.'//'/') &
rectifyPath(i-1:l) = rectifyPath(i+1:l)//' ' rectifyPath(i-1:l) = rectifyPath(i+1:l)//' '
enddo enddo
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! remove ../ and corresponding directory from rectifyPath ! remove ../ and corresponding directory from rectifyPath
l = len_trim(rectifyPath) l = len_trim(rectifyPath)
i = index(rectifyPath(i:l),'..'//pathSep) i = index(rectifyPath(i:l),'..'//'/')
j = 0 j = 0
do while (i > j) do while (i > j)
j = scan(rectifyPath(1:i-2),pathSep,back=.true.) j = scan(rectifyPath(1:i-2),'/',back=.true.)
rectifyPath(j+1:l) = rectifyPath(i+3:l)//repeat(' ',2+i-j) rectifyPath(j+1:l) = rectifyPath(i+3:l)//repeat(' ',2+i-j)
if (rectifyPath(j+1:j+1) == pathSep) then !search for '//' that appear in case of XXX/../../XXX if (rectifyPath(j+1:j+1) == '/') then !search for '//' that appear in case of XXX/../../XXX
k = len_trim(rectifyPath) k = len_trim(rectifyPath)
rectifyPath(j+1:k-1) = rectifyPath(j+2:k) rectifyPath(j+1:k-1) = rectifyPath(j+2:k)
rectifyPath(k:k) = ' ' rectifyPath(k:k) = ' '
endif endif
i = j+index(rectifyPath(j+1:l),'..'//pathSep) i = j+index(rectifyPath(j+1:l),'..'//'/')
enddo enddo
if(len_trim(rectifyPath) == 0) rectifyPath = pathSep if(len_trim(rectifyPath) == 0) rectifyPath = '/'
end function rectifyPath end function rectifyPath
@ -415,12 +417,12 @@ character(len=1024) function makeRelativePath(a,b)
do i = 1, min(1024,len_trim(a),len_trim(b)) do i = 1, min(1024,len_trim(a),len_trim(b))
if (a(i:i) /= b(i:i)) exit if (a(i:i) /= b(i:i)) exit
if (a(i:i) == pathSep) posLastCommonSlash = i if (a(i:i) == '/') posLastCommonSlash = i
enddo enddo
do i = posLastCommonSlash+1,len_trim(a) do i = posLastCommonSlash+1,len_trim(a)
if (a(i:i) == pathSep) remainingSlashes = remainingSlashes + 1 if (a(i:i) == '/') remainingSlashes = remainingSlashes + 1
enddo enddo
makeRelativePath = repeat('..'//pathSep,remainingSlashes)//b(posLastCommonSlash+1:len_trim(b)) makeRelativePath = repeat('..'//'/',remainingSlashes)//b(posLastCommonSlash+1:len_trim(b))
end function makeRelativePath end function makeRelativePath

View File

@ -50,7 +50,7 @@ interactionSlipSlip 0.122 0.122 0.625 0.07 0.137 0.122 # Interaction coefficient
### Shearband parameters ### ### Shearband parameters ###
shearbandresistance 180e6 shearbandresistance 180e6
shearbandvelocity 1e-4 # set to zero to turn shear banding of shearbandvelocity 0e-4 # set to zero to turn shear banding of
QedgePerSbSystem 3.7e-19 # Activation energy for shear banding [J] QedgePerSbSystem 3.7e-19 # Activation energy for shear banding [J]
p_shearband 1.0 # p-exponent in glide velocity p_shearband 1.0 # p-exponent in glide velocity
q_shearband 1.0 # q-exponent in glide velocity q_shearband 1.0 # q-exponent in glide velocity

View File

@ -18,8 +18,5 @@ tau0_slip 95.e6 97.e6 # per family, optimization long
tausat_slip 222.e6 412.7e6 # per family, optimization long simplex 109 tausat_slip 222.e6 412.7e6 # per family, optimization long simplex 109
h0_slipslip 1000.0e6 h0_slipslip 1000.0e6
interaction_slipslip 1 1 1.4 1.4 1.4 1.4 interaction_slipslip 1 1 1.4 1.4 1.4 1.4
interaction_sliptwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twinslip 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twintwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
w0_slip 2.0 w0_slip 2.0
(output) totalshear (output) totalshear

View File

@ -18,8 +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
interaction_sliptwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twinslip 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twintwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
w0_slip 2.0 w0_slip 2.0
(output) totalshear (output) totalshear

View File

@ -35,18 +35,7 @@ tausat_slip 53.00e6 # per family
a_slip 1.0 a_slip 1.0
gdot0_twin 0.001 gdot0_twin 0.001
n_twin 20 n_twin 20
tau0_twin 0 # per family
s_pr 0 # push-up factor for slip saturation due to twinning
twin_b 0
twin_c 0
twin_d 0
twin_e 0
h0_slipslip 75e6 h0_slipslip 75e6
h0_twinslip 0
h0_twintwin 0
interaction_slipslip 1 1 1.4 1.4 1.4 1.4 interaction_slipslip 1 1 1.4 1.4 1.4 1.4
interaction_sliptwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twinslip 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twintwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
atol_resistance 1 atol_resistance 1

View File

@ -29,18 +29,8 @@ a_slip 2.25
gdot0_twin 0.001 gdot0_twin 0.001
n_twin 20 n_twin 20
tau0_twin 31e6 # per family tau0_twin 31e6 # per family
s_pr 0 # push-up factor for slip saturation due to twinning
twin_b 0
twin_c 0
twin_d 0
twin_e 0
h0_slipslip 75e6 h0_slipslip 75e6
h0_twinslip 0
h0_twintwin 0
interaction_slipslip 1 1 1.4 1.4 1.4 1.4 interaction_slipslip 1 1 1.4 1.4 1.4 1.4
interaction_sliptwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twinslip 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twintwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
atol_resistance 1 atol_resistance 1
(stiffness_degradation) damage (stiffness_degradation) damage

View File

@ -52,22 +52,8 @@ n_slip 20
tau0_slip 31e6 # per family tau0_slip 31e6 # per family
tausat_slip 63e6 # per family tausat_slip 63e6 # per family
a_slip 2.25 a_slip 2.25
gdot0_twin 0.001
n_twin 20
tau0_twin 31e6 # per family
s_pr 0 # push-up factor for slip saturation due to twinning
twin_b 0
twin_c 0
twin_d 0
twin_e 0
h0_slipslip 75e6 h0_slipslip 75e6
h0_sliptwin 0
h0_twinslip 0
h0_twintwin 0
interaction_slipslip 1 1 1.4 1.4 1.4 1.4 interaction_slipslip 1 1 1.4 1.4 1.4 1.4
interaction_sliptwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twinslip 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twintwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
atol_resistance 1 atol_resistance 1

View File

@ -31,7 +31,7 @@ fortCmd = "ifort"
# -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt # -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt
compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " +
"-I%I -I../lib -free -O1 -fpp -openmp " + "-I%I -free -O1 -fpp -openmp " +
"-ftz -diag-disable 5268 " + "-ftz -diag-disable 5268 " +
"-implicitnone -assume byterecl -stand f08 -standard-semantics " + "-implicitnone -assume byterecl -stand f08 -standard-semantics " +
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4 " + "-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4 " +

View File

@ -31,7 +31,7 @@ fortCmd = "ifort"
# -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt # -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt
compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " +
"-I%I -I../lib -free -O1 -fpp " + "-I%I -free -O1 -fpp " +
"-ftz -diag-disable 5268 " + "-ftz -diag-disable 5268 " +
"-implicitnone -assume byterecl -stand f08 -standard-semantics " + "-implicitnone -assume byterecl -stand f08 -standard-semantics " +
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4 " + "-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4 " +

View File

@ -33,7 +33,7 @@ class Environment():
'explicit':5} 'explicit':5}
if Nneeded == -1: Nneeded = licensesNeeded[software] if Nneeded == -1: Nneeded = licensesNeeded[software]
try: try:
cmd = """ ssh mulicense2 "/Stat_Flexlm | grep 'Users of %s: ' | cut -d' ' -f7,13" """%software cmd = """ ssh mulicense2 "/lm-status | grep 'Users of %s: ' | cut -d' ' -f7,13" """%software
process = subprocess.Popen(shlex.split(cmd),stdout = subprocess.PIPE,stderr = subprocess.PIPE) process = subprocess.Popen(shlex.split(cmd),stdout = subprocess.PIPE,stderr = subprocess.PIPE)
licenses = list(map(int, process.stdout.readline().split())) licenses = list(map(int, process.stdout.readline().split()))
try: try:

View File

@ -851,7 +851,7 @@ for opt in ['nodalScalar','elemScalar','elemTensor','homogenizationResult','crys
if options.info: if options.info:
if options.filetype == 'marc': if options.filetype == 'marc':
print('\n\nMentat release {}'.format(damask.solver.Marc().version('../../'))) print('\n\nMentat release {}'.format(damask.solver.Marc().version()))
if options.filetype == 'spectral': if options.filetype == 'spectral':
print('\n\n{}'.format(p)) print('\n\n{}'.format(p))

View File

@ -48,29 +48,32 @@ parser.add_option( '--degrees', dest='degrees', action='store_true',
help = 'angle is given in degrees [%default]') help = 'angle is given in degrees [%default]')
parser.add_option( '--nonperiodic', dest='periodic', action='store_false', parser.add_option( '--nonperiodic', dest='periodic', action='store_false',
help = 'wrap around edges [%default]') help = 'wrap around edges [%default]')
parser.add_option( '--voxelspace', dest='voxelspace', action='store_true',
parser.set_defaults(center = [0,0,0], help = '-c and -d are given in (0 to grid) coordinates instead of (origin to origin+size) \
coordinates [%default]')
parser.set_defaults(center = (.0,.0,.0),
fill = 0, fill = 0,
quaternion = [],
angleaxis = [],
degrees = False, degrees = False,
exponent = [1e10,1e10,1e10], # box shape by default exponent = (1e10,1e10,1e10), # box shape by default
periodic = True periodic = True,
voxelspace = False
) )
(options, filenames) = parser.parse_args() (options, filenames) = parser.parse_args()
if options.dimension is None:
if options.angleaxis != []: parser.error('no dimension specified.')
if options.angleaxis is not None:
options.angleaxis = map(float,options.angleaxis) options.angleaxis = map(float,options.angleaxis)
rotation = damask.Quaternion().fromAngleAxis(np.radians(options.angleaxis[0]) if options.degrees else options.angleaxis[0], rotation = damask.Quaternion().fromAngleAxis(np.radians(options.angleaxis[0]) if options.degrees else options.angleaxis[0],
options.angleaxis[1:4]) options.angleaxis[1:4])
elif options.quaternion != []: elif options.quaternion is not None:
options.quaternion = map(float,options.quaternion) options.quaternion = map(float,options.quaternion)
rotation = damask.Quaternion(options.quaternion) rotation = damask.Quaternion(options.quaternion)
else: else:
rotation = damask.Quaternion() rotation = damask.Quaternion()
options.center = np.array(options.center) options.center = np.array(options.center)
options.dimension = np.array(options.dimension)
# --- loop over input files ------------------------------------------------------------------------- # --- loop over input files -------------------------------------------------------------------------
if filenames == []: filenames = [None] if filenames == []: filenames = [None]
@ -117,9 +120,14 @@ for name in filenames:
# If we have a negative dimension, make it an ellipsoid for backwards compatibility # If we have a negative dimension, make it an ellipsoid for backwards compatibility
options.exponent = np.where(np.array(options.dimension) > 0, options.exponent, 2) options.exponent = np.where(np.array(options.dimension) > 0, options.exponent, 2)
microstructure = microstructure.reshape(info['grid'],order='F') microstructure = microstructure.reshape(info['grid'],order='F')
# coordinates given in real space (default) vs voxel space
if not options.voxelspace:
options.center += info['origin']
options.center *= np.array(info['grid']) / np.array(info['size'])
options.dimension *= np.array(info['grid']) / np.array(info['size'])
size = microstructure.shape size = microstructure.shape
# change to coordinate space where the primitive is the unit sphere/cube/etc # change to coordinate space where the primitive is the unit sphere/cube/etc