Merge branch 'noAbaqus' into 'development'
No abaqus See merge request damask/DAMASK!126
This commit is contained in:
commit
6af29d4a4c
|
@ -75,7 +75,6 @@ variables:
|
||||||
# ------------ Defaults ----------------------------------------------
|
# ------------ Defaults ----------------------------------------------
|
||||||
MSC: "$MSC2019"
|
MSC: "$MSC2019"
|
||||||
IntelMarc: "$IntelCompiler17_8"
|
IntelMarc: "$IntelCompiler17_8"
|
||||||
IntelAbaqus: "$IntelCompiler16_4"
|
|
||||||
HDF5Marc: "HDF5/1.10.5/Intel-17.8"
|
HDF5Marc: "HDF5/1.10.5/Intel-17.8"
|
||||||
# ++++++++++++ Documentation ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++ Documentation ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
Doxygen1_8_15: "Documentation/Doxygen/1.8.15"
|
Doxygen1_8_15: "Documentation/Doxygen/1.8.15"
|
||||||
|
@ -476,15 +475,6 @@ createTar:
|
||||||
- release
|
- release
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
AbaqusStd:
|
|
||||||
stage: createDocumentation
|
|
||||||
script:
|
|
||||||
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
|
|
||||||
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT abaqus
|
|
||||||
except:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
|
|
||||||
Marc:
|
Marc:
|
||||||
stage: createDocumentation
|
stage: createDocumentation
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -122,9 +122,3 @@ done
|
||||||
firstLevel "CMake"
|
firstLevel "CMake"
|
||||||
getDetails cmake --version
|
getDetails cmake --version
|
||||||
|
|
||||||
firstLevel "Abaqus"
|
|
||||||
cd installation/mods_Abaqus # to have the right environment file
|
|
||||||
for executable in abaqus abq2017 abq2018 abq2019; do
|
|
||||||
getDetails $executable 'information=all'
|
|
||||||
done
|
|
||||||
cd ../..
|
|
||||||
|
|
|
@ -3,5 +3,3 @@ set DAMASK_NUM_THREADS = 4
|
||||||
|
|
||||||
set MSC_ROOT = /opt/msc
|
set MSC_ROOT = /opt/msc
|
||||||
set MARC_VERSION = 2019
|
set MARC_VERSION = 2019
|
||||||
|
|
||||||
set ABAQUS_VERSION = 2019
|
|
||||||
|
|
|
@ -51,5 +51,4 @@ else
|
||||||
setenv PYTHONPATH $DAMASK_ROOT/python:$PYTHONPATH
|
setenv PYTHONPATH $DAMASK_ROOT/python:$PYTHONPATH
|
||||||
endif
|
endif
|
||||||
setenv MSC_ROOT
|
setenv MSC_ROOT
|
||||||
setenv ABAQUS_VERSION
|
|
||||||
setenv MARC_VERSION
|
setenv MARC_VERSION
|
||||||
|
|
|
@ -17,7 +17,6 @@ homogenization # homogenization_*.f90 possible values: ba
|
||||||
CPFEM # CPFEM.f90 possible values: basic, extensive, selective
|
CPFEM # CPFEM.f90 possible values: basic, extensive, selective
|
||||||
spectral # DAMASK_spectral.f90 possible values: basic, fft, restart, divergence, rotation, petsc
|
spectral # DAMASK_spectral.f90 possible values: basic, fft, restart, divergence, rotation, petsc
|
||||||
marc # MSC.MARC FEM solver possible values: basic
|
marc # MSC.MARC FEM solver possible values: basic
|
||||||
abaqus # ABAQUS FEM solver possible values: basic
|
|
||||||
#
|
#
|
||||||
# Parameters for selective
|
# Parameters for selective
|
||||||
element 1 # selected element for debugging (synonymous: "el", "e")
|
element 1 # selected element for debugging (synonymous: "el", "e")
|
||||||
|
|
|
@ -9,7 +9,7 @@ pert_method 1 # perturbation method (1 = forward, 2 = b
|
||||||
integrator 1 # integration method (1 = Fixed Point Iteration, 2 = Euler, 3 = Adaptive Euler, 4 = classical 4th order Runge-Kutta, 5 = 5th order Runge-Kutta Cash-Karp)
|
integrator 1 # integration method (1 = Fixed Point Iteration, 2 = Euler, 3 = Adaptive Euler, 4 = classical 4th order Runge-Kutta, 5 = 5th order Runge-Kutta Cash-Karp)
|
||||||
integratorStiffness 1 # integration method used for stiffness (1 = Fixed Point Iteration, 2 = Euler, 3 = Adaptive Euler, 4 = classical 4th order Runge-Kutta, 5 = 5th order Runge-Kutta Cash-Karp)
|
integratorStiffness 1 # integration method used for stiffness (1 = Fixed Point Iteration, 2 = Euler, 3 = Adaptive Euler, 4 = classical 4th order Runge-Kutta, 5 = 5th order Runge-Kutta Cash-Karp)
|
||||||
unitlength 1 # physical length of one computational length unit
|
unitlength 1 # physical length of one computational length unit
|
||||||
usepingpong 1 # use the ping pong (collect <-> calc) scheme (always off for Abaqus exp, must be on for Spectral Solver)
|
usepingpong 1 # use the ping pong (collect <-> calc) scheme
|
||||||
|
|
||||||
## crystallite numerical parameters ##
|
## crystallite numerical parameters ##
|
||||||
nCryst 20 # crystallite loop limit (only for debugging info, loop limit is determined by "subStepMinCryst")
|
nCryst 20 # crystallite loop limit (only for debugging info, loop limit is determined by "subStepMinCryst")
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
#
|
|
||||||
# DAMASK Abaqus Environment File
|
|
||||||
#
|
|
||||||
# ------------------------------------
|
|
||||||
# originally taken from Abaqus ver. 6.11.1
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Linux (Opteron/EM64T) Settings:
|
|
||||||
#
|
|
||||||
# Compile and Link command for user subroutines.
|
|
||||||
# Compile_cpp and link_exe for Abaqus make utility.
|
|
||||||
#
|
|
||||||
import os, re, glob, driverUtils
|
|
||||||
|
|
||||||
if False:
|
|
||||||
# use hdf5 compiler wrapper in $PATH
|
|
||||||
fortCmd = os.popen('h5fc -shlib -show').read().replace('\n','') # complicated way needed to pass in DAMASKVERSION string
|
|
||||||
link_sl += fortCmd.split()[1:]
|
|
||||||
fortCmd +=" -DDAMASK_HDF5"
|
|
||||||
else:
|
|
||||||
# Use the version in $PATH
|
|
||||||
fortCmd = "ifort"
|
|
||||||
|
|
||||||
# -free to use free-format FORTRAN 90 syntax
|
|
||||||
# -O <0-3> optimization level
|
|
||||||
# -fpp use FORTRAN preprocessor on source code
|
|
||||||
# -fopenmp build with openMP support
|
|
||||||
# -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only)
|
|
||||||
# -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only)
|
|
||||||
# -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only)
|
|
||||||
# -ftz flush underflow to zero
|
|
||||||
# -diag-disable 5268 disable warnings about line length > 132 (only comments there anyway)
|
|
||||||
# -implicitnone assume no implicit types (e.g. i for integer)
|
|
||||||
# -standard-semantics sets standard (Fortran 2008) and some other conventions
|
|
||||||
# -assume nostd_mod_proc_name avoid problems with libraries compiled without that option
|
|
||||||
# -real-size 64 assume size of real to be 8 bytes, matches our definition of pReal
|
|
||||||
|
|
||||||
compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " +
|
|
||||||
"-I%I -free -O3 -fpp -fopenmp " +
|
|
||||||
"-ftz -diag-disable 5268 " +
|
|
||||||
"-implicitnone -standard-semantics " +
|
|
||||||
"-assume nostd_mod_proc_name " +
|
|
||||||
"-real-size 64 " +
|
|
||||||
'-DDAMASKVERSION=\\\"n/a\\\"')
|
|
||||||
|
|
||||||
# Abaqus/CAE will generate an input file without parts and assemblies.
|
|
||||||
cae_no_parts_input_file=ON
|
|
||||||
# Both the Abaqus/Explicit packager and analysis are run in double precision.
|
|
||||||
double_precision=BOTH
|
|
||||||
# The user will not be asked whether old job files of the same name should be deleted.
|
|
||||||
ask_delete=OFF
|
|
||||||
|
|
||||||
# usub_lib_dir='your_prefered_location/abqlib'
|
|
||||||
|
|
||||||
# Remove the temporary names from the namespace
|
|
||||||
del fortCmd
|
|
|
@ -1,61 +0,0 @@
|
||||||
#
|
|
||||||
# DAMASK Abaqus Environment File
|
|
||||||
#
|
|
||||||
# ------------------------------------
|
|
||||||
# originally taken from Abaqus ver. 6.11.1
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Linux (Opteron/EM64T) Settings:
|
|
||||||
#
|
|
||||||
# Compile and Link command for user subroutines.
|
|
||||||
# Compile_cpp and link_exe for Abaqus make utility.
|
|
||||||
#
|
|
||||||
import os, re, glob, driverUtils
|
|
||||||
|
|
||||||
if False:
|
|
||||||
# use hdf5 compiler wrapper in $PATH
|
|
||||||
fortCmd = os.popen('h5fc -shlib -show').read().replace('\n','') # complicated way needed to pass in DAMASKVERSION string
|
|
||||||
link_sl += fortCmd.split()[1:]
|
|
||||||
fortCmd +=" -DDAMASK_HDF5"
|
|
||||||
else:
|
|
||||||
# Use the version in $PATH
|
|
||||||
fortCmd = "ifort"
|
|
||||||
|
|
||||||
# -free to use free-format FORTRAN 90 syntax
|
|
||||||
# -O <0-3> optimization level
|
|
||||||
# -fpp use FORTRAN preprocessor on source code
|
|
||||||
# -fopenmp build with openMP support
|
|
||||||
# -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only)
|
|
||||||
# -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only)
|
|
||||||
# -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only)
|
|
||||||
# -ftz flush underflow to zero
|
|
||||||
# -diag-disable 5268 disable warnings about line length > 132 (only comments there anyway)
|
|
||||||
# -implicitnone assume no implicit types (e.g. i for integer)
|
|
||||||
# -standard-semantics sets standard (Fortran 2008) and some other conventions
|
|
||||||
# -assume nostd_mod_proc_name avoid problems with libraries compiled without that option
|
|
||||||
# -real-size 64 assume size of real to be 8 bytes, matches our definition of pReal
|
|
||||||
|
|
||||||
# 'check pointers' does not work
|
|
||||||
|
|
||||||
compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " +
|
|
||||||
"-I%I -free -O0 -fpp " +
|
|
||||||
"-ftz -diag-disable 5268 " +
|
|
||||||
"-implicitnone -standard-semantics " +
|
|
||||||
"-assume nostd_mod_proc_name " +
|
|
||||||
"-real-size 64 " +
|
|
||||||
"-check bounds,format,output_conversion,uninit " +
|
|
||||||
"-ftrapuv -fpe-all0 " +
|
|
||||||
"-g -traceback -gen-interfaces -fp-stack-check -fp-model strict " +
|
|
||||||
'-DDAMASKVERSION=\\\"n/a\\\"')
|
|
||||||
|
|
||||||
# Abaqus/CAE will generate an input file without parts and assemblies.
|
|
||||||
cae_no_parts_input_file=ON
|
|
||||||
# Both the Abaqus/Explicit packager and analysis are run in double precision.
|
|
||||||
double_precision=BOTH
|
|
||||||
# The user will not be asked whether old job files of the same name should be deleted.
|
|
||||||
ask_delete=OFF
|
|
||||||
|
|
||||||
# usub_lib_dir='your_prefered_location/abqlib'
|
|
||||||
|
|
||||||
# Remove the temporary names from the namespace
|
|
||||||
del fortCmd
|
|
|
@ -20,6 +20,5 @@ class Environment():
|
||||||
for item in ['DAMASK_NUM_THREADS',
|
for item in ['DAMASK_NUM_THREADS',
|
||||||
'MSC_ROOT',
|
'MSC_ROOT',
|
||||||
'MARC_VERSION',
|
'MARC_VERSION',
|
||||||
'ABAQUS_VERSION',
|
|
||||||
]:
|
]:
|
||||||
self.options[item] = os.environ[item] if item in os.environ else None
|
self.options[item] = os.environ[item] if item in os.environ else None
|
||||||
|
|
|
@ -2,4 +2,3 @@
|
||||||
|
|
||||||
from .solver import Solver # noqa
|
from .solver import Solver # noqa
|
||||||
from .marc import Marc # noqa
|
from .marc import Marc # noqa
|
||||||
from .abaqus import Abaqus # noqa
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from .solver import Solver
|
|
||||||
import damask
|
|
||||||
|
|
||||||
|
|
||||||
class Abaqus(Solver):
|
|
||||||
"""Wrapper to run DAMASK with Abaqus."""
|
|
||||||
|
|
||||||
def __init__(self,version=damask.Environment().options['ABAQUS_VERSION']):
|
|
||||||
"""
|
|
||||||
Create a Abaqus solver object.
|
|
||||||
|
|
||||||
Parameters
|
|
||||||
----------
|
|
||||||
version : integer
|
|
||||||
Abaqus version
|
|
||||||
|
|
||||||
"""
|
|
||||||
self.solver = 'Abaqus'
|
|
||||||
try:
|
|
||||||
self.version = int(version)
|
|
||||||
except TypeError:
|
|
||||||
self.version = -1
|
|
||||||
|
|
||||||
def return_run_command(self,model):
|
|
||||||
try:
|
|
||||||
cmd = 'abq{}'.format(self.version)
|
|
||||||
subprocess.check_output([cmd,'information=release'])
|
|
||||||
except OSError: # link to abqXXX not existing
|
|
||||||
cmd = 'abaqus'
|
|
||||||
process = subprocess.Popen([cmd,'information=release'],stdout = subprocess.PIPE,stderr = subprocess.PIPE)
|
|
||||||
detectedVersion = int(process.stdout.readlines()[1].split()[1].decode('utf-8'))
|
|
||||||
if self.version not in [detectedVersion,-1]:
|
|
||||||
raise Exception('found Abaqus version {}, but requested {}'.format(detectedVersion,self.version))
|
|
||||||
return '{} -job {} -user {}/src/DAMASK_abaqus interactive'.format(cmd,model,damask.Environment().rootDir())
|
|
|
@ -6,11 +6,10 @@ endif()
|
||||||
|
|
||||||
file(GLOB damask-sources *.f90 *.c)
|
file(GLOB damask-sources *.f90 *.c)
|
||||||
|
|
||||||
# probably we should have subfolders for abaqus and MSC.Marc
|
# probably we should have a subfolder for MSC.Marc
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*CPFEM.f90")
|
list(FILTER damask-sources EXCLUDE REGEX ".*CPFEM.f90")
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*DAMASK_marc.*.f90")
|
list(FILTER damask-sources EXCLUDE REGEX ".*DAMASK_marc.*.f90")
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_marc.*.f90")
|
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_marc.*.f90")
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*mesh_abaqus.*.f90")
|
|
||||||
list(FILTER damask-sources EXCLUDE REGEX ".*commercialFEM_fileList.*.f90")
|
list(FILTER damask-sources EXCLUDE REGEX ".*commercialFEM_fileList.*.f90")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,7 @@ module CPFEM
|
||||||
integer(pInt), public :: &
|
integer(pInt), public :: &
|
||||||
cycleCounter = 0_pInt, & !< needs description
|
cycleCounter = 0_pInt, & !< needs description
|
||||||
theInc = -1_pInt, & !< needs description
|
theInc = -1_pInt, & !< needs description
|
||||||
lastLovl = 0_pInt, & !< lovl in previous call to marc hypela2
|
lastLovl = 0_pInt !< lovl in previous call to marc hypela2
|
||||||
lastStep = 0_pInt !< kstep in previous call to abaqus umat
|
|
||||||
real(pReal), public :: &
|
real(pReal), public :: &
|
||||||
theTime = 0.0_pReal, & !< needs description
|
theTime = 0.0_pReal, & !< needs description
|
||||||
theDelta = 0.0_pReal
|
theDelta = 0.0_pReal
|
||||||
|
|
|
@ -1,380 +0,0 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
|
||||||
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
|
||||||
!> @author Koen Janssens, Paul Scherrer Institut
|
|
||||||
!> @author Arun Prakash, Fraunhofer IWM
|
|
||||||
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
|
||||||
!> @brief interfaces DAMASK with Abaqus/Standard
|
|
||||||
!> @details put the included file abaqus_v6.env in either your home or model directory,
|
|
||||||
!> it is a minimum Abaqus environment file containing all changes necessary to use the
|
|
||||||
!> DAMASK subroutine (see Abaqus documentation for more information on the use of abaqus_v6.env)
|
|
||||||
!> @details Abaqus subroutines used:
|
|
||||||
!> @details - UMAT
|
|
||||||
!> @details - DFLUX
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
#define Abaqus
|
|
||||||
|
|
||||||
#include "prec.f90"
|
|
||||||
|
|
||||||
module DAMASK_interface
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
private
|
|
||||||
character(len=4), dimension(2), parameter, public :: INPUTFILEEXTENSION = ['.pes','.inp']
|
|
||||||
|
|
||||||
public :: &
|
|
||||||
DAMASK_interface_init, &
|
|
||||||
getSolverJobName
|
|
||||||
|
|
||||||
contains
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief reports and sets working directory
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine DAMASK_interface_init
|
|
||||||
#if __INTEL_COMPILER >= 1800
|
|
||||||
use, intrinsic :: iso_fortran_env, only: &
|
|
||||||
compiler_version, &
|
|
||||||
compiler_options
|
|
||||||
#endif
|
|
||||||
use ifport, only: &
|
|
||||||
CHDIR
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer, dimension(8) :: &
|
|
||||||
dateAndTime
|
|
||||||
integer :: lenOutDir,ierr
|
|
||||||
character(len=256) :: wd
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- DAMASK_abaqus init -+>>>'
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' Roters et al., Computational Materials Science 158:420–478, 2019'
|
|
||||||
write(6,'(a)') ' https://doi.org/10.1016/j.commatsci.2018.04.030'
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' Version: '//DAMASKVERSION
|
|
||||||
|
|
||||||
! https://github.com/jeffhammond/HPCInfo/blob/master/docs/Preprocessor-Macros.md
|
|
||||||
#if __INTEL_COMPILER >= 1800
|
|
||||||
write(6,'(/,a)') ' Compiled with: '//compiler_version()
|
|
||||||
write(6,'(a)') ' Compiler options: '//compiler_options()
|
|
||||||
#else
|
|
||||||
write(6,'(/,a,i4.4,a,i8.8)') ' Compiled with Intel fortran version :', __INTEL_COMPILER,&
|
|
||||||
', build date :', __INTEL_COMPILER_BUILD_DATE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' Compiled on: '//__DATE__//' at '//__TIME__
|
|
||||||
|
|
||||||
call date_and_time(values = dateAndTime)
|
|
||||||
write(6,'(/,a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',dateAndTime(2),'/', dateAndTime(1)
|
|
||||||
write(6,'(a,2(i2.2,a),i2.2)') ' Time: ',dateAndTime(5),':', dateAndTime(6),':', dateAndTime(7)
|
|
||||||
|
|
||||||
call getoutdir(wd, lenOutDir)
|
|
||||||
ierr = CHDIR(wd)
|
|
||||||
if (ierr /= 0) then
|
|
||||||
write(6,'(a20,a,a16)') ' working directory "',trim(wd),'" does not exist'
|
|
||||||
call quit(1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
end subroutine DAMASK_interface_init
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief using Abaqus/Standard function to get solver job name
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
character(1024) function getSolverJobName()
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer :: lenJobName
|
|
||||||
|
|
||||||
getSolverJobName=''
|
|
||||||
call getJobName(getSolverJobName, lenJobName)
|
|
||||||
|
|
||||||
end function getSolverJobName
|
|
||||||
|
|
||||||
|
|
||||||
end module DAMASK_interface
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "commercialFEM_fileList.f90"
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief This is the Abaqus std user subroutine for defining material behavior
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
|
|
||||||
RPL,DDSDDT,DRPLDE,DRPLDT,STRAN,DSTRAN,&
|
|
||||||
TIME,DTIME,TEMP,DTEMP,PREDEF,DPRED,CMNAME,NDI,NSHR,NTENS,&
|
|
||||||
NSTATV,PROPS,NPROPS,COORDS,DROT,PNEWDT,CELENT,&
|
|
||||||
DFGRD0,DFGRD1,NOEL,NPT,KSLAY,KSPT,KSTEP,KINC)
|
|
||||||
use prec, only: &
|
|
||||||
pReal, &
|
|
||||||
pInt
|
|
||||||
use numerics, only: &
|
|
||||||
!$ DAMASK_NumThreadsInt, &
|
|
||||||
usePingPong
|
|
||||||
use FEsolving, only: &
|
|
||||||
calcMode, &
|
|
||||||
terminallyIll, &
|
|
||||||
symmetricSolver
|
|
||||||
use debug, only: &
|
|
||||||
debug_info, &
|
|
||||||
debug_reset, &
|
|
||||||
debug_levelBasic, &
|
|
||||||
debug_level, &
|
|
||||||
debug_abaqus
|
|
||||||
use mesh, only: &
|
|
||||||
mesh_unitlength, &
|
|
||||||
mesh_FEasCP, &
|
|
||||||
mesh_ipCoordinates
|
|
||||||
use CPFEM, only: &
|
|
||||||
CPFEM_general, &
|
|
||||||
CPFEM_init_done, &
|
|
||||||
CPFEM_initAll, &
|
|
||||||
CPFEM_CALCRESULTS, &
|
|
||||||
CPFEM_AGERESULTS, &
|
|
||||||
CPFEM_COLLECT, &
|
|
||||||
CPFEM_BACKUPJACOBIAN, &
|
|
||||||
cycleCounter, &
|
|
||||||
theInc, &
|
|
||||||
theTime, &
|
|
||||||
theDelta, &
|
|
||||||
lastIncConverged, &
|
|
||||||
outdatedByNewInc, &
|
|
||||||
outdatedFFN1, &
|
|
||||||
lastStep
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: &
|
|
||||||
nDi, & !< Number of direct stress components at this point
|
|
||||||
nShr, & !< Number of engineering shear stress components at this point
|
|
||||||
nTens, & !< Size of the stress or strain component array (NDI + NSHR)
|
|
||||||
nStatV, & !< Number of solution-dependent state variables
|
|
||||||
nProps, & !< User-defined number of material constants
|
|
||||||
noEl, & !< element number
|
|
||||||
nPt,& !< integration point number
|
|
||||||
kSlay, & !< layer number (shell elements etc.)
|
|
||||||
kSpt, & !< section point within the current layer
|
|
||||||
kStep, & !< step number
|
|
||||||
kInc !< increment number
|
|
||||||
character(len=80), intent(in) :: &
|
|
||||||
cmname !< uses-specified material name, left justified
|
|
||||||
real(pReal), intent(in) :: &
|
|
||||||
DTIME, &
|
|
||||||
TEMP, &
|
|
||||||
DTEMP, &
|
|
||||||
CELENT
|
|
||||||
real(pReal), dimension(1), intent(in) :: &
|
|
||||||
PREDEF, &
|
|
||||||
DPRED
|
|
||||||
real(pReal), dimension(2), intent(in) :: &
|
|
||||||
TIME !< step time/total time at beginning of the current increment
|
|
||||||
real(pReal), dimension(3), intent(in) :: &
|
|
||||||
COORDS
|
|
||||||
real(pReal), dimension(nTens), intent(in) :: &
|
|
||||||
STRAN, & !< total strains at beginning of the increment
|
|
||||||
DSTRAN !< strain increments
|
|
||||||
real(pReal), dimension(nProps), intent(in) :: &
|
|
||||||
PROPS
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
|
||||||
DROT, & !< rotation increment matrix
|
|
||||||
DFGRD0, & !< F at beginning of increment
|
|
||||||
DFGRD1 !< F at end of increment
|
|
||||||
real(pReal), intent(inout) :: &
|
|
||||||
PNEWDT, & !< ratio of suggested new time increment
|
|
||||||
SSE, & !< specific elastic strain engergy
|
|
||||||
SPD, & !< specific plastic dissipation
|
|
||||||
SCD, & !< specific creep dissipation
|
|
||||||
RPL, & !< volumetric heat generation per unit time at the end of the increment
|
|
||||||
DRPLDT !< varation of RPL with respect to the temperature
|
|
||||||
real(pReal), dimension(nTens), intent(inout) :: &
|
|
||||||
STRESS !< stress tensor at the beginning of the increment, needs to be updated
|
|
||||||
real(pReal), dimension(nStatV), intent(inout) :: &
|
|
||||||
STATEV !< solution-dependent state variables
|
|
||||||
real(pReal), dimension(nTens), intent(out) :: &
|
|
||||||
DDSDDT, &
|
|
||||||
DRPLDE
|
|
||||||
real(pReal), dimension(nTens,nTens), intent(out) :: &
|
|
||||||
DDSDDE !< Jacobian matrix of the constitutive model
|
|
||||||
|
|
||||||
real(pReal) :: temperature ! temp by Abaqus is intent(in)
|
|
||||||
real(pReal), dimension(6) :: stress_h
|
|
||||||
real(pReal), dimension(6,6) :: ddsdde_h
|
|
||||||
integer(pInt) :: computationMode, i, cp_en
|
|
||||||
logical :: cutBack
|
|
||||||
|
|
||||||
#ifdef _OPENMP
|
|
||||||
integer :: defaultNumThreadsInt !< default value set by Abaqus
|
|
||||||
include "omp_lib.h"
|
|
||||||
defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc
|
|
||||||
call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
temperature = temp ! temp is intent(in)
|
|
||||||
DDSDDT = 0.0_pReal
|
|
||||||
DRPLDE = 0.0_pReal
|
|
||||||
|
|
||||||
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0 .and. noel == 1 .and. npt == 1) then
|
|
||||||
write(6,*) 'el',noel,'ip',npt
|
|
||||||
write(6,*) 'got kInc as',kInc
|
|
||||||
write(6,*) 'got dStran',dStran
|
|
||||||
flush(6)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if (.not. CPFEM_init_done) call CPFEM_initAll(noel,npt)
|
|
||||||
|
|
||||||
computationMode = 0
|
|
||||||
cp_en = mesh_FEasCP('elem',noel)
|
|
||||||
if (time(2) > theTime .or. kInc /= theInc) then ! reached convergence
|
|
||||||
terminallyIll = .false.
|
|
||||||
cycleCounter = -1 ! first calc step increments this to cycle = 0
|
|
||||||
if (kInc == 1) then ! >> start of analysis <<
|
|
||||||
lastIncConverged = .false. ! no Jacobian backup
|
|
||||||
outdatedByNewInc = .false. ! no aging of state
|
|
||||||
calcMode = .false. ! pretend last step was collection
|
|
||||||
write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> start of analysis..!';flush(6)
|
|
||||||
else if (kInc - theInc > 1) then ! >> restart of broken analysis <<
|
|
||||||
lastIncConverged = .false. ! no Jacobian backup
|
|
||||||
outdatedByNewInc = .false. ! no aging of state
|
|
||||||
calcMode = .true. ! pretend last step was calculation
|
|
||||||
write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> restart of analysis..!';flush(6)
|
|
||||||
else ! >> just the next inc <<
|
|
||||||
lastIncConverged = .true. ! request Jacobian backup
|
|
||||||
outdatedByNewInc = .true. ! request aging of state
|
|
||||||
calcMode = .true. ! assure last step was calculation
|
|
||||||
write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> new increment..!';flush(6)
|
|
||||||
endif
|
|
||||||
else if ( dtime < theDelta ) then ! >> cutBack <<
|
|
||||||
lastIncConverged = .false. ! no Jacobian backup
|
|
||||||
outdatedByNewInc = .false. ! no aging of state
|
|
||||||
terminallyIll = .false.
|
|
||||||
cycleCounter = -1 ! first calc step increments this to cycle = 0
|
|
||||||
calcMode = .true. ! pretend last step was calculation
|
|
||||||
write(6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> cutback detected..!';flush(6)
|
|
||||||
endif ! convergence treatment end
|
|
||||||
|
|
||||||
|
|
||||||
if (usePingPong) then
|
|
||||||
calcMode(npt,cp_en) = .not. calcMode(npt,cp_en) ! ping pong (calc <--> collect)
|
|
||||||
if (calcMode(npt,cp_en)) then ! now --- CALC ---
|
|
||||||
computationMode = CPFEM_CALCRESULTS
|
|
||||||
if ( lastStep /= kStep ) then ! first after ping pong
|
|
||||||
call debug_reset() ! resets debugging
|
|
||||||
outdatedFFN1 = .false.
|
|
||||||
cycleCounter = cycleCounter + 1_pInt
|
|
||||||
endif
|
|
||||||
if(outdatedByNewInc) then
|
|
||||||
computationMode = ior(computationMode,CPFEM_AGERESULTS) ! calc and age results
|
|
||||||
outdatedByNewInc = .false. ! reset flag
|
|
||||||
endif
|
|
||||||
else ! now --- COLLECT ---
|
|
||||||
computationMode = CPFEM_COLLECT ! plain collect
|
|
||||||
if(lastStep /= kStep .and. .not. terminallyIll) &
|
|
||||||
call debug_info() ! first after ping pong reports (meaningful) debugging
|
|
||||||
if (lastIncConverged) then
|
|
||||||
computationMode = ior(computationMode,CPFEM_BACKUPJACOBIAN) ! collect and backup Jacobian after convergence
|
|
||||||
lastIncConverged = .false. ! reset flag
|
|
||||||
endif
|
|
||||||
mesh_ipCoordinates(1:3,npt,cp_en) = mesh_unitlength * COORDS
|
|
||||||
endif
|
|
||||||
else ! --- PLAIN MODE ---
|
|
||||||
computationMode = CPFEM_CALCRESULTS ! always calc
|
|
||||||
if (lastStep /= kStep) then
|
|
||||||
if (.not. terminallyIll) &
|
|
||||||
call debug_info() ! first reports (meaningful) debugging
|
|
||||||
call debug_reset() ! and resets debugging
|
|
||||||
outdatedFFN1 = .false.
|
|
||||||
cycleCounter = cycleCounter + 1_pInt
|
|
||||||
endif
|
|
||||||
if (outdatedByNewInc) then
|
|
||||||
computationMode = ior(computationMode,CPFEM_AGERESULTS)
|
|
||||||
outdatedByNewInc = .false. ! reset flag
|
|
||||||
endif
|
|
||||||
if (lastIncConverged) then
|
|
||||||
computationMode = ior(computationMode,CPFEM_BACKUPJACOBIAN) ! backup Jacobian after convergence
|
|
||||||
lastIncConverged = .false. ! reset flag
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
theTime = time(2) ! record current starting time
|
|
||||||
theDelta = dtime ! record current time increment
|
|
||||||
theInc = kInc ! record current increment number
|
|
||||||
lastStep = kStep ! record step number
|
|
||||||
|
|
||||||
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then
|
|
||||||
write(6,'(a16,1x,i2,1x,a,i8,a,i8,1x,i5,a)') 'computationMode',computationMode,'(',cp_en,':',noel,npt,')'
|
|
||||||
flush(6)
|
|
||||||
endif
|
|
||||||
|
|
||||||
call CPFEM_general(computationMode,usePingPong,dfgrd0,dfgrd1,temperature,dtime,noel,npt,stress_h,ddsdde_h)
|
|
||||||
|
|
||||||
! DAMASK: 11, 22, 33, 12, 23, 13
|
|
||||||
! ABAQUS explicit: 11, 22, 33, 12, 23, 13
|
|
||||||
! ABAQUS implicit: 11, 22, 33, 12, 13, 23
|
|
||||||
! ABAQUS implicit: 11, 22, 33, 12
|
|
||||||
|
|
||||||
ddsdde = ddsdde_h(1:ntens,1:ntens)
|
|
||||||
stress = stress_h(1:ntens)
|
|
||||||
if(symmetricSolver) ddsdde = 0.5_pReal*(ddsdde + transpose(ddsdde))
|
|
||||||
if(ntens == 6) then
|
|
||||||
stress_h = stress
|
|
||||||
stress(5) = stress_h(6)
|
|
||||||
stress(6) = stress_h(5)
|
|
||||||
ddsdde_h = ddsdde
|
|
||||||
ddsdde(:,5) = ddsdde_h(:,6)
|
|
||||||
ddsdde(:,6) = ddsdde_h(:,5)
|
|
||||||
ddsdde_h = ddsdde
|
|
||||||
ddsdde(5,:) = ddsdde_h(6,:)
|
|
||||||
ddsdde(6,:) = ddsdde_h(5,:)
|
|
||||||
end if
|
|
||||||
|
|
||||||
statev = 0
|
|
||||||
|
|
||||||
if (terminallyIll) pnewdt = 0.5_pReal ! force cutback directly ?
|
|
||||||
!$ call omp_set_num_threads(defaultNumThreadsInt) ! reset number of threads to stored default value
|
|
||||||
|
|
||||||
end subroutine UMAT
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief calculate internal heat generated due to inelastic energy dissipation
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
SUBROUTINE DFLUX(FLUX,SOL,KSTEP,KINC,TIME,NOEL,NPT,COORDS,&
|
|
||||||
JLTYP,TEMP,PRESS,SNAME)
|
|
||||||
use prec, only: &
|
|
||||||
pReal, &
|
|
||||||
pInt
|
|
||||||
use thermal_conduction, only: &
|
|
||||||
thermal_conduction_getSourceAndItsTangent
|
|
||||||
use mesh, only: &
|
|
||||||
mesh_FEasCP
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
character(len=1024) :: sname
|
|
||||||
real(pReal), dimension(2), intent(out) :: flux
|
|
||||||
real(pReal), intent(in) :: sol
|
|
||||||
Integer(pInt), intent(in) :: Kstep, Kinc, Noel, Npt
|
|
||||||
real(pReal), dimension(3), intent(in) :: coords
|
|
||||||
real(pReal), intent(in) :: time
|
|
||||||
real(pReal) :: Jltyp
|
|
||||||
real(pReal), intent(in) :: temp
|
|
||||||
real(pReal), intent(in) :: Press
|
|
||||||
|
|
||||||
jltyp = 1
|
|
||||||
call thermal_conduction_getSourceAndItsTangent(flux(1), flux(2), sol, npt,mesh_FEasCP('elem',noel))
|
|
||||||
end subroutine DFLUX
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief calls the exit function of Abaqus/Standard
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine quit(DAMASK_error)
|
|
||||||
use prec, only: &
|
|
||||||
pInt
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt) :: DAMASK_error
|
|
||||||
|
|
||||||
flush(6)
|
|
||||||
call xit
|
|
||||||
|
|
||||||
end subroutine quit
|
|
|
@ -15,7 +15,7 @@ module FEsolving
|
||||||
FEsolving_execElem, & !< for ping-pong scheme always whole range, otherwise one specific element
|
FEsolving_execElem, & !< for ping-pong scheme always whole range, otherwise one specific element
|
||||||
FEsolving_execIP !< for ping-pong scheme always range to max IP, otherwise one specific IP
|
FEsolving_execIP !< for ping-pong scheme always range to max IP, otherwise one specific IP
|
||||||
|
|
||||||
#if defined(Marc4DAMASK) || defined(Abaqus)
|
#if defined(Marc4DAMASK)
|
||||||
logical, dimension(:,:), allocatable :: &
|
logical, dimension(:,:), allocatable :: &
|
||||||
calcMode !< do calculation or simply collect when using ping pong scheme
|
calcMode !< do calculation or simply collect when using ping pong scheme
|
||||||
#endif
|
#endif
|
||||||
|
|
242
src/IO.f90
242
src/IO.f90
|
@ -34,16 +34,6 @@ module IO
|
||||||
IO_lc, &
|
IO_lc, &
|
||||||
IO_error, &
|
IO_error, &
|
||||||
IO_warning
|
IO_warning
|
||||||
#if defined(Marc4DAMASK) || defined(Abaqus)
|
|
||||||
public :: &
|
|
||||||
IO_open_inputFile
|
|
||||||
#if defined(Abaqus)
|
|
||||||
public :: &
|
|
||||||
IO_continuousIntValues, &
|
|
||||||
IO_extractValue, &
|
|
||||||
IO_countDataLines
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -193,94 +183,6 @@ integer function IO_open_binary(fileName,mode)
|
||||||
end function IO_open_binary
|
end function IO_open_binary
|
||||||
|
|
||||||
|
|
||||||
#if defined(Marc4DAMASK) || defined(Abaqus)
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief opens FEM input file for reading located in current working directory to given unit
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine IO_open_inputFile(fileUnit)
|
|
||||||
|
|
||||||
integer, intent(in) :: fileUnit !< file unit
|
|
||||||
|
|
||||||
integer :: myStat
|
|
||||||
character(len=1024) :: path
|
|
||||||
#if defined(Abaqus)
|
|
||||||
integer :: fileType
|
|
||||||
|
|
||||||
fileType = 1 ! assume .pes
|
|
||||||
path = trim(getSolverJobName())//inputFileExtension(fileType) ! attempt .pes, if it exists: it should be used
|
|
||||||
open(fileUnit+1,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
|
||||||
if(myStat /= 0) then ! if .pes does not work / exist; use conventional extension, i.e.".inp"
|
|
||||||
fileType = 2
|
|
||||||
path = trim(getSolverJobName())//inputFileExtension(fileType)
|
|
||||||
open(fileUnit+1,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
|
||||||
endif
|
|
||||||
if (myStat /= 0) call IO_error(100,el=myStat,ext_msg=path)
|
|
||||||
|
|
||||||
path = trim(getSolverJobName())//inputFileExtension(fileType)//'_assembly'
|
|
||||||
open(fileUnit,iostat=myStat,file=path)
|
|
||||||
if (myStat /= 0) call IO_error(100,el=myStat,ext_msg=path)
|
|
||||||
if (.not.abaqus_assembleInputFile(fileUnit,fileUnit+1)) call IO_error(103) ! strip comments and concatenate any "include"s
|
|
||||||
close(fileUnit+1)
|
|
||||||
|
|
||||||
contains
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief create a new input file for abaqus simulations by removing all comment lines and
|
|
||||||
!> including "include"s
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
recursive function abaqus_assembleInputFile(unit1,unit2) result(createSuccess)
|
|
||||||
|
|
||||||
integer, intent(in) :: unit1, &
|
|
||||||
unit2
|
|
||||||
|
|
||||||
|
|
||||||
integer, allocatable, dimension(:) :: chunkPos
|
|
||||||
character(len=pStringLen :: line,fname
|
|
||||||
logical :: createSuccess,fexist
|
|
||||||
|
|
||||||
|
|
||||||
do
|
|
||||||
read(unit2,'(A)',END=220) line
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
|
|
||||||
if (IO_lc(IO_StringValue(line,chunkPos,1))=='*include') then
|
|
||||||
fname = trim(line(9+scan(line(9:),'='):))
|
|
||||||
inquire(file=fname, exist=fexist)
|
|
||||||
if (.not.(fexist)) then
|
|
||||||
write(6,*)'ERROR: file does not exist error in abaqus_assembleInputFile'
|
|
||||||
write(6,*)'filename: ', trim(fname)
|
|
||||||
createSuccess = .false.
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
open(unit2+1,err=200,status='old',file=fname)
|
|
||||||
if (abaqus_assembleInputFile(unit1,unit2+1)) then
|
|
||||||
createSuccess=.true.
|
|
||||||
close(unit2+1)
|
|
||||||
else
|
|
||||||
createSuccess=.false.
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
else if (line(1:2) /= '**' .OR. line(1:8)=='**damask') then
|
|
||||||
write(unit1,'(A)') trim(line)
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
|
|
||||||
220 createSuccess = .true.
|
|
||||||
return
|
|
||||||
|
|
||||||
200 createSuccess =.false.
|
|
||||||
|
|
||||||
end function abaqus_assembleInputFile
|
|
||||||
#elif defined(Marc4DAMASK)
|
|
||||||
path = trim(getSolverJobName())//inputFileExtension
|
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
|
||||||
if (myStat /= 0) call IO_error(100,el=myStat,ext_msg=path)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
end subroutine IO_open_inputFile
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief identifies strings without content
|
!> @brief identifies strings without content
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -464,7 +366,6 @@ end function IO_lc
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief write error statements to standard out and terminate the Marc/spectral run with exit #9xxx
|
!> @brief write error statements to standard out and terminate the Marc/spectral run with exit #9xxx
|
||||||
!> in ABAQUS either time step is reduced or execution terminated
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
|
|
||||||
|
@ -644,29 +545,6 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
case (894)
|
case (894)
|
||||||
msg = 'MPI error'
|
msg = 'MPI error'
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
|
||||||
! error messages related to parsing of Abaqus input file
|
|
||||||
case (900)
|
|
||||||
msg = 'improper definition of nodes in input file (Nnodes < 2)'
|
|
||||||
case (901)
|
|
||||||
msg = 'no elements defined in input file (Nelems = 0)'
|
|
||||||
case (902)
|
|
||||||
msg = 'no element sets defined in input file (No *Elset exists)'
|
|
||||||
case (903)
|
|
||||||
msg = 'no materials defined in input file (Look into section assigments)'
|
|
||||||
case (904)
|
|
||||||
msg = 'no elements could be assigned for Elset: '
|
|
||||||
case (905)
|
|
||||||
msg = 'error in mesh_abaqus_map_materials'
|
|
||||||
case (906)
|
|
||||||
msg = 'error in mesh_abaqus_count_cpElements'
|
|
||||||
case (907)
|
|
||||||
msg = 'size of mesh_mapFEtoCPelem in mesh_abaqus_map_elements'
|
|
||||||
case (908)
|
|
||||||
msg = 'size of mesh_mapFEtoCPnode in mesh_abaqus_map_nodes'
|
|
||||||
case (909)
|
|
||||||
msg = 'size of mesh_node in mesh_abaqus_build_nodes not equal to mesh_Nnodes'
|
|
||||||
|
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
! general error messages
|
! general error messages
|
||||||
|
@ -791,126 +669,6 @@ subroutine IO_warning(warning_ID,el,ip,g,ext_msg)
|
||||||
end subroutine IO_warning
|
end subroutine IO_warning
|
||||||
|
|
||||||
|
|
||||||
#ifdef Abaqus
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief extracts string value from key=value pair and check whether key matches
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
character(len=300) pure function IO_extractValue(pair,key)
|
|
||||||
|
|
||||||
character(len=*), intent(in) :: pair, & !< key=value pair
|
|
||||||
key !< key to be expected
|
|
||||||
|
|
||||||
character(len=*), parameter :: SEP = achar(61) ! '='
|
|
||||||
|
|
||||||
integer :: myChunk !< position number of desired chunk
|
|
||||||
|
|
||||||
IO_extractValue = ''
|
|
||||||
|
|
||||||
myChunk = scan(pair,SEP)
|
|
||||||
if (myChunk > 0 .and. pair(:myChunk-1) == key) IO_extractValue = pair(myChunk+1:) ! extract value if key matches
|
|
||||||
|
|
||||||
end function IO_extractValue
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief count lines containig data up to next *keyword
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
integer function IO_countDataLines(fileUnit)
|
|
||||||
|
|
||||||
integer, intent(in) :: fileUnit !< file handle
|
|
||||||
|
|
||||||
|
|
||||||
integer, allocatable, dimension(:) :: chunkPos
|
|
||||||
character(len=pStringLen) :: line, &
|
|
||||||
tmp
|
|
||||||
|
|
||||||
IO_countDataLines = 0
|
|
||||||
line = ''
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
read(fileUnit,'(A)') line
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
tmp = IO_lc(IO_stringValue(line,chunkPos,1))
|
|
||||||
if (tmp(1:1) == '*' .and. tmp(2:2) /= '*') then ! found keyword
|
|
||||||
exit
|
|
||||||
else
|
|
||||||
if (tmp(2:2) /= '*') IO_countDataLines = IO_countDataLines + 1
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
backspace(fileUnit)
|
|
||||||
|
|
||||||
end function IO_countDataLines
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief return integer list corresponding to items in consecutive lines.
|
|
||||||
!! First integer in array is counter
|
|
||||||
!> @details Abaqus: triplet of start,stop,inc or named set
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN)
|
|
||||||
|
|
||||||
integer, intent(in) :: maxN
|
|
||||||
integer, dimension(1+maxN) :: IO_continuousIntValues
|
|
||||||
|
|
||||||
integer, intent(in) :: fileUnit, &
|
|
||||||
lookupMaxN
|
|
||||||
integer, dimension(:,:), intent(in) :: lookupMap
|
|
||||||
character(len=*), dimension(:), intent(in) :: lookupName
|
|
||||||
integer :: i,first,last
|
|
||||||
integer :: j,l,c
|
|
||||||
integer, allocatable, dimension(:) :: chunkPos
|
|
||||||
character(len=pStringLen) :: line
|
|
||||||
logical :: rangeGeneration
|
|
||||||
|
|
||||||
IO_continuousIntValues = 0
|
|
||||||
rangeGeneration = .false.
|
|
||||||
|
|
||||||
c = IO_countDataLines(fileUnit)
|
|
||||||
do l = 1,c
|
|
||||||
backspace(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
! check if the element values in the elset are auto generated
|
|
||||||
backspace(fileUnit)
|
|
||||||
read(fileUnit,'(A)',end=100) line
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
do i = 1,chunkPos(1)
|
|
||||||
if (IO_lc(IO_stringValue(line,chunkPos,i)) == 'generate') rangeGeneration = .true.
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do l = 1,c
|
|
||||||
read(fileUnit,'(A)',end=100) line
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
if (verify(IO_stringValue(line,chunkPos,1),'0123456789') > 0) then ! a non-int, i.e. set names follow on this line
|
|
||||||
do i = 1,chunkPos(1) ! loop over set names in line
|
|
||||||
do j = 1,lookupMaxN ! look through known set names
|
|
||||||
if (IO_stringValue(line,chunkPos,i) == lookupName(j)) then ! found matching name
|
|
||||||
first = 2 + IO_continuousIntValues(1) ! where to start appending data
|
|
||||||
last = first + lookupMap(1,j) - 1 ! up to where to append data
|
|
||||||
IO_continuousIntValues(first:last) = lookupMap(2:1+lookupMap(1,j),j) ! add resp. entity list
|
|
||||||
IO_continuousIntValues(1) = IO_continuousIntValues(1) + lookupMap(1,j) ! count them
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
enddo
|
|
||||||
else if (rangeGeneration) then ! range generation
|
|
||||||
do i = IO_intValue(line,chunkPos,1),&
|
|
||||||
IO_intValue(line,chunkPos,2),&
|
|
||||||
max(1,IO_intValue(line,chunkPos,3))
|
|
||||||
IO_continuousIntValues(1) = IO_continuousIntValues(1) + 1
|
|
||||||
IO_continuousIntValues(1+IO_continuousIntValues(1)) = i
|
|
||||||
enddo
|
|
||||||
else ! read individual elem nums
|
|
||||||
do i = 1,chunkPos(1)
|
|
||||||
IO_continuousIntValues(1) = IO_continuousIntValues(1) + 1
|
|
||||||
IO_continuousIntValues(1+IO_continuousIntValues(1)) = IO_intValue(line,chunkPos,i)
|
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
|
|
||||||
100 end function IO_continuousIntValues
|
|
||||||
#endif
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! internal helper functions
|
! internal helper functions
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
!> @brief all DAMASK files without solver
|
!> @brief all DAMASK files without solver
|
||||||
!> @details List of files needed by MSC.Marc and Abaqus/Standard
|
!> @details List of files needed by MSC.Marc
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
#include "IO.f90"
|
#include "IO.f90"
|
||||||
#include "numerics.f90"
|
#include "numerics.f90"
|
||||||
|
@ -19,9 +19,6 @@
|
||||||
#include "results.f90"
|
#include "results.f90"
|
||||||
#include "geometry_plastic_nonlocal.f90"
|
#include "geometry_plastic_nonlocal.f90"
|
||||||
#include "discretization.f90"
|
#include "discretization.f90"
|
||||||
#ifdef Abaqus
|
|
||||||
#include "mesh_abaqus.f90"
|
|
||||||
#endif
|
|
||||||
#ifdef Marc4DAMASK
|
#ifdef Marc4DAMASK
|
||||||
#include "mesh_marc.f90"
|
#include "mesh_marc.f90"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,10 +37,9 @@ module debug
|
||||||
debug_HOMOGENIZATION = 9, &
|
debug_HOMOGENIZATION = 9, &
|
||||||
debug_CPFEM = 10, &
|
debug_CPFEM = 10, &
|
||||||
debug_SPECTRAL = 11, &
|
debug_SPECTRAL = 11, &
|
||||||
debug_MARC = 12, &
|
debug_MARC = 12
|
||||||
debug_ABAQUS = 13
|
|
||||||
integer, parameter, private :: &
|
integer, parameter, private :: &
|
||||||
debug_MAXNTYPE = debug_ABAQUS !< must be set to the maximum defined debug type
|
debug_MAXNTYPE = debug_MARC !< must be set to the maximum defined debug type
|
||||||
|
|
||||||
integer,protected, dimension(debug_maxNtype+2), public :: & ! specific ones, and 2 for "all" and "other"
|
integer,protected, dimension(debug_maxNtype+2), public :: & ! specific ones, and 2 for "all" and "other"
|
||||||
debug_level = 0
|
debug_level = 0
|
||||||
|
@ -136,8 +135,6 @@ subroutine debug_init
|
||||||
what = debug_SPECTRAL
|
what = debug_SPECTRAL
|
||||||
case ('marc')
|
case ('marc')
|
||||||
what = debug_MARC
|
what = debug_MARC
|
||||||
case ('abaqus')
|
|
||||||
what = debug_ABAQUS
|
|
||||||
case ('all')
|
case ('all')
|
||||||
what = debug_MAXNTYPE + 1
|
what = debug_MAXNTYPE + 1
|
||||||
case ('other')
|
case ('other')
|
||||||
|
@ -210,8 +207,6 @@ subroutine debug_init
|
||||||
tag = ' Spectral solver'
|
tag = ' Spectral solver'
|
||||||
case (debug_MARC)
|
case (debug_MARC)
|
||||||
tag = ' MSC.MARC FEM solver'
|
tag = ' MSC.MARC FEM solver'
|
||||||
case (debug_ABAQUS)
|
|
||||||
tag = ' ABAQUS FEM solver'
|
|
||||||
end select
|
end select
|
||||||
|
|
||||||
if(debug_level(i) /= 0) then
|
if(debug_level(i) /= 0) then
|
||||||
|
|
2822
src/mesh_abaqus.f90
2822
src/mesh_abaqus.f90
File diff suppressed because it is too large
Load Diff
|
@ -12,11 +12,7 @@ module prec
|
||||||
implicit none
|
implicit none
|
||||||
public
|
public
|
||||||
! https://software.intel.com/en-us/blogs/2017/03/27/doctor-fortran-in-it-takes-all-kinds
|
! https://software.intel.com/en-us/blogs/2017/03/27/doctor-fortran-in-it-takes-all-kinds
|
||||||
#ifdef Abaqus
|
|
||||||
integer, parameter, public :: pReal = selected_real_kind(15,307) !< number with 15 significant digits, up to 1e+-307 (typically 64 bit)
|
|
||||||
#else
|
|
||||||
integer, parameter, public :: pReal = IEEE_selected_real_kind(15,307) !< number with 15 significant digits, up to 1e+-307 (typically 64 bit)
|
integer, parameter, public :: pReal = IEEE_selected_real_kind(15,307) !< number with 15 significant digits, up to 1e+-307 (typically 64 bit)
|
||||||
#endif
|
|
||||||
#if(INT==8)
|
#if(INT==8)
|
||||||
integer, parameter, public :: pInt = selected_int_kind(18) !< number with at least up to +-1e18 (typically 64 bit)
|
integer, parameter, public :: pInt = selected_int_kind(18) !< number with at least up to +-1e18 (typically 64 bit)
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue