Merge branch 'cmake' into development
This commit is contained in:
commit
718f3841f8
|
@ -6,4 +6,4 @@
|
||||||
*.bak
|
*.bak
|
||||||
*~
|
*~
|
||||||
bin
|
bin
|
||||||
PRIVATE
|
build
|
||||||
|
|
|
@ -21,7 +21,6 @@ stages:
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
before_script:
|
before_script:
|
||||||
- source $DAMASKROOT/DAMASK_env.sh
|
- source $DAMASKROOT/DAMASK_env.sh
|
||||||
- module purge
|
|
||||||
- cd $DAMASKROOT/PRIVATE/testing
|
- cd $DAMASKROOT/PRIVATE/testing
|
||||||
|
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
@ -88,7 +87,7 @@ checkout:
|
||||||
- git checkout $CI_COMMIT_SHA
|
- git checkout $CI_COMMIT_SHA
|
||||||
- git clone -q git@magit1.mpie.de:damask/PRIVATE.git
|
- git clone -q git@magit1.mpie.de:damask/PRIVATE.git
|
||||||
- source $DAMASKROOT/DAMASK_env.sh
|
- source $DAMASKROOT/DAMASK_env.sh
|
||||||
- make install
|
- make processing
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
@ -184,7 +183,7 @@ Compile_Intel:
|
||||||
stage: compileSpectralIntel
|
stage: compileSpectralIntel
|
||||||
script:
|
script:
|
||||||
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
||||||
- SpectralAll_compileIfort/test.py
|
- SpectralAll_compile/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
@ -194,7 +193,7 @@ Compile_GNU:
|
||||||
stage: compileSpectralGNU
|
stage: compileSpectralGNU
|
||||||
script:
|
script:
|
||||||
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
|
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
|
||||||
- SpectralAll_compileGfortran/test.py
|
- SpectralAll_compile/test.py
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
@ -202,9 +201,12 @@ Compile_GNU:
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
Compile_Intel_Prepare:
|
Compile_Intel_Prepare:
|
||||||
stage: prepareSpectral
|
stage: prepareSpectral
|
||||||
script:
|
before_script:
|
||||||
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
||||||
- make -C $DAMASKROOT clean spectral install tidy
|
script:
|
||||||
|
- cd $DAMASKROOT
|
||||||
|
- source DAMASK_env.sh
|
||||||
|
- make clean spectral processing
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
|
|
@ -0,0 +1,479 @@
|
||||||
|
########################################################################################
|
||||||
|
# Compiler options for building DAMASK
|
||||||
|
cmake_minimum_required (VERSION 2.8.8 FATAL_ERROR)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
# Find PETSc from system environment
|
||||||
|
set(PETSC_DIR $ENV{PETSC_DIR})
|
||||||
|
if ("${PETSC_DIR}" STREQUAL "")
|
||||||
|
message (FATAL_ERROR "PETSC_DIR is not defined")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set (petsc_conf_variables "${PETSC_DIR}/lib/petsc/conf/variables")
|
||||||
|
set (petsc_conf_rules "${PETSC_DIR}/lib/petsc/conf/rules" )
|
||||||
|
|
||||||
|
# Use existing variables from PETSc
|
||||||
|
# https://github.com/jedbrown/cmake-modules/blob/master/FindPETSc.cmake
|
||||||
|
|
||||||
|
# Generate a temporary makefile to probe the PETSc configuration
|
||||||
|
# This file will be deleted
|
||||||
|
# once the settings from PETSc are parsed into CMake
|
||||||
|
|
||||||
|
exec_program (mktemp ARGS -d OUTPUT_VARIABLE TEMPDIR)
|
||||||
|
set (petsc_config_makefile "${TEMPDIR}/Makefile.petsc")
|
||||||
|
file (WRITE
|
||||||
|
"${petsc_config_makefile}"
|
||||||
|
"## This file was auto generated by CMake
|
||||||
|
# PETSC_DIR = ${PETSC_DIR}
|
||||||
|
SHELL = /bin/sh
|
||||||
|
include ${petsc_conf_rules}
|
||||||
|
include ${petsc_conf_variables}
|
||||||
|
INCLUDE_DIRS := \${PETSC_FC_INCLUDES}
|
||||||
|
LIBRARIES := \${PETSC_WITH_EXTERNAL_LIB}
|
||||||
|
COMPILERF := \${FC}
|
||||||
|
COMPILERC := \${CC}
|
||||||
|
LINKERNAME := \${FLINKER}
|
||||||
|
includes:
|
||||||
|
\t@echo \${INCLUDE_DIRS}
|
||||||
|
extlibs:
|
||||||
|
\t@echo \${LIBRARIES}
|
||||||
|
compilerf:
|
||||||
|
\t@echo \${COMPILERF}
|
||||||
|
compilerc:
|
||||||
|
\t@echo \${COMPILERC}
|
||||||
|
linker:
|
||||||
|
\t@echo \${LINKERNAME}
|
||||||
|
")
|
||||||
|
|
||||||
|
# CMake will execute each target in the ${petsc_config_makefile}
|
||||||
|
# to acquire corresponding PETSc Variables.
|
||||||
|
find_program (MAKE_EXECUTABLE NAMES make gmake)
|
||||||
|
# Find the PETSc includes directory settings
|
||||||
|
execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} "includes"
|
||||||
|
RESULT_VARIABLE PETSC_INCLUDES_RETURN
|
||||||
|
OUTPUT_VARIABLE petsc_includes
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
# Find the PETSc external linking directory settings
|
||||||
|
# //required for final linking, must be appended after the executable
|
||||||
|
execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} "extlibs"
|
||||||
|
RESULT_VARIABLE PETSC_EXTERNAL_LIB_RETURN
|
||||||
|
OUTPUT_VARIABLE petsc_external_lib
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
# PETSc specified fortran compiler
|
||||||
|
execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} "compilerf"
|
||||||
|
RESULT_VARIABLE PETSC_MPIFC_RETURN
|
||||||
|
OUTPUT_VARIABLE PETSC_MPIFC
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
# PETSc specified C compiler
|
||||||
|
execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} "compilerc"
|
||||||
|
RESULT_VARIABLE PETSC_MPICC_RETURN
|
||||||
|
OUTPUT_VARIABLE PETSC_MPICC
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
# PETSc specified linker (MPIF90 + PETSc linking flags)
|
||||||
|
execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} "linker"
|
||||||
|
RESULT_VARIABLE PETSC_LINKER_RETURN
|
||||||
|
OUTPUT_VARIABLE PETSC_LINKER
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
# Remove temporary makefile, no need to keep it anymore.
|
||||||
|
file (REMOVE_RECURSE ${TEMPDIR})
|
||||||
|
|
||||||
|
# Remove duplicate compiler and linker flags
|
||||||
|
string (REGEX MATCHALL "-I([^\" ]+)" TMP_LIST "${petsc_includes}")
|
||||||
|
list (REMOVE_DUPLICATES TMP_LIST)
|
||||||
|
foreach (dir ${TMP_LIST})
|
||||||
|
set (PETSC_INCLUDES "${PETSC_INCLUDES} ${dir}")
|
||||||
|
endforeach (dir)
|
||||||
|
string (REGEX MATCHALL "-[lLW]([^\" ]+)" TMP_LIST "${petsc_external_lib}")
|
||||||
|
list (REMOVE_DUPLICATES TMP_LIST)
|
||||||
|
foreach (exlib ${TMP_LIST})
|
||||||
|
set (PETSC_EXTERNAL_LIB "${PETSC_EXTERNAL_LIB} ${exlib}")
|
||||||
|
endforeach (exlib)
|
||||||
|
|
||||||
|
message ("Found PETSC_DIR:\n${PETSC_DIR}\n" )
|
||||||
|
message ("Found PETSC_INCLUDES:\n${PETSC_INCLUDES}\n" )
|
||||||
|
message ("Found PETSC_EXTERNAL_LIB:\n${PETSC_EXTERNAL_LIB}\n")
|
||||||
|
message ("Found PETSC_LINKER:\n${PETSC_LINKER}\n" )
|
||||||
|
message ("Found MPI Fortran Compiler:\n${PETSC_MPIFC}\n" )
|
||||||
|
message ("Found MPI C Compiler:\n${PETSC_MPICC}\n" )
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
# Now start to care about DAMASK
|
||||||
|
|
||||||
|
# DAMASK solver defines project to build
|
||||||
|
if ("${DAMASK_SOLVER}" STREQUAL "SPECTRAL")
|
||||||
|
project (DAMASK_spectral Fortran C)
|
||||||
|
add_definitions (-DSpectral)
|
||||||
|
message ("Building Spectral Solver\n")
|
||||||
|
elseif ("${DAMASK_SOLVER}" STREQUAL "FEM")
|
||||||
|
project (DAMASK_FEM Fortran C)
|
||||||
|
add_definitions (-DFEM)
|
||||||
|
message ("Building FEM Solver\n")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# set compiler and linker commands (need to be done after defining the project)
|
||||||
|
# https://cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F
|
||||||
|
set (CMAKE_Fortran_COMPILER "${PETSC_MPIFC}")
|
||||||
|
set (CMAKE_C_COMPILER "${PETSC_MPICC}")
|
||||||
|
set (CMAKE_LINKER "${PETSC_LINKER}")
|
||||||
|
|
||||||
|
# Predefined sets for OPTIMIZATION/OPENMP based on BUILD_TYPE
|
||||||
|
if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG" OR "${CMAKE_BUILD_TYPE}" STREQUAL "SYNTAXONLY" )
|
||||||
|
set (PARALLEL "OFF")
|
||||||
|
set (OPTI "OFF")
|
||||||
|
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
|
||||||
|
set (PARALLEL "ON")
|
||||||
|
set (OPTI "DEFENSIVE")
|
||||||
|
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "PERFORMANCE")
|
||||||
|
set (PARALLEL "ON")
|
||||||
|
set (OPTI "AGGRESSIVE")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# $OPTIMIZATION takes precedence over $BUILD_TYPE defaults
|
||||||
|
if ("${OPTIMIZATION}" STREQUAL "")
|
||||||
|
set (OPTIMIZATION "${OPTI}")
|
||||||
|
else ()
|
||||||
|
set (OPTIMIZATION "${OPTIMIZATION}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# $OPENMP takes precedence over $BUILD_TYPE defaults
|
||||||
|
if ("${OPENMP}" STREQUAL "")
|
||||||
|
set (OPENMP "${PARALLEL}")
|
||||||
|
else ()
|
||||||
|
set(OPENMP "${OPENMP}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# syntax check only (mainly for pre-receive hook, works only with gfortran)
|
||||||
|
if ("${CMAKE_BUILD_TYPE}" STREQUAL "SYNTAXONLY" )
|
||||||
|
set (BUILDCMD_POST "${BUILDCMD_POST} -fsyntax-only")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Parse DAMASK_BIN from CONFIG file
|
||||||
|
file (READ "CONFIG" CONFIGFILE)
|
||||||
|
string (REGEX REPLACE ";" "\\\\;" CONFIGFILE "${CONFIGFILE}")
|
||||||
|
string (REGEX REPLACE "\n" ";" CONFIGFILE "${CONFIGFILE}")
|
||||||
|
foreach (item ${CONFIGFILE})
|
||||||
|
string (REGEX MATCH ".+DAMASK_BIN.+" item ${item})
|
||||||
|
if (item)
|
||||||
|
string (REGEX REPLACE "set" "" item "${item}")
|
||||||
|
string (REGEX REPLACE "=" " " item "${item}")
|
||||||
|
string (REGEX REPLACE "\\\${DAMASK_ROOT}" "${PROJECT_SOURCE_DIR}" item "${item}")
|
||||||
|
string (REPLACE "DAMASK_BIN" ";" STRING_LIST ${item})
|
||||||
|
list (GET STRING_LIST 1 item)
|
||||||
|
string (STRIP "${item}" CMAKE_INSTALL_PREFIX)
|
||||||
|
endif ()
|
||||||
|
endforeach(item ${CONFIGFILE})
|
||||||
|
|
||||||
|
# Parse DAMASK version from VERSION file
|
||||||
|
find_program (CAT_EXECUTABLE NAMES cat)
|
||||||
|
execute_process (COMMAND ${CAT_EXECUTABLE} ${PROJECT_SOURCE_DIR}/VERSION
|
||||||
|
RESULT_VARIABLE DAMASK_VERSION_RETURN
|
||||||
|
OUTPUT_VARIABLE DAMASK_V
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
add_definitions (-DDAMASKVERSION="${DAMASK_V}")
|
||||||
|
|
||||||
|
# definition of other macros
|
||||||
|
add_definitions (-DPETSc)
|
||||||
|
add_definitions (-DFLOAT=8)
|
||||||
|
add_definitions (-DINT=4)
|
||||||
|
|
||||||
|
set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} ${PETSC_INCLUDES}")
|
||||||
|
set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} -I${PROJECT_SOURCE_DIR}/lib")
|
||||||
|
|
||||||
|
###################################################################################################
|
||||||
|
# Intel Compiler
|
||||||
|
###################################################################################################
|
||||||
|
if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
|
||||||
|
|
||||||
|
if (OPENMP)
|
||||||
|
set (OPENMP_FLAGS "-qopenmp -parallel")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if ("${OPTIMIZATION}" STREQUAL "OFF")
|
||||||
|
set (OPTIMIZATION_FLAGS "-O0 -no-ip")
|
||||||
|
elseif ("${OPTIMIZATION}" STREQUAL "DEFENSIVE")
|
||||||
|
set (OPTIMIZATION_FLAGS "-O2")
|
||||||
|
elseif ("${OPTIMIZATION}" STREQUAL "AGGRESSIVE")
|
||||||
|
set (OPTIMIZATION_FLAGS "-ipo -O3 -no-prec-div -fp-model fast=2 -xHost")
|
||||||
|
# -fast = -ipo, -O3, -no-prec-div, -static, -fp-model fast=2, and -xHost"
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set (STANDARD_CHECK "-stand f08 -standard-semantics")
|
||||||
|
set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel")
|
||||||
|
# Link against shared Intel libraries instead of static ones
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
# Fine tuning compilation options
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fpp")
|
||||||
|
# preprocessor
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ftz")
|
||||||
|
# flush underflow to zero, automatically set if -O[1,2,3]
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -assume")
|
||||||
|
# assume ...
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} byterecl")
|
||||||
|
# ... record length is given in bytes (also set by -standard-semantics)
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},fpe_summary")
|
||||||
|
# ... print list of floating point exceptions occured during execution
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
|
||||||
|
# disables warnings ...
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268")
|
||||||
|
# ... the text exceeds right hand column allowed on the line (we have only comments there)
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -warn")
|
||||||
|
# enables warnings ...
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} declarations")
|
||||||
|
# ... any undeclared names (alternative name: -implicitnone)
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},general")
|
||||||
|
# ... warning messages and informational messages are issued by the compiler
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},usage")
|
||||||
|
# ... questionable programming practices
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},interfaces")
|
||||||
|
# ... checks the interfaces of all SUBROUTINEs called and FUNCTIONs invoked in your compilation against an external set of interface blocks
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},ignore_loc")
|
||||||
|
# ... %LOC is stripped from an actual argument
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},alignments")
|
||||||
|
# ... data that is not naturally aligned
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},unused")
|
||||||
|
# ... declared variables that are never used
|
||||||
|
|
||||||
|
# Additional options
|
||||||
|
# -warn: enables warnings, where
|
||||||
|
# truncated_source: Determines whether warnings occur when source exceeds the maximum column width in fixed-format files.
|
||||||
|
# (too many warnings because we have comments beyond character 132)
|
||||||
|
# uncalled: Determines whether warnings occur when a statement function is never called
|
||||||
|
# all:
|
||||||
|
# -name as_is: case sensitive Fortran!
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
# Runtime debugging
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
||||||
|
# Generate symbolic debugging information in the object file
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -traceback")
|
||||||
|
# Generate extra information in the object file to provide source file traceback information when a severe error occurs at run time
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -gen-interfaces")
|
||||||
|
# Generate an interface block for each routine. http://software.intel.com/en-us/blogs/2012/01/05/doctor-fortran-gets-explicit-again/
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-stack-check")
|
||||||
|
# Generate extra code after every function call to ensure that the floating-point (FP) stack is in the expected state
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-model strict")
|
||||||
|
# Trap uninitalized variables
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -check" )
|
||||||
|
# Checks at runtime ...
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} bounds")
|
||||||
|
# ... if an array index is too small (<1) or too large!
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},format")
|
||||||
|
# ... for the data type of an item being formatted for output.
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},output_conversion")
|
||||||
|
# ... for the fit of data items within a designated format descriptor field.
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},pointers")
|
||||||
|
# ... for certain disassociated or uninitialized pointers or unallocated allocatable objects.
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},uninit")
|
||||||
|
# ... for uninitialized variables.
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ftrapuv")
|
||||||
|
# ... initializes stack local variables to an unusual value to aid error detection
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all0")
|
||||||
|
# ... capture all floating-point exceptions, sets -ftz automatically
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")
|
||||||
|
# enables warnings ...
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} errors")
|
||||||
|
# ... warnings are changed to errors
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},stderrors")
|
||||||
|
# ... warnings about Fortran standard violations are changed to errors
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug-parameters all")
|
||||||
|
# generate debug information for parameters
|
||||||
|
|
||||||
|
# Additional options
|
||||||
|
# -heap-arrays: Should not be done for OpenMP, but set "ulimit -s unlimited" on shell. Probably it helps also to unlimit other limits
|
||||||
|
# -check: Checks at runtime, where
|
||||||
|
# arg_temp_created: will cause a lot of warnings because we create a bunch of temporary arrays (performance?)
|
||||||
|
# stack:
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
# precision settings
|
||||||
|
set (PRECISION_FLAGS "${PRECISION_FLAGS} -real-size 64")
|
||||||
|
# set precision for standard real to 32 | 64 | 128 (= 4 | 8 | 16 bytes, type pReal is always 8 bytes)
|
||||||
|
set (PRECISION_FLAGS "${PRECISION_FLAGS} -integer-size 32")
|
||||||
|
# set precision for standard int to 16 | 32 | 64 (= 2 | 4 | 8 bytes, type pInt is always 4 bytes)
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################################################
|
||||||
|
# GNU Compiler
|
||||||
|
###################################################################################################
|
||||||
|
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
|
||||||
|
|
||||||
|
if (OPENMP)
|
||||||
|
set (OPENMP_FLAGS "-fopenmp")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if ("${OPTIMIZATION}" STREQUAL "OFF")
|
||||||
|
set (OPTIMIZATION_FLAGS "-O0" )
|
||||||
|
elseif ("${OPTIMIZATION}" STREQUAL "DEFENSIVE")
|
||||||
|
set (OPTIMIZATION_FLAGS "-O2")
|
||||||
|
elseif ("${OPTIMIZATION}" STREQUAL "AGGRESSIVE")
|
||||||
|
set (OPTIMIZATION_FLAGS "-O3 -ffast-math -funroll-loops -ftree-vectorize")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set (STANDARD_CHECK "-std=f2008ts -pedantic-errors" )
|
||||||
|
set (LINKER_FLAGS "${LINKER_FLAGS} -Wl")
|
||||||
|
# options parsed directly to the linker
|
||||||
|
set (LINKER_FLAGS "${LINKER_FLAGS},-undefined,dynamic_lookup" )
|
||||||
|
# ensure to link against dynamic libraries
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
# Fine tuning compilation options
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -xf95-cpp-input")
|
||||||
|
# preprocessor
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-132")
|
||||||
|
# restrict line length to the standard 132 characters (lattice.f90 require more characters)
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fimplicit-none")
|
||||||
|
# assume "implicit none" even if not present in source
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fmodule-private")
|
||||||
|
# assume "private" even if not present in source
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wall")
|
||||||
|
# sets the following Fortran options:
|
||||||
|
# -Waliasing: warn about possible aliasing of dummy arguments. Specifically, it warns if the same actual argument is associated with a dummy argument with "INTENT(IN)" and a dummy argument with "INTENT(OUT)" in a call with an explicit interface.
|
||||||
|
# -Wampersand: checks if a character expression is continued proberly by an ampersand at the end of the line and at the beginning of the new line
|
||||||
|
# -Warray-bounds: checks if array reference is out of bounds at compile time. use -fcheck-bounds to also check during runtime
|
||||||
|
# -Wconversion: warn about implicit conversions between different type
|
||||||
|
# -Wsurprising: warn when "suspicious" code constructs are encountered. While technically legal these usually indicate that an error has been made.
|
||||||
|
# -Wc-binding-type:
|
||||||
|
# -Wintrinsics-std: only standard intrisics are available, e.g. "call flush(6)" will cause an error
|
||||||
|
# -Wno-tabs: do not allow tabs in source
|
||||||
|
# -Wintrinsic-shadow: warn if a user-defined procedure or module procedure has the same name as an intrinsic
|
||||||
|
# -Wline-truncation:
|
||||||
|
# -Wtarget-lifetime:
|
||||||
|
# -Wreal-q-constant: warn about real-literal-constants with 'q' exponent-letter
|
||||||
|
# -Wunused: a number of unused-xxx warnings
|
||||||
|
# and sets the general (non-Fortran options) options:
|
||||||
|
# -Waddress
|
||||||
|
# -Warray-bounds (only with -O2)
|
||||||
|
# -Wc++11-compat
|
||||||
|
# -Wchar-subscripts
|
||||||
|
# -Wcomment
|
||||||
|
# -Wformat
|
||||||
|
# -Wmaybe-uninitialized
|
||||||
|
# -Wnonnull
|
||||||
|
# -Wparentheses
|
||||||
|
# -Wpointer-sign
|
||||||
|
# -Wreorder
|
||||||
|
# -Wreturn-type
|
||||||
|
# -Wsequence-point
|
||||||
|
# -Wstrict-aliasing
|
||||||
|
# -Wstrict-overflow=1
|
||||||
|
# -Wswitch
|
||||||
|
# -Wtrigraphs
|
||||||
|
# -Wuninitialized
|
||||||
|
# -Wunknown-pragmas
|
||||||
|
# -Wunused-function
|
||||||
|
# -Wunused-label
|
||||||
|
# -Wunused-value
|
||||||
|
# -Wunused-variable
|
||||||
|
# -Wvolatile-register-var
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wextra")
|
||||||
|
# sets the following Fortran options:
|
||||||
|
# -Wunuses-parameter:
|
||||||
|
# -Wcompare-reals:
|
||||||
|
# and sets the general (non-Fortran options) options:
|
||||||
|
# -Wclobbered
|
||||||
|
# -Wempty-body
|
||||||
|
# -Wignored-qualifiers
|
||||||
|
# -Wmissing-field-initializers
|
||||||
|
# -Woverride-init
|
||||||
|
# -Wsign-compare
|
||||||
|
# -Wtype-limits
|
||||||
|
# -Wuninitialized
|
||||||
|
# -Wunused-but-set-parameter (only with -Wunused or -Wall)
|
||||||
|
# -Wno-globals
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wcharacter-truncation")
|
||||||
|
# warn if character expressions (strings) are truncated
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wunderflow")
|
||||||
|
# produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation
|
||||||
|
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wsuggest-attribute=pure")
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wsuggest-attribute=noreturn")
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wconversion-extra")
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wimplicit-procedure")
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-unused-parameter")
|
||||||
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffpe-summary=all")
|
||||||
|
# print summary of floating point exeptions (invalid,zero,overflow,underflow,inexact,denormal)
|
||||||
|
|
||||||
|
# Additional options
|
||||||
|
# -Warray-temporarieswarnings: because we have many temporary arrays (performance issue?):
|
||||||
|
# -Wimplicit-interface: no interfaces for lapack/MPI routines
|
||||||
|
# -Wunsafe-loop-optimizations: warn if the loop cannot be optimized due to nontrivial assumptions.
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
# Runtime debugging
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ffpe-trap=invalid,zero,overflow")
|
||||||
|
# stop execution if floating point exception is detected (NaN is silent)
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
||||||
|
# Generate symbolic debugging information in the object file
|
||||||
|
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fbacktrace")
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fdump-core")
|
||||||
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fcheck=all")
|
||||||
|
# checks for (array-temps,bounds,do,mem,pointer,recursion)
|
||||||
|
|
||||||
|
# Additional options
|
||||||
|
# -ffpe-trap=precision,denormal,underflow
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
# precision settings
|
||||||
|
set (PRECISION_FLAGS "${PRECISION_FLAGS} -fdefault-real-8")
|
||||||
|
# set precision to 8 bytes for standard real (=8 for pReal). Will set size of double to 16 bytes as long as -fdefault-double-8 is not set
|
||||||
|
|
||||||
|
set (PRECISION_FLAGS "${PRECISION_FLAGS} -fdefault-double-8")
|
||||||
|
# set precision to 8 bytes for double real, would be 16 bytes if -fdefault-real-8 is used
|
||||||
|
|
||||||
|
# Additional options
|
||||||
|
# -fdefault-integer-8: Use it to set precision to 8 bytes for integer, don't use it for the standard case of pInt=4 (there is no -fdefault-integer-4)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set (CMAKE_Fortran_FLAGS "${BUILDCMD_PRE} ${OPENMP_FLAGS} ${STANDARD_CHECK} ${OPTIMIZATION_FLAGS} ${COMPILE_FLAGS} ${PRECISION_FLAGS}")
|
||||||
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${CMAKE_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}")
|
||||||
|
|
||||||
|
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||||
|
set (CMAKE_BUILD_TYPE "RELEASE")
|
||||||
|
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
|
||||||
|
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${DEBUG_FLAGS}")
|
||||||
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${PETSC_EXTERNAL_LIB} ${BUILDCMD_POST}")
|
||||||
|
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${DAMASK_INCLUDE_FLAGS} ${BUILDCMD_POST}")
|
||||||
|
|
||||||
|
message ("Fortran Compiler Flags:\n${CMAKE_Fortran_FLAGS}\n")
|
||||||
|
message ("Fortran Linker Flags:\n${CMAKE_Fortran_LINK_EXECUTABLE}\n")
|
||||||
|
|
||||||
|
# location of code
|
||||||
|
add_subdirectory (src)
|
||||||
|
|
||||||
|
# INSTALL BUILT BINARIES
|
||||||
|
if ("${CMAKE_BUILD_TYPE}" STREQUAL "SYNTAXONLY")
|
||||||
|
exec_program (mktemp ARGS -d OUTPUT_VARIABLE BLACK_HOLE)
|
||||||
|
install (PROGRAMS ${PROJECT_BINARY_DIR}/src/prec.mod
|
||||||
|
DESTINATION ${BLACK_HOLE})
|
||||||
|
else ()
|
||||||
|
if ("${PROJECT_NAME}" STREQUAL "DAMASK_spectral")
|
||||||
|
install (PROGRAMS ${PROJECT_BINARY_DIR}/src/DAMASK_spectral
|
||||||
|
DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||||
|
elseif ("${PROJECT_NAME}" STREQUAL "DAMASK_FEM")
|
||||||
|
install (PROGRAMS ${PROJECT_BINARY_DIR}/src/DAMASK_FEM
|
||||||
|
DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||||
|
endif ()
|
||||||
|
endif ()
|
|
@ -3,30 +3,36 @@ SHELL = /bin/sh
|
||||||
# Makefile for the installation of DAMASK
|
# Makefile for the installation of DAMASK
|
||||||
########################################################################################
|
########################################################################################
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: spectral marc processing
|
all: spectral FEM marc processing
|
||||||
|
|
||||||
.PHONY: spectral
|
.PHONY: spectral
|
||||||
spectral:
|
spectral: build/spectral
|
||||||
$(MAKE) DAMASK_spectral.exe -C code
|
@(cd build/spectral;make --no-print-directory -ws all install VERBOSE=1;)
|
||||||
|
|
||||||
.PHONY: FEM
|
.PHONY: FEM
|
||||||
FEM:
|
FEM: build/FEM
|
||||||
$(MAKE) DAMASK_FEM.exe -C code
|
@(cd build/FEM; make --no-print-directory -ws all install;)
|
||||||
|
|
||||||
|
.PHONY: build/spectral
|
||||||
|
build/spectral:
|
||||||
|
@mkdir -p build/spectral
|
||||||
|
@(cd build/spectral; cmake -Wno-dev -DDAMASK_SOLVER=SPECTRAL -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP} ../../;)
|
||||||
|
|
||||||
|
.PHONY: build/FEM
|
||||||
|
build/FEM:
|
||||||
|
@mkdir -p build/FEM
|
||||||
|
@(cd build/FEM; cmake -Wno-dev -DDAMASK_SOLVER=FEM -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP} ../../;)
|
||||||
|
|
||||||
.PHONY: marc
|
.PHONY: marc
|
||||||
marc:
|
marc:
|
||||||
|
@./installation/symLink_Code.sh
|
||||||
@./installation/mods_MarcMentat/apply_DAMASK_modifications.sh ${MAKEFLAGS}
|
@./installation/mods_MarcMentat/apply_DAMASK_modifications.sh ${MAKEFLAGS}
|
||||||
|
|
||||||
.PHONY: tidy
|
|
||||||
tidy:
|
|
||||||
@$(MAKE) tidy -C code >/dev/null
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@$(MAKE) cleanDAMASK -C code >/dev/null
|
@rm -rf build
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: processing
|
||||||
install:
|
processing:
|
||||||
@./installation/symlink_Code.py ${MAKEFLAGS}
|
|
||||||
@./installation/symlink_Processing.py ${MAKEFLAGS}
|
@./installation/symlink_Processing.py ${MAKEFLAGS}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# from https://help.github.com/articles/dealing-with-line-endings/
|
|
||||||
#
|
|
||||||
# always use LF, even if the files are edited on windows, they need to be compiled/used on unix
|
|
||||||
* text eol=lf
|
|
||||||
|
|
||||||
# Denote all files that are truly binary and should not be modified.
|
|
||||||
*.png binary
|
|
||||||
*.jpg binary
|
|
740
code/Makefile
740
code/Makefile
|
@ -1,740 +0,0 @@
|
||||||
SHELL = /bin/sh
|
|
||||||
########################################################################################
|
|
||||||
# Makefile to compile the Material subroutine for BVP solution using spectral method
|
|
||||||
########################################################################################
|
|
||||||
# Be sure to remove all files compiled with different options by using "make clean"
|
|
||||||
########################################################################################
|
|
||||||
# OPTIONS = standard (alternative): meaning
|
|
||||||
#-------------------------------------------------------------
|
|
||||||
# F90 = ifort (gfortran): compiler type, choose Intel or GNU
|
|
||||||
# FCOMPILERNAME = name of the compiler executable (if not the same as the type), e.g. using mpich-g90 instead of ifort
|
|
||||||
# PORTABLE = TRUE (FALSE): decision, if executable is optimized for the machine on which it was built.
|
|
||||||
# OPTIMIZATION = DEFENSIVE (OFF,AGGRESSIVE,ULTRA): Optimization mode: O2, O0, O3 + further options for most files, O3 + further options for all files
|
|
||||||
# OPENMP = TRUE (FALSE): OpenMP multiprocessor support
|
|
||||||
# PREFIX = arbitrary prefix (before FCOMPILERNAME)
|
|
||||||
# OPTION = arbitrary option (just before file to compile)
|
|
||||||
# SUFFIX = arbitrary suffix (after file to compile)
|
|
||||||
# STANDARD_CHECK = checking for Fortran 2008, compiler dependend
|
|
||||||
########################################################################################
|
|
||||||
# including PETSc files. PETSC_ARCH is loaded from these files.
|
|
||||||
DAMASKVERSION :=$(shell cat ../VERSION)
|
|
||||||
|
|
||||||
include ${PETSC_DIR}/lib/petsc/conf/variables
|
|
||||||
include ${PETSC_DIR}/lib/petsc/conf/rules
|
|
||||||
|
|
||||||
INCLUDE_DIRS := $(PETSC_FC_INCLUDES) -DPETSc
|
|
||||||
LIBRARIES := $(PETSC_WITH_EXTERNAL_LIB)
|
|
||||||
FCOMPILERNAME ?= $(FC)
|
|
||||||
CCOMPILERNAME ?= $(CC)
|
|
||||||
LINKERNAME ?= $(FLINKER)
|
|
||||||
|
|
||||||
# MPI compiler wrappers will tell if they are pointing to ifort or gfortran
|
|
||||||
COMPILEROUT :=$(shell $(FC) -show)
|
|
||||||
# search in FC or COMPILEROUT for gfortran/ifort if not defined
|
|
||||||
ifeq ($(strip $(F90)),)
|
|
||||||
F90 :=$(findstring gfortran,$(FC) $(COMPILEROUT))
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(F90)),)
|
|
||||||
F90 :=$(findstring ifort,$(FC) $(COMPILEROUT))
|
|
||||||
endif
|
|
||||||
|
|
||||||
OPENMP ?= ON
|
|
||||||
OPTIMIZATION ?= DEFENSIVE
|
|
||||||
|
|
||||||
ifeq "$(OPTIMIZATION)" "OFF"
|
|
||||||
OPTI := OFF
|
|
||||||
MAXOPTI := OFF
|
|
||||||
endif
|
|
||||||
ifeq "$(OPTIMIZATION)" "DEFENSIVE"
|
|
||||||
OPTI := DEFENSIVE
|
|
||||||
MAXOPTI := DEFENSIVE
|
|
||||||
endif
|
|
||||||
ifeq "$(OPTIMIZATION)" "AGGRESSIVE"
|
|
||||||
OPTI := AGGRESSIVE
|
|
||||||
MAXOPTI := AGGRESSIVE
|
|
||||||
endif
|
|
||||||
ifeq "$(OPTIMIZATION)" "ULTRA"
|
|
||||||
OPTI := AGGRESSIVE
|
|
||||||
MAXOPTI := AGGRESSIVE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef OPTI
|
|
||||||
OPTI := DEFENSIVE
|
|
||||||
MAXOPTI := DEFENSIVE
|
|
||||||
endif
|
|
||||||
|
|
||||||
# settings for shared memory multicore support
|
|
||||||
ifeq "$(OPENMP)" "ON"
|
|
||||||
OPENMP_FLAG_ifort =-qopenmp -parallel
|
|
||||||
OPENMP_FLAG_gfortran =-fopenmp
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef STANDARD_CHECK
|
|
||||||
STANDARD_CHECK_ifort =$(STANDARD_CHECK)
|
|
||||||
STANDARD_CHECK_gfortran =$(STANDARD_CHECK)
|
|
||||||
endif
|
|
||||||
|
|
||||||
STANDARD_CHECK_ifort ?=-stand f08 -standard-semantics
|
|
||||||
STANDARD_CHECK_gfortran ?=-std=f2008ts -pedantic-errors
|
|
||||||
|
|
||||||
#-pedantic: more strict on standard, enables some warnings
|
|
||||||
# -pedantic-errors: like pedantic, but errors instead of warnings
|
|
||||||
OPTIMIZATION_OFF_ifort :=-O0 -no-ip
|
|
||||||
OPTIMIZATION_OFF_gfortran :=-O0
|
|
||||||
OPTIMIZATION_DEFENSIVE_ifort :=-O2
|
|
||||||
OPTIMIZATION_DEFENSIVE_gfortran :=-O2
|
|
||||||
OPTIMIZATION_AGGRESSIVE_ifort :=-ipo -O3 -no-prec-div -fp-model fast=2 -xHost #-fast = -ipo, -O3, -no-prec-div, -static, -fp-model fast=2, and -xHost
|
|
||||||
OPTIMIZATION_AGGRESSIVE_gfortran :=-O3 -ffast-math -funroll-loops -ftree-vectorize
|
|
||||||
|
|
||||||
|
|
||||||
LINK_OPTIONS_ifort :=-shared-intel
|
|
||||||
COMPILE_OPTIONS_ifort :=-DDAMASKVERSION=\"${DAMASKVERSION}\"\
|
|
||||||
-fpp\
|
|
||||||
-ftz\
|
|
||||||
-assume byterecl,fpe_summary\
|
|
||||||
-diag-disable 5268\
|
|
||||||
-warn declarations\
|
|
||||||
-warn general\
|
|
||||||
-warn usage\
|
|
||||||
-warn interfaces\
|
|
||||||
-warn ignore_loc\
|
|
||||||
-warn alignments\
|
|
||||||
-warn unused
|
|
||||||
|
|
||||||
###################################################################################################
|
|
||||||
#COMPILE SWITCHES
|
|
||||||
#-shared-intel: Link against shared Intel libraries instead of static ones
|
|
||||||
#-fpp: preprocessor
|
|
||||||
#-ftz: flush unterflow to zero, automatically set if O<0,1,2,3> >0
|
|
||||||
#-assume byterecl record length is given in bytes (also set by -standard-semantics)
|
|
||||||
# fpe_summary print list of floating point exceptions occured during execution
|
|
||||||
#-fimplicit-none: assume "implicit-none" even if not present in source
|
|
||||||
#-diag-disable: disables warnings, where
|
|
||||||
# warning ID 5268: the text exceeds right hand column allowed on the line (we have only comments there)
|
|
||||||
#-warn: enables warnings, where
|
|
||||||
# declarations: any undeclared names (alternative name: -implicitnone)
|
|
||||||
# general: warning messages and informational messages are issued by the compiler
|
|
||||||
# usage: questionable programming practices
|
|
||||||
# interfaces: checks the interfaces of all SUBROUTINEs called and FUNCTIONs invoked in your compilation against an external set of interface blocks
|
|
||||||
# ignore_loc: %LOC is stripped from an actual argument
|
|
||||||
# alignments: data that is not naturally aligned
|
|
||||||
# unused: declared variables that are never used
|
|
||||||
# stderrors: warnings about Fortran standard violations are changed to errors (STANDARD_CHECK)
|
|
||||||
#
|
|
||||||
###################################################################################################
|
|
||||||
#MORE OPTIONS FOR DEBUGGING DURING COMPILATION
|
|
||||||
#-warn: enables warnings, where
|
|
||||||
# truncated_source: Determines whether warnings occur when source exceeds the maximum column width in fixed-format files. (too many warnings because we have comments beyond character 132)
|
|
||||||
# uncalled: Determines whether warnings occur when a statement function is never called
|
|
||||||
# all:
|
|
||||||
# -name as_is: case sensitive Fortran!
|
|
||||||
|
|
||||||
DEBUG_OPTIONS_ifort :=-g\
|
|
||||||
-traceback\
|
|
||||||
-gen-interfaces\
|
|
||||||
-fp-stack-check\
|
|
||||||
-fp-model strict\
|
|
||||||
-check bounds,format,output_conversion,pointers,uninit\
|
|
||||||
-ftrapuv\
|
|
||||||
-fpe-all0\
|
|
||||||
-warn errors\
|
|
||||||
-warn stderrors\
|
|
||||||
-debug-parameters all
|
|
||||||
|
|
||||||
###################################################################################################
|
|
||||||
#COMPILE SWITCHES FOR RUNTIME DEBUGGING
|
|
||||||
#-g: Generate symbolic debugging information in the object file
|
|
||||||
#-traceback: Generate extra information in the object file to provide source file traceback information when a severe error occurs at run time.
|
|
||||||
#-gen-interfaces: Generate an interface block for each routine. http://software.intel.com/en-us/blogs/2012/01/05/doctor-fortran-gets-explicit-again/
|
|
||||||
#-fp-stack-check: Generate extra code after every function call to ensure that the floating-point (FP) stack is in the expected state.
|
|
||||||
#-ftrapuv Trap uninitalized variables
|
|
||||||
#-check: checks at runtime, where
|
|
||||||
# bounds: check if an array index is too small (<1) or too large!
|
|
||||||
# format: Checking for the data type of an item being formatted for output.
|
|
||||||
# output_conversion: Checking for the fit of data items within a designated format descriptor field.
|
|
||||||
# pointers: Checking for certain disassociated or uninitialized pointers or unallocated allocatable objects.
|
|
||||||
# uninit: Checking for uninitialized variables.
|
|
||||||
#-fpe-all0 capture all floating-point exceptions, sets -ftz automatically
|
|
||||||
#-warn: enables warnings, where
|
|
||||||
# errors: warnings are changed to errors
|
|
||||||
# stderrors: warnings about Fortran standard violations are changed to errors
|
|
||||||
# information on http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors/
|
|
||||||
###################################################################################################
|
|
||||||
#MORE OPTIONS FOR RUNTIME DEBUGGING
|
|
||||||
#-heap-arrays: should not be done for OpenMP, but set "ulimit -s unlimited" on shell. Probably it helps also to unlimit other limits
|
|
||||||
#-check: checks at runtime, where
|
|
||||||
# arg_temp_created: will cause a lot of warnings because we create a bunch of temporary arrays (performance?)
|
|
||||||
# stack:
|
|
||||||
LINK_OPTIONS_gfortran :=-Wl,-undefined,dynamic_lookup
|
|
||||||
COMPILE_OPTIONS_gfortran :=-DDAMASKVERSION=\"${DAMASKVERSION}\"\
|
|
||||||
-xf95-cpp-input\
|
|
||||||
-ffree-line-length-132\
|
|
||||||
-fimplicit-none\
|
|
||||||
-fmodule-private\
|
|
||||||
-Wall\
|
|
||||||
-Wextra\
|
|
||||||
-Wcharacter-truncation\
|
|
||||||
-Wunderflow\
|
|
||||||
-Wsuggest-attribute=pure\
|
|
||||||
-Wsuggest-attribute=noreturn\
|
|
||||||
-Wconversion-extra\
|
|
||||||
-Wimplicit-procedure\
|
|
||||||
-Wno-unused-parameter
|
|
||||||
#-ffpe-summary=all only for newer gfortran
|
|
||||||
###################################################################################################
|
|
||||||
#COMPILE SWITCHES
|
|
||||||
#-shared
|
|
||||||
#-Wl,-undefined,dynamic_lookup:ensure to link against dynamic libraries
|
|
||||||
#-xf95-cpp-input: preprocessor
|
|
||||||
#-ffree-line-length-132: restrict line length to the standard 132 characters
|
|
||||||
#-ffpe-summary: print summary of floating point exeptions (‘invalid’, ‘zero’, ‘overflow’, ‘underflow’, ‘inexact’ and ‘denormal’)
|
|
||||||
#-fimplicit-none: assume "implicit-none" even if not present in source
|
|
||||||
#-fmodule-private: assume "private" even if not present in source
|
|
||||||
#-Wcharacter-truncation: warn if character expressions (strings) are truncated
|
|
||||||
#-Wunderflow: produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation
|
|
||||||
#-Wsuggest-attribute=pure:
|
|
||||||
#-Wsuggest-attribute=noreturn:
|
|
||||||
#-Wconversion-extra
|
|
||||||
#-Wimplicit-procedure
|
|
||||||
#-Wall: sets the following Fortran options:
|
|
||||||
# -Waliasing: warn about possible aliasing of dummy arguments. Specifically, it warns if the same actual argument is associated with a dummy argument with "INTENT(IN)" and a dummy argument with "INTENT(OUT)" in a call with an explicit interface.
|
|
||||||
# -Wampersand: checks if a character expression is continued proberly by an ampersand at the end of the line and at the beginning of the new line
|
|
||||||
# -Warray-bounds: checks if array reference is out of bounds at compile time. use -fcheck-bounds to also check during runtime
|
|
||||||
# -Wconversion: warn about implicit conversions between different type
|
|
||||||
# -Wsurprising: warn when "suspicious" code constructs are encountered. While technically legal these usually indicate that an error has been made.
|
|
||||||
# -Wc-binding-type:
|
|
||||||
# -Wintrinsics-std: only standard intrisics are available, e.g. "call flush(6)" will cause an error
|
|
||||||
# -Wno-tabs: do not allow tabs in source
|
|
||||||
# -Wintrinsic-shadow: warn if a user-defined procedure or module procedure has the same name as an intrinsic
|
|
||||||
# -Wline-truncation:
|
|
||||||
# -Wtarget-lifetime:
|
|
||||||
# -Wreal-q-constant: warn about real-literal-constants with 'q' exponent-letter
|
|
||||||
# -Wunused: a number of unused-xxx warnings
|
|
||||||
# these are general (non -Fortran options) implied by -Wall
|
|
||||||
# -Waddress
|
|
||||||
# -Warray-bounds (only with -O2)
|
|
||||||
# -Wc++11-compat
|
|
||||||
# -Wchar-subscripts
|
|
||||||
# -Wcomment
|
|
||||||
# -Wformat
|
|
||||||
# -Wmaybe-uninitialized
|
|
||||||
# -Wnonnull
|
|
||||||
# -Wparentheses
|
|
||||||
# -Wpointer-sign
|
|
||||||
# -Wreorder
|
|
||||||
# -Wreturn-type
|
|
||||||
# -Wsequence-point
|
|
||||||
# -Wstrict-aliasing
|
|
||||||
# -Wstrict-overflow=1
|
|
||||||
# -Wswitch
|
|
||||||
# -Wtrigraphs
|
|
||||||
# -Wuninitialized
|
|
||||||
# -Wunknown-pragmas
|
|
||||||
# -Wunused-function
|
|
||||||
# -Wunused-label
|
|
||||||
# -Wunused-value
|
|
||||||
# -Wunused-variable
|
|
||||||
# -Wvolatile-register-var
|
|
||||||
#-Wextra: sets the following Fortran options:
|
|
||||||
# -Wunuses-parameter:
|
|
||||||
# -Wcompare-reals:
|
|
||||||
# these are general (non -Fortran options) implied by -Wextra
|
|
||||||
# -Wclobbered
|
|
||||||
# -Wempty-body
|
|
||||||
# -Wignored-qualifiers
|
|
||||||
# -Wmissing-field-initializers
|
|
||||||
# -Woverride-init
|
|
||||||
# -Wsign-compare
|
|
||||||
# -Wtype-limits
|
|
||||||
# -Wuninitialized
|
|
||||||
# -Wunused-but-set-parameter (only with -Wunused or -Wall)
|
|
||||||
# -Wno-globals
|
|
||||||
|
|
||||||
###################################################################################################
|
|
||||||
#MORE OPTIONS FOR DEBUGGING DURING COMPILATION
|
|
||||||
#-Warray-temporarieswarnings: because we have many temporary arrays (performance issue?):
|
|
||||||
#-Wimplicit-interface: no interfaces for lapack routines
|
|
||||||
#-Wunsafe-loop-optimizations: warn if the loop cannot be optimized due to nontrivial assumptions.
|
|
||||||
#-Wstrict-overflow:
|
|
||||||
|
|
||||||
DEBUG_OPTIONS_gfortran :=-g \
|
|
||||||
-fbacktrace \
|
|
||||||
-fdump-core \
|
|
||||||
-fcheck=all \
|
|
||||||
-ffpe-trap=invalid,zero,overflow
|
|
||||||
|
|
||||||
###################################################################################################
|
|
||||||
#COMPILE SWITCHES FOR RUNTIME DEBUGGING
|
|
||||||
#-ffpe-trap=invalid,\ stop execution if floating point exception is detected (NaN is silent)
|
|
||||||
# zero,\
|
|
||||||
# overflow
|
|
||||||
#-fcheck=all: sets the following Fortran options:
|
|
||||||
#array-temps
|
|
||||||
#bounds
|
|
||||||
#do
|
|
||||||
#mem
|
|
||||||
#pointer
|
|
||||||
#recursion
|
|
||||||
###################################################################################################
|
|
||||||
#MORE OPTIONS FOR RUNTIME DEBUGGING
|
|
||||||
#-ffpe-trap=precision,\
|
|
||||||
# denormal, \
|
|
||||||
# underflow
|
|
||||||
|
|
||||||
ifeq "$(DEBUG)" "ON"
|
|
||||||
COMPILE_OPTIONS_$(F90) +=$(DEBUG_OPTIONS_$(F90))
|
|
||||||
LINK_OPTIONS_$(F90) +=$(DEBUG_OPTIONS_$(F90))
|
|
||||||
endif
|
|
||||||
LINK_OPTIONS_$(F90) += $(OPTIMIZATION_$(MAXOPTI)_$(F90))
|
|
||||||
|
|
||||||
PRECISION_ifort :=-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4
|
|
||||||
#-real-size 32: set precision to one of those 32/64/128 (= 4/8/16 bytes) for standard real (=8 for pReal)
|
|
||||||
#-integer-size 16: set precision to one of those 16/32/64 (= 2/4/8 bytes) for standard integer (=4 for pInt)
|
|
||||||
PRECISION_gfortran :=-fdefault-real-8 -fdefault-double-8 -DFLOAT=8 -DINT=4
|
|
||||||
#-fdefault-real-8: set precision to 8 bytes for standard real (=8 for pReal). Will set size of double to 16 bytes as long as -fdefault-double-8 is not set
|
|
||||||
#-fdefault-double-8: set precision to 8 bytes for double real, would be 16 bytes because -fdefault-real-8 is used
|
|
||||||
#-fdefault-integer-8: Use it to set precision to 8 bytes for integer, don't use it for the standard case of pInt=4 (there is no -fdefault-integer-4)
|
|
||||||
|
|
||||||
###################################################################################################
|
|
||||||
COMPILE =$(OPENMP_FLAG_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(OPTI)_$(F90)) $(COMPILE_OPTIONS_$(F90)) $(INCLUDE_DIRS) $(PRECISION_$(F90))
|
|
||||||
COMPILE_MAXOPTI =$(OPENMP_FLAG_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(MAXOPTI)_$(F90)) $(COMPILE_OPTIONS_$(F90)) $(INCLUDE_DIRS) $(PRECISION_$(F90))
|
|
||||||
###################################################################################################
|
|
||||||
SOURCE_FILES = \
|
|
||||||
source_thermal_dissipation.o \
|
|
||||||
source_thermal_externalheat.o \
|
|
||||||
source_damage_isoBrittle.o \
|
|
||||||
source_damage_isoDuctile.o \
|
|
||||||
source_damage_anisoBrittle.o \
|
|
||||||
source_damage_anisoDuctile.o \
|
|
||||||
source_vacancy_phenoplasticity.o \
|
|
||||||
source_vacancy_irradiation.o \
|
|
||||||
source_vacancy_thermalfluc.o
|
|
||||||
|
|
||||||
KINEMATICS_FILES = \
|
|
||||||
kinematics_cleavage_opening.o \
|
|
||||||
kinematics_slipplane_opening.o \
|
|
||||||
kinematics_thermal_expansion.o \
|
|
||||||
kinematics_vacancy_strain.o \
|
|
||||||
kinematics_hydrogen_strain.o
|
|
||||||
|
|
||||||
PLASTIC_FILES = \
|
|
||||||
plastic_dislotwin.o \
|
|
||||||
plastic_disloUCLA.o \
|
|
||||||
plastic_isotropic.o \
|
|
||||||
plastic_phenopowerlaw.o \
|
|
||||||
plastic_titanmod.o \
|
|
||||||
plastic_nonlocal.o \
|
|
||||||
plastic_none.o \
|
|
||||||
plastic_phenoplus.o
|
|
||||||
|
|
||||||
THERMAL_FILES = \
|
|
||||||
thermal_isothermal.o \
|
|
||||||
thermal_adiabatic.o \
|
|
||||||
thermal_conduction.o
|
|
||||||
|
|
||||||
DAMAGE_FILES = \
|
|
||||||
damage_none.o \
|
|
||||||
damage_local.o \
|
|
||||||
damage_nonlocal.o
|
|
||||||
|
|
||||||
VACANCYFLUX_FILES = \
|
|
||||||
vacancyflux_isoconc.o \
|
|
||||||
vacancyflux_isochempot.o \
|
|
||||||
vacancyflux_cahnhilliard.o
|
|
||||||
|
|
||||||
POROSITY_FILES = \
|
|
||||||
porosity_none.o \
|
|
||||||
porosity_phasefield.o
|
|
||||||
|
|
||||||
HYDROGENFLUX_FILES = \
|
|
||||||
hydrogenflux_isoconc.o \
|
|
||||||
hydrogenflux_cahnhilliard.o
|
|
||||||
|
|
||||||
HOMOGENIZATION_FILES = \
|
|
||||||
homogenization_RGC.o \
|
|
||||||
homogenization_isostrain.o \
|
|
||||||
homogenization_none.o
|
|
||||||
|
|
||||||
#####################
|
|
||||||
# Spectral Solver
|
|
||||||
#####################
|
|
||||||
DAMASK_spectral.exe: IGNORE := \#
|
|
||||||
DAMASK_spectral.exe: COMPILE += -DSpectral
|
|
||||||
DAMASK_spectral.exe: COMPILE_MAXOPTI += -DSpectral
|
|
||||||
DAMASK_spectral.exe: MESHNAME := mesh.f90
|
|
||||||
DAMASK_spectral.exe: INTERFACENAME := spectral_interface.f90
|
|
||||||
|
|
||||||
DAMASK_spectral.o: IGNORE := \#
|
|
||||||
DAMASK_spectral.o: COMPILE += -DSpectral
|
|
||||||
DAMASK_spectral.o: COMPILE_MAXOPTI += -DSpectral
|
|
||||||
DAMASK_spectral.o: MESHNAME := mesh.f90
|
|
||||||
DAMASK_spectral.o: INTERFACENAME := spectral_interface.f90
|
|
||||||
|
|
||||||
|
|
||||||
SPECTRAL_SOLVER_FILES = spectral_mech_AL.o spectral_mech_Basic.o spectral_mech_Polarisation.o \
|
|
||||||
spectral_thermal.o spectral_damage.o
|
|
||||||
|
|
||||||
SPECTRAL_FILES = C_routines.o \
|
|
||||||
system_routines.o \
|
|
||||||
prec.o \
|
|
||||||
DAMASK_interface.o \
|
|
||||||
IO.o \
|
|
||||||
numerics.o \
|
|
||||||
debug.o \
|
|
||||||
math.o \
|
|
||||||
FEsolving.o \
|
|
||||||
mesh.o \
|
|
||||||
material.o \
|
|
||||||
lattice.o \
|
|
||||||
$(SOURCE_FILES) \
|
|
||||||
$(KINEMATICS_FILES) \
|
|
||||||
$(PLASTIC_FILES) \
|
|
||||||
constitutive.o \
|
|
||||||
crystallite.o \
|
|
||||||
$(THERMAL_FILES) \
|
|
||||||
$(DAMAGE_FILES) \
|
|
||||||
$(VACANCYFLUX_FILES) \
|
|
||||||
$(HYDROGENFLUX_FILES) \
|
|
||||||
$(POROSITY_FILES) \
|
|
||||||
$(HOMOGENIZATION_FILES) homogenization.o \
|
|
||||||
CPFEM2.o \
|
|
||||||
spectral_utilities.o \
|
|
||||||
$(SPECTRAL_SOLVER_FILES)
|
|
||||||
|
|
||||||
DAMASK_spectral.exe: DAMASK_spectral.o
|
|
||||||
$(PREFIX) $(LINKERNAME) $(OPENMP_FLAG_$(F90)) $(LINK_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(MAXOPTI)_$(F90)) \
|
|
||||||
-o DAMASK_spectral.exe DAMASK_spectral.o \
|
|
||||||
$(SPECTRAL_FILES) $(LIBRARIES) $(SUFFIX)
|
|
||||||
|
|
||||||
|
|
||||||
DAMASK_spectral.o: DAMASK_spectral.f90 \
|
|
||||||
$(SPECTRAL_SOLVER_FILES)
|
|
||||||
$(PREFIX) $(FCOMPILERNAME) $(COMPILE_MAXOPTI) -c DAMASK_spectral.f90 $(SUFFIX)
|
|
||||||
|
|
||||||
spectral_mech_AL.o: spectral_mech_AL.f90 \
|
|
||||||
spectral_utilities.o
|
|
||||||
|
|
||||||
spectral_mech_Polarisation.o: spectral_mech_Polarisation.f90 \
|
|
||||||
spectral_utilities.o
|
|
||||||
|
|
||||||
spectral_mech_Basic.o: spectral_mech_Basic.f90 \
|
|
||||||
spectral_utilities.o
|
|
||||||
|
|
||||||
spectral_thermal.o: spectral_thermal.f90 \
|
|
||||||
spectral_utilities.o
|
|
||||||
|
|
||||||
spectral_damage.o: spectral_damage.f90 \
|
|
||||||
spectral_utilities.o
|
|
||||||
|
|
||||||
spectral_utilities.o: spectral_utilities.f90 \
|
|
||||||
CPFEM2.o
|
|
||||||
|
|
||||||
#####################
|
|
||||||
# FEM Solver
|
|
||||||
#####################
|
|
||||||
VPATH := ../private/FEM/code
|
|
||||||
DAMASK_FEM.exe: COMPILE += -DFEM
|
|
||||||
DAMASK_FEM.exe: COMPILE_MAXOPTI += -DFEM
|
|
||||||
DAMASK_FEM.exe: MESHNAME := ../private/FEM/code/meshFEM.f90
|
|
||||||
DAMASK_FEM.exe: INTERFACENAME := ../private/FEM/code/DAMASK_FEM_interface.f90
|
|
||||||
DAMASK_FEM.exe: INCLUDE_DIRS += -I./
|
|
||||||
|
|
||||||
FEM_SOLVER_FILES = FEM_mech.o FEM_thermal.o FEM_damage.o FEM_vacancyflux.o FEM_porosity.o FEM_hydrogenflux.o
|
|
||||||
|
|
||||||
FEM_FILES = prec.o \
|
|
||||||
DAMASK_interface.o \
|
|
||||||
FEZoo.o \
|
|
||||||
IO.o \
|
|
||||||
numerics.o \
|
|
||||||
debug.o \
|
|
||||||
math.o \
|
|
||||||
FEsolving.o \
|
|
||||||
mesh.o \
|
|
||||||
material.o \
|
|
||||||
lattice.o \
|
|
||||||
$(SOURCE_FILES) \
|
|
||||||
$(KINEMATICS_FILES) \
|
|
||||||
$(PLASTIC_FILES) \
|
|
||||||
constitutive.o \
|
|
||||||
crystallite.o \
|
|
||||||
$(THERMAL_FILES) \
|
|
||||||
$(DAMAGE_FILES) \
|
|
||||||
$(VACANCYFLUX_FILES) \
|
|
||||||
$(HYDROGENFLUX_FILES) \
|
|
||||||
$(POROSITY_FILES) \
|
|
||||||
$(HOMOGENIZATION_FILES) homogenization.o \
|
|
||||||
CPFEM.o \
|
|
||||||
FEM_utilities.o \
|
|
||||||
$(FEM_SOLVER_FILES)
|
|
||||||
|
|
||||||
DAMASK_FEM.exe: DAMASK_FEM_driver.o
|
|
||||||
$(PREFIX) $(LINKERNAME) $(OPENMP_FLAG_$(F90)) $(LINK_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(MAXOPTI)_$(F90)) \
|
|
||||||
-o DAMASK_FEM.exe DAMASK_FEM_driver.o \
|
|
||||||
$(FEM_FILES) $(LIBRARIES) $(SUFFIX)
|
|
||||||
|
|
||||||
DAMASK_FEM_driver.o: DAMASK_FEM_driver.f90 $(FEM_SOLVER_FILES)
|
|
||||||
$(PREFIX) $(FCOMPILERNAME) $(COMPILE_MAXOPTI) -c ../private/FEM/code/DAMASK_FEM_driver.f90 $(SUFFIX)
|
|
||||||
|
|
||||||
FEM_mech.o: FEM_mech.f90 \
|
|
||||||
FEM_utilities.o
|
|
||||||
|
|
||||||
FEM_thermal.o: FEM_thermal.f90 \
|
|
||||||
FEM_utilities.o
|
|
||||||
|
|
||||||
FEM_damage.o: FEM_damage.f90 \
|
|
||||||
FEM_utilities.o
|
|
||||||
|
|
||||||
FEM_vacancyflux.o: FEM_vacancyflux.f90 \
|
|
||||||
FEM_utilities.o
|
|
||||||
|
|
||||||
FEM_porosity.o: FEM_porosity.f90 \
|
|
||||||
FEM_utilities.o
|
|
||||||
|
|
||||||
FEM_hydrogenflux.o: FEM_hydrogenflux.f90 \
|
|
||||||
FEM_utilities.o
|
|
||||||
|
|
||||||
FEM_utilities.o: FEM_utilities.f90 \
|
|
||||||
CPFEM.o
|
|
||||||
|
|
||||||
FEZoo.o: $(wildcard FEZoo.f90) \
|
|
||||||
IO.o
|
|
||||||
$(IGNORE) $(PREFIX) $(FCOMPILERNAME) $(COMPILE) -c ../private/FEM/code/FEZoo.f90 $(SUFFIX)
|
|
||||||
touch FEZoo.o
|
|
||||||
|
|
||||||
CPFEM.o: CPFEM.f90 \
|
|
||||||
homogenization.o
|
|
||||||
|
|
||||||
CPFEM2.o: CPFEM2.f90 \
|
|
||||||
homogenization.o
|
|
||||||
|
|
||||||
homogenization.o: homogenization.f90 \
|
|
||||||
$(THERMAL_FILES) \
|
|
||||||
$(DAMAGE_FILES) \
|
|
||||||
$(VACANCYFLUX_FILES) \
|
|
||||||
$(POROSITY_FILES) \
|
|
||||||
$(HYDROGENFLUX_FILES) \
|
|
||||||
$(HOMOGENIZATION_FILES)
|
|
||||||
|
|
||||||
thermal_isothermal.o: thermal_isothermal.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
thermal_adiabatic.o: thermal_adiabatic.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
thermal_conduction.o: thermal_conduction.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
damage_none.o: damage_none.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
damage_local.o: damage_local.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
damage_nonlocal.o: damage_nonlocal.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
thermal_conduction.o: thermal_conduction.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
vacancyflux_isoconc.o: vacancyflux_isoconc.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
vacancyflux_isochempot.o: vacancyflux_isochempot.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
vacancyflux_cahnhilliard.o: vacancyflux_cahnhilliard.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
porosity_none.o: porosity_none.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
porosity_phasefield.o: porosity_phasefield.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
hydrogenflux_isoconc.o: hydrogenflux_isoconc.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
hydrogenflux_cahnhilliard.o: hydrogenflux_cahnhilliard.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
homogenization_RGC.o: homogenization_RGC.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
homogenization_isostrain.o: homogenization_isostrain.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
homogenization_none.o: homogenization_none.f90 \
|
|
||||||
crystallite.o
|
|
||||||
|
|
||||||
crystallite.o: crystallite.f90 \
|
|
||||||
constitutive.o
|
|
||||||
|
|
||||||
constitutive.o: constitutive.f90 \
|
|
||||||
$(SOURCE_FILES) \
|
|
||||||
$(KINEMATICS_FILES) \
|
|
||||||
$(PLASTIC_FILES)
|
|
||||||
|
|
||||||
source_thermal_dissipation.o: source_thermal_dissipation.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
source_thermal_externalheat.o: source_thermal_externalheat.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
source_damage_isoBrittle.o: source_damage_isoBrittle.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
source_damage_isoDuctile.o: source_damage_isoDuctile.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
source_damage_anisoBrittle.o: source_damage_anisoBrittle.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
source_damage_anisoDuctile.o: source_damage_anisoDuctile.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
source_vacancy_phenoplasticity.o: source_vacancy_phenoplasticity.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
source_vacancy_irradiation.o: source_vacancy_irradiation.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
source_vacancy_thermalfluc.o: source_vacancy_thermalfluc.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
kinematics_cleavage_opening.o: kinematics_cleavage_opening.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
kinematics_slipplane_opening.o: kinematics_slipplane_opening.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
kinematics_thermal_expansion.o: kinematics_thermal_expansion.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
kinematics_vacancy_strain.o: kinematics_vacancy_strain.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
kinematics_hydrogen_strain.o: kinematics_hydrogen_strain.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
plastic_nonlocal.o: plastic_nonlocal.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
plastic_titanmod.o: plastic_titanmod.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
plastic_disloUCLA.o: plastic_disloUCLA.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
plastic_dislotwin.o: plastic_dislotwin.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
plastic_phenopowerlaw.o: plastic_phenopowerlaw.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
plastic_phenoplus.o: plastic_phenoplus.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
plastic_isotropic.o: plastic_isotropic.f90 \
|
|
||||||
lattice.o
|
|
||||||
|
|
||||||
plastic_none.o: plastic_none.f90 \
|
|
||||||
lattice.o
|
|
||||||
ifeq "$(F90)" "gfortran"
|
|
||||||
lattice.o: lattice.f90 \
|
|
||||||
material.o
|
|
||||||
$(PREFIX) $(FCOMPILERNAME) $(COMPILE) -ffree-line-length-240 -c lattice.f90 $(SUFFIX)
|
|
||||||
# long lines for interaction matrix
|
|
||||||
else
|
|
||||||
lattice.o: lattice.f90 \
|
|
||||||
material.o
|
|
||||||
endif
|
|
||||||
|
|
||||||
material.o: material.f90 \
|
|
||||||
mesh.o
|
|
||||||
|
|
||||||
mesh.o: mesh.f90 \
|
|
||||||
$(wildcard meshFEM.f90) \
|
|
||||||
FEsolving.o \
|
|
||||||
math.o \
|
|
||||||
FEZoo.o
|
|
||||||
$(PREFIX) $(FCOMPILERNAME) $(COMPILE) -c $(MESHNAME) -o mesh.o $(SUFFIX)
|
|
||||||
|
|
||||||
FEsolving.o: FEsolving.f90 \
|
|
||||||
debug.o
|
|
||||||
|
|
||||||
math.o: math.f90 \
|
|
||||||
debug.o
|
|
||||||
|
|
||||||
debug.o: debug.f90 \
|
|
||||||
numerics.o
|
|
||||||
|
|
||||||
numerics.o: numerics.f90 \
|
|
||||||
IO.o
|
|
||||||
|
|
||||||
IO.o: IO.f90 \
|
|
||||||
DAMASK_interface.o
|
|
||||||
|
|
||||||
DAMASK_interface.o: spectral_interface.f90 \
|
|
||||||
$(wildcard DAMASK_FEM_interface.f90) \
|
|
||||||
prec.o
|
|
||||||
$(PREFIX) $(FCOMPILERNAME) $(COMPILE) -c $(INTERFACENAME) -o DAMASK_interface.o $(SUFFIX)
|
|
||||||
|
|
||||||
ifeq "$(F90)" "gfortran"
|
|
||||||
prec.o: prec.f90 \
|
|
||||||
system_routines.o
|
|
||||||
$(PREFIX) $(FCOMPILERNAME) $(COMPILE) -c prec.f90 -fno-range-check -fall-intrinsics -fno-fast-math $(SUFFIX)
|
|
||||||
# fno-range-check: Disable range checking on results of simplification of constant expressions during compilation
|
|
||||||
# --> allows the definition of DAMASK_NaN
|
|
||||||
#-fall-intrinsics: all intrinsic procedures (including the GNU-specific extensions) are accepted. -Wintrinsics-std will be ignored
|
|
||||||
# and no user-defined procedure with the same name as any intrinsic will be called except when it is explicitly declared external
|
|
||||||
# --> allows the use of 'isnan'
|
|
||||||
#-fno-fast-math:
|
|
||||||
# --> otherwise, when setting -ffast-math, isnan always evaluates to false (I would call it a bug)
|
|
||||||
else
|
|
||||||
|
|
||||||
prec.o: prec.f90 \
|
|
||||||
system_routines.o
|
|
||||||
endif
|
|
||||||
|
|
||||||
system_routines.o: system_routines.f90 \
|
|
||||||
C_routines.o
|
|
||||||
|
|
||||||
C_routines.o: C_routines.c
|
|
||||||
|
|
||||||
|
|
||||||
%.o : %.f90
|
|
||||||
$(PREFIX) $(FCOMPILERNAME) $(COMPILE) -c $< $(SUFFIX)
|
|
||||||
|
|
||||||
%.o : %.c
|
|
||||||
$(CCOMPILERNAME) -c $<
|
|
||||||
|
|
||||||
.PHONY: tidy
|
|
||||||
tidy:
|
|
||||||
@rm -rf *.o
|
|
||||||
@rm -rf *.mod
|
|
||||||
@rm -rf *.optrpt
|
|
||||||
@rm -rf *.inst.f90 # for instrumentation
|
|
||||||
@rm -rf *.pomp.f90 # for instrumentation
|
|
||||||
@rm -rf *.pp.f90 # for instrumentation
|
|
||||||
@rm -rf *.pdb # for instrumentation
|
|
||||||
@rm -rf *.opari.inc # for instrumentation
|
|
||||||
|
|
||||||
.PHONY: cleanDAMASK
|
|
||||||
cleanDAMASK:
|
|
||||||
@rm -rf *.exe
|
|
||||||
@rm -rf *.marc
|
|
||||||
@rm -rf *.o
|
|
||||||
@rm -rf *.mod
|
|
||||||
@rm -rf *.optrpt
|
|
||||||
@rm -rf *.inst.f90 # for instrumentation
|
|
||||||
@rm -rf *.pomp.f90 # for instrumentation
|
|
||||||
@rm -rf *.pp.f90 # for instrumentation
|
|
||||||
@rm -rf *.pdb # for instrumentation
|
|
||||||
@rm -rf *.opari.inc # for instrumentation
|
|
||||||
|
|
||||||
.PHONY: help
|
|
||||||
help:
|
|
||||||
F90="$(F90)"
|
|
||||||
FCOMPILERNAME="$(FCOMPILERNAME)"
|
|
||||||
COMPILEROUT="$(COMPILEROUT)"
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ echo "Editor: $EDITOR"
|
||||||
|
|
||||||
# tools
|
# tools
|
||||||
echo ''
|
echo ''
|
||||||
echo 'copying 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' \
|
||||||
'comp_damask_l' \
|
'comp_damask_l' \
|
||||||
|
@ -79,7 +79,7 @@ done
|
||||||
|
|
||||||
# Mentat scripts
|
# Mentat scripts
|
||||||
echo ''
|
echo ''
|
||||||
echo 'copying Mentat scripts...'
|
echo 'adapting Mentat scripts...'
|
||||||
theDIR=$INSTALLDIR/mentat$VERSION/bin
|
theDIR=$INSTALLDIR/mentat$VERSION/bin
|
||||||
for filename in 'edit_window' \
|
for filename in 'edit_window' \
|
||||||
'submit4' \
|
'submit4' \
|
||||||
|
@ -103,7 +103,7 @@ done
|
||||||
|
|
||||||
# Mentat scripts
|
# Mentat scripts
|
||||||
echo ''
|
echo ''
|
||||||
echo 'copying Mentat menus...'
|
echo 'adapting Mentat menus...'
|
||||||
theDIR=$INSTALLDIR/mentat$VERSION/menus
|
theDIR=$INSTALLDIR/mentat$VERSION/menus
|
||||||
for filename in 'job_run.ms'; do
|
for filename in 'job_run.ms'; do
|
||||||
cp $SCRIPTLOCATION/$VERSION/Mentat_menus/$filename $theDIR
|
cp $SCRIPTLOCATION/$VERSION/Mentat_menus/$filename $theDIR
|
||||||
|
@ -114,16 +114,20 @@ done
|
||||||
|
|
||||||
# compile menus
|
# compile menus
|
||||||
echo ''
|
echo ''
|
||||||
echo 'compiling menus...'
|
echo 'compiling Mentat menu binaries...'
|
||||||
$INSTALLDIR/mentat$VERSION/bin/mentat -compile $INSTALLDIR/mentat$VERSION/menus/linux64/main.msb
|
$(which xvfb-run 2>/dev/null) $INSTALLDIR/mentat$VERSION/bin/mentat -compile $INSTALLDIR/mentat$VERSION/menus/linux64/main.msb
|
||||||
|
[[ $? != 0 ]] && echo '...failed. Try installing xvfb-run on your system.'
|
||||||
|
|
||||||
# setting access rights
|
# setting access rights
|
||||||
echo ''
|
echo ''
|
||||||
echo 'setting file access rights...'
|
echo 'setting file access rights...'
|
||||||
chmod 755 $INSTALLDIR/marc$VERSION/tools/run_damask*
|
for filename in marc$VERSION/tools/run_damask* \
|
||||||
chmod 755 $INSTALLDIR/marc$VERSION/tools/comp_damask*
|
marc$VERSION/tools/comp_damask* \
|
||||||
chmod 755 $INSTALLDIR/mentat$VERSION/bin/submit{4..9}
|
mentat$VERSION/bin/submit{4..9} \
|
||||||
chmod 755 $INSTALLDIR/mentat$VERSION/bin/kill{4..9}
|
mentat$VERSION/bin/kill{4..9} \
|
||||||
|
|
||||||
|
chmod 755 $INSTALLDIR/${filename}
|
||||||
|
done
|
||||||
|
|
||||||
#creating symlinks for run_damask_scripts in /usr/local/bin
|
#creating symlinks for run_damask_scripts in /usr/local/bin
|
||||||
|
|
||||||
|
@ -154,5 +158,15 @@ if [ -d "$BIN_DIR" ]; then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# cloning user subroutine
|
||||||
|
echo ''
|
||||||
|
echo 'cloning $VERSION HYPELA2 user subroutine...'
|
||||||
|
ln -s DAMASK_marc.f90 ${DAMASK_ROOT}/src/DAMASK_marc${VERSION}.f90
|
||||||
|
|
||||||
|
# precompiling user subroutine
|
||||||
|
echo ''
|
||||||
|
echo 'precompiling $VERSION HYPELA2 user subroutine...'
|
||||||
|
echo 'not yet implemented..!'
|
||||||
|
|
||||||
echo ''
|
echo ''
|
||||||
echo 'done.'
|
echo 'done.'
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
#!/usr/bin/env python2.7
|
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
|
||||||
|
|
||||||
import os,sys
|
|
||||||
import damask
|
|
||||||
|
|
||||||
bin_link = { \
|
|
||||||
'.' : [
|
|
||||||
'DAMASK_spectral.exe',
|
|
||||||
'DAMASK_FEM.exe'
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
MarcReleases =[ \
|
|
||||||
'2014',
|
|
||||||
'2014.2',
|
|
||||||
'2015',
|
|
||||||
'2016'
|
|
||||||
]
|
|
||||||
|
|
||||||
damaskEnv = damask.Environment()
|
|
||||||
baseDir = damaskEnv.relPath('code/')
|
|
||||||
binDir = damaskEnv.options['DAMASK_BIN']
|
|
||||||
|
|
||||||
if not os.path.isdir(binDir):
|
|
||||||
os.mkdir(binDir)
|
|
||||||
|
|
||||||
sys.stdout.write('\nsymbolic linking...\n')
|
|
||||||
|
|
||||||
for subDir in bin_link:
|
|
||||||
theDir = os.path.abspath(os.path.join(baseDir,subDir))
|
|
||||||
sys.stdout.write('\n'+binDir+' ->\n'+theDir+damask.util.deemph(' ...')+'\n')
|
|
||||||
|
|
||||||
for theFile in bin_link[subDir]:
|
|
||||||
theName,theExt = os.path.splitext(theFile)
|
|
||||||
src = os.path.abspath(os.path.join(theDir,theFile))
|
|
||||||
|
|
||||||
if os.path.exists(src):
|
|
||||||
sym_link = os.path.abspath(os.path.join(binDir,subDir if theFile == '' else theName))
|
|
||||||
|
|
||||||
if os.path.lexists(sym_link):
|
|
||||||
os.remove(sym_link)
|
|
||||||
output = theName+damask.util.deemph(theExt)
|
|
||||||
else:
|
|
||||||
output = damask.util.emph(theName)+damask.util.deemph(theExt)
|
|
||||||
|
|
||||||
sys.stdout.write(damask.util.deemph('... ')+output+'\n')
|
|
||||||
os.symlink(src,sym_link)
|
|
||||||
|
|
||||||
|
|
||||||
sys.stdout.write('\nMSC.Marc versioning...\n\n')
|
|
||||||
theMaster = 'DAMASK_marc.f90'
|
|
||||||
|
|
||||||
for version in MarcReleases:
|
|
||||||
src = os.path.abspath(os.path.join(baseDir,theMaster))
|
|
||||||
if os.path.exists(src):
|
|
||||||
sym_link = os.path.abspath(os.path.join(baseDir,'DAMASK_marc{}.f90'.format(version)))
|
|
||||||
if os.path.lexists(sym_link):
|
|
||||||
os.remove(sym_link)
|
|
||||||
output = version
|
|
||||||
else:
|
|
||||||
output = damask.util.emph(version)
|
|
||||||
|
|
||||||
sys.stdout.write(' '+output+'\n')
|
|
||||||
os.symlink(theMaster,sym_link)
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
from .solver import Solver
|
from .solver import Solver
|
||||||
import damask
|
import damask
|
||||||
|
import subprocess,re
|
||||||
|
|
||||||
class Abaqus(Solver):
|
class Abaqus(Solver):
|
||||||
|
|
||||||
|
@ -20,8 +21,6 @@ class Abaqus(Solver):
|
||||||
raise Exception('unknown Abaqus solver %'%solver)
|
raise Exception('unknown Abaqus solver %'%solver)
|
||||||
|
|
||||||
def return_run_command(self,model):
|
def return_run_command(self,model):
|
||||||
import subprocess
|
|
||||||
import re
|
|
||||||
env=damask.Environment()
|
env=damask.Environment()
|
||||||
shortVersion = re.sub('[\.,-]', '',self.version)
|
shortVersion = re.sub('[\.,-]', '',self.version)
|
||||||
try:
|
try:
|
||||||
|
@ -33,4 +32,4 @@ class Abaqus(Solver):
|
||||||
detectedVersion = process.stdout.readlines()[1].split()[1]
|
detectedVersion = process.stdout.readlines()[1].split()[1]
|
||||||
if self.version != detectedVersion:
|
if self.version != detectedVersion:
|
||||||
raise Exception('found Abaqus version %s, but requested %s'%(detectedVersion,self.version))
|
raise Exception('found Abaqus version %s, but requested %s'%(detectedVersion,self.version))
|
||||||
return '%s -job %s -user %s/code/DAMASK_abaqus_%s interactive'%(cmd,model,env.rootDir(),self.solver)
|
return '%s -job %s -user %s/src/DAMASK_abaqus_%s interactive'%(cmd,model,env.rootDir(),self.solver)
|
||||||
|
|
|
@ -13,9 +13,6 @@ class Marc(Solver):
|
||||||
'2015': ['linux64',''],
|
'2015': ['linux64',''],
|
||||||
'2014.2':['linux64',''],
|
'2014.2':['linux64',''],
|
||||||
'2014' :['linux64',''],
|
'2014' :['linux64',''],
|
||||||
'2013.1':['linux64',''],
|
|
||||||
'2013': ['linux64',''],
|
|
||||||
'2012': ['linux64',''],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,13 +83,13 @@ class Marc(Solver):
|
||||||
|
|
||||||
damaskEnv = damask.environment.Environment()
|
damaskEnv = damask.environment.Environment()
|
||||||
|
|
||||||
user = os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc') # might be updated if special version (symlink) is found
|
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc') # might be updated if special version (symlink) is found
|
||||||
if compile:
|
if compile:
|
||||||
if os.path.isfile(os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc%s.f90'%release)):
|
if os.path.isfile(os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc%s.f90'%release)):
|
||||||
user = os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc%s'%release)
|
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc%s'%release)
|
||||||
else:
|
else:
|
||||||
if os.path.isfile(os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc%s.marc'%release)):
|
if os.path.isfile(os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc%s.marc'%release)):
|
||||||
user = os.path.join(damaskEnv.relPath('code/'),'DAMASK_marc%s'%release)
|
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc%s'%release)
|
||||||
|
|
||||||
# Define options [see Marc Installation and Operation Guide, pp 23]
|
# Define options [see Marc Installation and Operation Guide, pp 23]
|
||||||
script = 'run_damask%s'%({False:'',True:'_'}[optimization!='' or openMP])
|
script = 'run_damask%s'%({False:'',True:'_'}[optimization!='' or openMP])
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
DAMASK_marc*.f90
|
DAMASK_marc*.f90
|
||||||
|
Makefile
|
||||||
|
cmake_install.cmake
|
||||||
quit__genmod.f90
|
quit__genmod.f90
|
||||||
*.marc
|
*.marc
|
|
@ -0,0 +1,207 @@
|
||||||
|
# special flags for some files
|
||||||
|
if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
|
||||||
|
|
||||||
|
SET_SOURCE_FILES_PROPERTIES( "prec.f90" PROPERTIES
|
||||||
|
COMPILE_FLAGS "-fno-range-check -fall-intrinsics -fno-fast-math")
|
||||||
|
# fno-range-check: Disable range checking on results of simplification of constant expressions during compilation
|
||||||
|
# --> allows the definition of DAMASK_NaN
|
||||||
|
#-fall-intrinsics: all intrinsic procedures (including the GNU-specific extensions) are accepted. -Wintrinsics-std will be ignored
|
||||||
|
# and no user-defined procedure with the same name as any intrinsic will be called except when it is explicitly declared external
|
||||||
|
# --> allows the use of 'isnan'
|
||||||
|
#-fno-fast-math:
|
||||||
|
# --> otherwise, when setting -ffast-math, isnan always evaluates to false (I would call it a bug)
|
||||||
|
|
||||||
|
SET_SOURCE_FILES_PROPERTIES( "lattice.f90" PROPERTIES
|
||||||
|
COMPILE_FLAGS "-ffree-line-length-240")
|
||||||
|
# long lines for interaction matrix
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set( CMAKE_VERBOSE_MAKEFILE on )
|
||||||
|
|
||||||
|
# The dependency detection in CMake is not functioning for Fortran,
|
||||||
|
# hence we declare the dependencies from top to bottom in the following
|
||||||
|
add_library(C_ROUTINES OBJECT "C_routines.c")
|
||||||
|
set(OBJECTFILES $<TARGET_OBJECTS:C_ROUTINES>)
|
||||||
|
|
||||||
|
add_library(SYSTEM_ROUTINES OBJECT "system_routines.f90")
|
||||||
|
add_dependencies(SYSTEM_ROUTINES C_ROUTINES)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:SYSTEM_ROUTINES>)
|
||||||
|
|
||||||
|
add_library(PREC OBJECT "prec.f90")
|
||||||
|
add_dependencies(PREC SYSTEM_ROUTINES)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:PREC>)
|
||||||
|
|
||||||
|
if ("${PROJECT_NAME}" STREQUAL "DAMASK_spectral")
|
||||||
|
add_library(DAMASK_INTERFACE OBJECT "spectral_interface.f90")
|
||||||
|
elseif ("${PROJECT_NAME}" STREQUAL "DAMASK_FEM")
|
||||||
|
add_library(DAMASK_INTERFACE OBJECT "FEM_interface.f90")
|
||||||
|
endif()
|
||||||
|
add_dependencies(DAMASK_INTERFACE PREC)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_INTERFACE>)
|
||||||
|
|
||||||
|
add_library(IO OBJECT "IO.f90")
|
||||||
|
add_dependencies(IO DAMASK_INTERFACE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:IO>)
|
||||||
|
|
||||||
|
add_library(NUMERICS OBJECT "numerics.f90")
|
||||||
|
add_dependencies(NUMERICS IO)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:NUMERICS>)
|
||||||
|
|
||||||
|
add_library(DEBUG OBJECT "debug.f90")
|
||||||
|
add_dependencies(DEBUG NUMERICS)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DEBUG>)
|
||||||
|
|
||||||
|
add_library(FEsolving OBJECT "FEsolving.f90")
|
||||||
|
add_dependencies(FEsolving DEBUG)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:FEsolving>)
|
||||||
|
|
||||||
|
add_library(DAMASK_MATH OBJECT "math.f90")
|
||||||
|
add_dependencies(DAMASK_MATH FEsolving)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_MATH>)
|
||||||
|
|
||||||
|
# SPECTRAL solver and FEM solver use different mesh files
|
||||||
|
if ("${PROJECT_NAME}" STREQUAL "DAMASK_spectral")
|
||||||
|
add_library(MESH OBJECT "mesh.f90")
|
||||||
|
add_dependencies(MESH DAMASK_MATH)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MESH>)
|
||||||
|
elseif ("${PROJECT_NAME}" STREQUAL "DAMASK_FEM")
|
||||||
|
add_library(FEZoo OBJECT "FEZoo.f90")
|
||||||
|
add_dependencies(FEZoo DAMASK_MATH)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:FEZoo>)
|
||||||
|
add_library(MESH OBJECT "meshFEM.f90")
|
||||||
|
add_dependencies(MESH FEZoo)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MESH>)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(MATERIAL OBJECT "material.f90")
|
||||||
|
add_dependencies(MATERIAL MESH)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MATERIAL>)
|
||||||
|
|
||||||
|
add_library(DAMASK_HELPERS OBJECT "lattice.f90")
|
||||||
|
add_dependencies(DAMASK_HELPERS MATERIAL)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_HELPERS>)
|
||||||
|
|
||||||
|
# For each modular section
|
||||||
|
add_library (PLASTIC OBJECT
|
||||||
|
"plastic_dislotwin.f90"
|
||||||
|
"plastic_disloUCLA.f90"
|
||||||
|
"plastic_isotropic.f90"
|
||||||
|
"plastic_phenopowerlaw.f90"
|
||||||
|
"plastic_titanmod.f90"
|
||||||
|
"plastic_nonlocal.f90"
|
||||||
|
"plastic_none.f90"
|
||||||
|
"plastic_phenoplus.f90")
|
||||||
|
add_dependencies(PLASTIC DAMASK_HELPERS)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:PLASTIC>)
|
||||||
|
|
||||||
|
add_library (KINEMATICS OBJECT
|
||||||
|
"kinematics_cleavage_opening.f90"
|
||||||
|
"kinematics_slipplane_opening.f90"
|
||||||
|
"kinematics_thermal_expansion.f90"
|
||||||
|
"kinematics_vacancy_strain.f90"
|
||||||
|
"kinematics_hydrogen_strain.f90")
|
||||||
|
add_dependencies(KINEMATICS DAMASK_HELPERS)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:KINEMATICS>)
|
||||||
|
|
||||||
|
add_library (SOURCE OBJECT
|
||||||
|
"source_thermal_dissipation.f90"
|
||||||
|
"source_thermal_externalheat.f90"
|
||||||
|
"source_damage_isoBrittle.f90"
|
||||||
|
"source_damage_isoDuctile.f90"
|
||||||
|
"source_damage_anisoBrittle.f90"
|
||||||
|
"source_damage_anisoDuctile.f90"
|
||||||
|
"source_vacancy_phenoplasticity.f90"
|
||||||
|
"source_vacancy_irradiation.f90"
|
||||||
|
"source_vacancy_thermalfluc.f90")
|
||||||
|
add_dependencies(SOURCE DAMASK_HELPERS)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:SOURCE>)
|
||||||
|
|
||||||
|
add_library(CONSTITUTIVE OBJECT "constitutive.f90")
|
||||||
|
add_dependencies(CONSTITUTIVE PLASTIC KINEMATICS SOURCE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:CONSTITUTIVE>)
|
||||||
|
|
||||||
|
add_library(CRYSTALLITE OBJECT "crystallite.f90")
|
||||||
|
add_dependencies(CRYSTALLITE CONSTITUTIVE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:CRYSTALLITE>)
|
||||||
|
|
||||||
|
add_library(HOMOGENIZATION OBJECT
|
||||||
|
"homogenization_RGC.f90"
|
||||||
|
"homogenization_isostrain.f90"
|
||||||
|
"homogenization_none.f90")
|
||||||
|
add_dependencies(HOMOGENIZATION CRYSTALLITE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:HOMOGENIZATION>)
|
||||||
|
|
||||||
|
add_library(HYDROGENFLUX OBJECT
|
||||||
|
"hydrogenflux_isoconc.f90"
|
||||||
|
"hydrogenflux_cahnhilliard.f90")
|
||||||
|
add_dependencies(HYDROGENFLUX CRYSTALLITE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:HYDROGENFLUX>)
|
||||||
|
|
||||||
|
add_library(POROSITY OBJECT
|
||||||
|
"porosity_none.f90"
|
||||||
|
"porosity_phasefield.f90")
|
||||||
|
add_dependencies(POROSITY CRYSTALLITE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:POROSITY>)
|
||||||
|
|
||||||
|
add_library(VACANCYFLUX OBJECT
|
||||||
|
"vacancyflux_isoconc.f90"
|
||||||
|
"vacancyflux_isochempot.f90"
|
||||||
|
"vacancyflux_cahnhilliard.f90")
|
||||||
|
add_dependencies(VACANCYFLUX CRYSTALLITE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:VACANCYFLUX>)
|
||||||
|
|
||||||
|
add_library(DAMAGE OBJECT
|
||||||
|
"damage_none.f90"
|
||||||
|
"damage_local.f90"
|
||||||
|
"damage_nonlocal.f90")
|
||||||
|
add_dependencies(DAMAGE CRYSTALLITE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMAGE>)
|
||||||
|
|
||||||
|
add_library(THERMAL OBJECT
|
||||||
|
"thermal_isothermal.f90"
|
||||||
|
"thermal_adiabatic.f90"
|
||||||
|
"thermal_conduction.f90")
|
||||||
|
add_dependencies(THERMAL CRYSTALLITE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:THERMAL>)
|
||||||
|
|
||||||
|
add_library(DAMASK_ENGINE OBJECT "homogenization.f90")
|
||||||
|
add_dependencies(DAMASK_ENGINE THERMAL DAMAGE VACANCYFLUX POROSITY HYDROGENFLUX HOMOGENIZATION)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_ENGINE>)
|
||||||
|
|
||||||
|
add_library(DAMASK_CPFE OBJECT "CPFEM2.f90")
|
||||||
|
add_dependencies(DAMASK_CPFE DAMASK_ENGINE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_CPFE>)
|
||||||
|
|
||||||
|
if ("${PROJECT_NAME}" STREQUAL "DAMASK_spectral")
|
||||||
|
add_library(SPECTRAL_UTILITIES OBJECT "spectral_utilities.f90")
|
||||||
|
add_dependencies(SPECTRAL_UTILITIES DAMASK_CPFE)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:SPECTRAL_UTILITIES>)
|
||||||
|
|
||||||
|
add_library(SPECTRAL_SOLVER OBJECT
|
||||||
|
"spectral_thermal.f90"
|
||||||
|
"spectral_damage.f90"
|
||||||
|
"spectral_mech_AL.f90"
|
||||||
|
"spectral_mech_Polarisation.f90"
|
||||||
|
"spectral_mech_Basic.f90")
|
||||||
|
add_dependencies(SPECTRAL_SOLVER SPECTRAL_UTILITIES)
|
||||||
|
list(APPEND OBJECTFILES $<TARGET_OBJECTS:SPECTRAL_SOLVER>)
|
||||||
|
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "SYNTAXONLY")
|
||||||
|
add_executable(DAMASK_spectral "DAMASK_spectral.f90" ${OBJECTFILES})
|
||||||
|
add_dependencies(DAMASK_spectral SPECTRAL_SOLVER)
|
||||||
|
endif()
|
||||||
|
elseif ("${PROJECT_NAME}" STREQUAL "DAMASK_FEM")
|
||||||
|
add_library(FEM_UTILITIES OBJECT "FEM_utilities.f90")
|
||||||
|
add_dependencies(FEM_UTILITIES DAMASK_CPFE)
|
||||||
|
|
||||||
|
add_library(FEM_SOLVER OBJECT
|
||||||
|
"FEM_hydrogenflux.f90"
|
||||||
|
"FEM_porosity.f90"
|
||||||
|
"FEM_vacancyflux.f90"
|
||||||
|
"FEM_damage.f90"
|
||||||
|
"FEM_thermal.f90"
|
||||||
|
"FEM_mech.f90")
|
||||||
|
add_dependencies(FEM_SOLVER FEM_UTILITIES)
|
||||||
|
|
||||||
|
add_executable(DAMASK_FEM "DAMASK_FEM_driver.f90")
|
||||||
|
add_dependencies(DAMASK_FEM FEM_SOLVER)
|
||||||
|
endif()
|
|
@ -0,0 +1 @@
|
||||||
|
DAMASK_marc.f90
|
|
@ -0,0 +1 @@
|
||||||
|
DAMASK_marc.f90
|
|
@ -0,0 +1 @@
|
||||||
|
DAMASK_marc.f90
|
|
@ -0,0 +1 @@
|
||||||
|
DAMASK_marc.f90
|
|
@ -0,0 +1 @@
|
||||||
|
DAMASK_marc.f90
|
|
@ -0,0 +1 @@
|
||||||
|
DAMASK_marc.f90
|
|
@ -0,0 +1 @@
|
||||||
|
DAMASK_marc.f90
|
|
@ -207,7 +207,7 @@ subroutine constitutive_init()
|
||||||
outputName = PLASTICITY_NONE_label
|
outputName = PLASTICITY_NONE_label
|
||||||
thisNoutput => null()
|
thisNoutput => null()
|
||||||
thisOutput => null()
|
thisOutput => null()
|
||||||
thisSize => null()
|
thisSize => null()
|
||||||
case (PLASTICITY_ISOTROPIC_ID) plasticityType
|
case (PLASTICITY_ISOTROPIC_ID) plasticityType
|
||||||
outputName = PLASTICITY_ISOTROPIC_label
|
outputName = PLASTICITY_ISOTROPIC_label
|
||||||
thisNoutput => plastic_isotropic_Noutput
|
thisNoutput => plastic_isotropic_Noutput
|
|
@ -421,7 +421,7 @@ subroutine crystallite_init
|
||||||
crystallite_partionedFp0 = crystallite_Fp0
|
crystallite_partionedFp0 = crystallite_Fp0
|
||||||
crystallite_partionedFi0 = crystallite_Fi0
|
crystallite_partionedFi0 = crystallite_Fi0
|
||||||
crystallite_partionedF0 = crystallite_F0
|
crystallite_partionedF0 = crystallite_F0
|
||||||
crystallite_partionedF = crystallite_F0
|
crystallite_partionedF = crystallite_F0
|
||||||
|
|
||||||
call crystallite_orientations()
|
call crystallite_orientations()
|
||||||
crystallite_orientation0 = crystallite_orientation ! store initial orientations for calculation of grain rotations
|
crystallite_orientation0 = crystallite_orientation ! store initial orientations for calculation of grain rotations
|
||||||
|
@ -1428,7 +1428,6 @@ subroutine crystallite_integrateStateRK4()
|
||||||
!$OMP DO
|
!$OMP 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
|
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
|
||||||
if (crystallite_todo(g,i,e)) &
|
if (crystallite_todo(g,i,e)) &
|
||||||
!***dirty way to pass orientation information
|
|
||||||
call constitutive_microstructure(crystallite_orientation, &
|
call constitutive_microstructure(crystallite_orientation, &
|
||||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||||
|
@ -1754,7 +1753,6 @@ subroutine crystallite_integrateStateRKCK45()
|
||||||
!$OMP DO
|
!$OMP 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
|
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
|
||||||
if (crystallite_todo(g,i,e)) &
|
if (crystallite_todo(g,i,e)) &
|
||||||
!***dirty way to pass orientations to constitutive_microstructure
|
|
||||||
call constitutive_microstructure(crystallite_orientation, &
|
call constitutive_microstructure(crystallite_orientation, &
|
||||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||||
|
@ -1974,7 +1972,6 @@ subroutine crystallite_integrateStateRKCK45()
|
||||||
!$OMP DO
|
!$OMP 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
|
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
|
||||||
if (crystallite_todo(g,i,e)) &
|
if (crystallite_todo(g,i,e)) &
|
||||||
!***dirty way to pass orientations to constitutive_microstructure
|
|
||||||
call constitutive_microstructure(crystallite_orientation, &
|
call constitutive_microstructure(crystallite_orientation, &
|
||||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||||
|
@ -2209,7 +2206,6 @@ subroutine crystallite_integrateStateAdaptiveEuler()
|
||||||
!$OMP DO
|
!$OMP 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
|
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
|
||||||
if (crystallite_todo(g,i,e)) &
|
if (crystallite_todo(g,i,e)) &
|
||||||
!***dirty way to pass orientations to constitutive_microstructure
|
|
||||||
call constitutive_microstructure(crystallite_orientation, &
|
call constitutive_microstructure(crystallite_orientation, &
|
||||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||||
|
@ -2553,7 +2549,6 @@ eIter = FEsolving_execElem(1:2)
|
||||||
!$OMP DO
|
!$OMP 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
|
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
|
||||||
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
|
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
|
||||||
!***dirty way to pass orientations to constitutive_microstructure
|
|
||||||
call constitutive_microstructure(crystallite_orientation, &
|
call constitutive_microstructure(crystallite_orientation, &
|
||||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||||
|
@ -2798,7 +2793,6 @@ subroutine crystallite_integrateStateFPI()
|
||||||
!$OMP DO PRIVATE(p,c)
|
!$OMP DO PRIVATE(p,c)
|
||||||
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
|
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
|
||||||
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
|
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
|
||||||
!***dirty way to pass orientations to constitutive_micrsotructure
|
|
||||||
call constitutive_microstructure(crystallite_orientation, &
|
call constitutive_microstructure(crystallite_orientation, &
|
||||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
crystallite_Fp(1:3,1:3,g,i,e), &
|
|
@ -18,7 +18,7 @@ module lattice
|
||||||
LATTICE_maxNtwinFamily = 4_pInt, & !< max # of twin system families over lattice structures
|
LATTICE_maxNtwinFamily = 4_pInt, & !< max # of twin system families over lattice structures
|
||||||
LATTICE_maxNtransFamily = 2_pInt, & !< max # of transformation system families over lattice structures
|
LATTICE_maxNtransFamily = 2_pInt, & !< max # of transformation system families over lattice structures
|
||||||
LATTICE_maxNcleavageFamily = 3_pInt !< max # of transformation system families over lattice structures
|
LATTICE_maxNcleavageFamily = 3_pInt !< max # of transformation system families over lattice structures
|
||||||
|
|
||||||
integer(pInt), allocatable, dimension(:,:), protected, public :: &
|
integer(pInt), allocatable, dimension(:,:), protected, public :: &
|
||||||
lattice_NslipSystem, & !< total # of slip systems in each family
|
lattice_NslipSystem, & !< total # of slip systems in each family
|
||||||
lattice_NtwinSystem, & !< total # of twin systems in each family
|
lattice_NtwinSystem, & !< total # of twin systems in each family
|
||||||
|
@ -26,22 +26,22 @@ module lattice
|
||||||
lattice_NcleavageSystem !< total # of transformation systems in each family
|
lattice_NcleavageSystem !< total # of transformation systems in each family
|
||||||
|
|
||||||
integer(pInt), allocatable, dimension(:,:,:), protected, public :: &
|
integer(pInt), allocatable, dimension(:,:,:), protected, public :: &
|
||||||
lattice_interactionSlipSlip, & !< Slip--slip interaction type
|
lattice_interactionSlipSlip, & !< Slip--slip interaction type
|
||||||
lattice_interactionSlipTwin, & !< Slip--twin interaction type
|
lattice_interactionSlipTwin, & !< Slip--twin interaction type
|
||||||
lattice_interactionTwinSlip, & !< Twin--slip interaction type
|
lattice_interactionTwinSlip, & !< Twin--slip interaction type
|
||||||
lattice_interactionTwinTwin, & !< Twin--twin interaction type
|
lattice_interactionTwinTwin, & !< Twin--twin interaction type
|
||||||
lattice_interactionSlipTrans, & !< Slip--trans interaction type
|
lattice_interactionSlipTrans, & !< Slip--trans interaction type
|
||||||
lattice_interactionTransSlip, & !< Trans--slip interaction type
|
lattice_interactionTransSlip, & !< Trans--slip interaction type
|
||||||
lattice_interactionTransTrans !< Trans--trans interaction type
|
lattice_interactionTransTrans !< Trans--trans interaction type
|
||||||
|
|
||||||
real(pReal), allocatable, dimension(:,:,:,:,:), protected, public :: &
|
real(pReal), allocatable, dimension(:,:,:,:,:), protected, public :: &
|
||||||
lattice_Sslip, & !< Schmid and non-Schmid matrices
|
lattice_Sslip, & !< Schmid and non-Schmid matrices
|
||||||
lattice_Scleavage !< Schmid matrices for cleavage systems
|
lattice_Scleavage !< Schmid matrices for cleavage systems
|
||||||
|
|
||||||
real(pReal), allocatable, dimension(:,:,:,:), protected, public :: &
|
real(pReal), allocatable, dimension(:,:,:,:), protected, public :: &
|
||||||
lattice_Sslip_v, & !< Mandel notation of lattice_Sslip
|
lattice_Sslip_v, & !< Mandel notation of lattice_Sslip
|
||||||
lattice_Scleavage_v !< Mandel notation of lattice_Scleavege
|
lattice_Scleavage_v !< Mandel notation of lattice_Scleavege
|
||||||
|
|
||||||
real(pReal), allocatable, dimension(:,:,:), protected, public :: &
|
real(pReal), allocatable, dimension(:,:,:), protected, public :: &
|
||||||
lattice_sn, & !< normal direction of slip system
|
lattice_sn, & !< normal direction of slip system
|
||||||
lattice_sd, & !< slip direction of slip system
|
lattice_sd, & !< slip direction of slip system
|
||||||
|
@ -75,25 +75,25 @@ module lattice
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! face centered cubic
|
! face centered cubic
|
||||||
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
|
||||||
LATTICE_fcc_NslipSystem = int([12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for fcc
|
LATTICE_fcc_NslipSystem = int([12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for fcc
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
|
||||||
LATTICE_fcc_NtwinSystem = int([12, 0, 0, 0],pInt) !< # of twin systems per family for fcc
|
LATTICE_fcc_NtwinSystem = int([12, 0, 0, 0],pInt) !< # of twin systems per family for fcc
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNtransFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNtransFamily), parameter, public :: &
|
||||||
LATTICE_fcc_NtransSystem = int([12, 0],pInt) !< # of transformation systems per family for fcc
|
LATTICE_fcc_NtransSystem = int([12, 0],pInt) !< # of transformation systems per family for fcc
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
||||||
LATTICE_fcc_NcleavageSystem = int([3, 4, 0],pInt) !< # of cleavage systems per family for fcc
|
LATTICE_fcc_NcleavageSystem = int([3, 4, 0],pInt) !< # of cleavage systems per family for fcc
|
||||||
|
|
||||||
integer(pInt), parameter, private :: &
|
integer(pInt), parameter, private :: &
|
||||||
LATTICE_fcc_Nslip = 12_pInt, & !sum(lattice_fcc_NslipSystem), & !< total # of slip systems for fcc
|
LATTICE_fcc_Nslip = 12_pInt, & !sum(lattice_fcc_NslipSystem), & !< total # of slip systems for fcc
|
||||||
LATTICE_fcc_Ntwin = 12_pInt, & !sum(lattice_fcc_NtwinSystem), & !< total # of twin systems for fcc
|
LATTICE_fcc_Ntwin = 12_pInt, & !sum(lattice_fcc_NtwinSystem), & !< total # of twin systems for fcc
|
||||||
LATTICE_fcc_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for fcc
|
LATTICE_fcc_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for fcc
|
||||||
LATTICE_fcc_Ntrans = 12_pInt, & !sum(lattice_fcc_NtransSystem), & !< total # of transformation systems for fcc
|
LATTICE_fcc_Ntrans = 12_pInt, & !sum(lattice_fcc_NtransSystem), & !< total # of transformation systems for fcc
|
||||||
LATTICE_fcc_Ncleavage = 7_pInt !sum(lattice_fcc_NcleavageSystem) !< total # of cleavage systems for fcc
|
LATTICE_fcc_Ncleavage = 7_pInt !sum(lattice_fcc_NcleavageSystem) !< total # of cleavage systems for fcc
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_fcc_Nslip), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_fcc_Nslip), parameter, private :: &
|
||||||
LATTICE_fcc_systemSlip = reshape(real([&
|
LATTICE_fcc_systemSlip = reshape(real([&
|
||||||
! Slip direction Plane normal
|
! Slip direction Plane normal
|
||||||
|
@ -254,10 +254,10 @@ module lattice
|
||||||
2,2,2,2,2,2,2,2,2,1,1,1, &
|
2,2,2,2,2,2,2,2,2,1,1,1, &
|
||||||
2,2,2,2,2,2,2,2,2,1,1,1 &
|
2,2,2,2,2,2,2,2,2,1,1,1 &
|
||||||
],pInt),[LATTICE_fcc_Ntrans,LATTICE_fcc_Ntrans],order=[2,1]) !< Trans--trans interaction types for fcc
|
],pInt),[LATTICE_fcc_Ntrans,LATTICE_fcc_Ntrans],order=[2,1]) !< Trans--trans interaction types for fcc
|
||||||
|
|
||||||
real(pReal), dimension(LATTICE_fcc_Ntrans), parameter, private :: &
|
real(pReal), dimension(LATTICE_fcc_Ntrans), parameter, private :: &
|
||||||
LATTICE_fccTohex_shearTrans = sqrt(2.0_pReal)/4.0_pReal
|
LATTICE_fccTohex_shearTrans = sqrt(2.0_pReal)/4.0_pReal
|
||||||
|
|
||||||
real(pReal), dimension(4,LATTICE_fcc_Ntrans), parameter, private :: &
|
real(pReal), dimension(4,LATTICE_fcc_Ntrans), parameter, private :: &
|
||||||
LATTICE_fccTobcc_systemTrans = reshape([&
|
LATTICE_fccTobcc_systemTrans = reshape([&
|
||||||
0.0, 1.0, 0.0, 10.26, & ! Pitsch OR (Ma & Hartmaier 2014, Table 3)
|
0.0, 1.0, 0.0, 10.26, & ! Pitsch OR (Ma & Hartmaier 2014, Table 3)
|
||||||
|
@ -287,7 +287,7 @@ module lattice
|
||||||
0, 0, 1, 1, 0, 0, 0, 1, 0, &
|
0, 0, 1, 1, 0, 0, 0, 1, 0, &
|
||||||
0, 0, 1, 1, 0, 0, 0, 1, 0, &
|
0, 0, 1, 1, 0, 0, 0, 1, 0, &
|
||||||
0, 0, 1, 1, 0, 0, 0, 1, 0, &
|
0, 0, 1, 1, 0, 0, 0, 1, 0, &
|
||||||
0, 0, 1, 1, 0, 0, 0, 1, 0 &
|
0, 0, 1, 1, 0, 0, 0, 1, 0 &
|
||||||
],pInt),[ 9_pInt, LATTICE_fcc_Ntrans])
|
],pInt),[ 9_pInt, LATTICE_fcc_Ntrans])
|
||||||
|
|
||||||
real(pReal), dimension(4,LATTICE_fcc_Ntrans), parameter, private :: &
|
real(pReal), dimension(4,LATTICE_fcc_Ntrans), parameter, private :: &
|
||||||
|
@ -308,7 +308,7 @@ module lattice
|
||||||
|
|
||||||
real(pReal), dimension(LATTICE_fcc_Ntrans,LATTICE_fcc_Ntrans), parameter, private :: & ! Matrix for projection of shear from slip system to fault-band (twin) systems
|
real(pReal), dimension(LATTICE_fcc_Ntrans,LATTICE_fcc_Ntrans), parameter, private :: & ! Matrix for projection of shear from slip system to fault-band (twin) systems
|
||||||
LATTICE_fccTobcc_projectionTrans = reshape(real([& ! For ns = nt = nr
|
LATTICE_fccTobcc_projectionTrans = reshape(real([& ! For ns = nt = nr
|
||||||
0, 1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
|
0, 1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
|
||||||
-1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
|
-1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
|
||||||
1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
|
1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
|
||||||
0, 0, 0, 0, 1,-1, 0, 0, 0, 0, 0, 0, &
|
0, 0, 0, 0, 1,-1, 0, 0, 0, 0, 0, 0, &
|
||||||
|
@ -357,10 +357,10 @@ module lattice
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ncleavage])
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ncleavage])
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! body centered cubic
|
! body centered cubic
|
||||||
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
|
||||||
LATTICE_bcc_NslipSystem = int([ 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], pInt) !< # of slip systems per family for bcc
|
LATTICE_bcc_NslipSystem = int([ 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], pInt) !< # of slip systems per family for bcc
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
|
||||||
LATTICE_bcc_NtwinSystem = int([ 12, 0, 0, 0], pInt) !< # of twin systems per family for bcc
|
LATTICE_bcc_NtwinSystem = int([ 12, 0, 0, 0], pInt) !< # of twin systems per family for bcc
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ module lattice
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
||||||
LATTICE_bcc_NcleavageSystem = int([3,6,0],pInt) !< # of cleavage systems per family for bcc
|
LATTICE_bcc_NcleavageSystem = int([3,6,0],pInt) !< # of cleavage systems per family for bcc
|
||||||
|
|
||||||
integer(pInt), parameter, private :: &
|
integer(pInt), parameter, private :: &
|
||||||
LATTICE_bcc_Nslip = 24_pInt, & !sum(lattice_bcc_NslipSystem), & !< total # of slip systems for bcc
|
LATTICE_bcc_Nslip = 24_pInt, & !sum(lattice_bcc_NslipSystem), & !< total # of slip systems for bcc
|
||||||
LATTICE_bcc_Ntwin = 12_pInt, & !sum(lattice_bcc_NtwinSystem), & !< total # of twin systems for bcc
|
LATTICE_bcc_Ntwin = 12_pInt, & !sum(lattice_bcc_NtwinSystem), & !< total # of twin systems for bcc
|
||||||
|
@ -380,7 +380,7 @@ module lattice
|
||||||
real(pReal), dimension(3+3,LATTICE_bcc_Nslip), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_bcc_Nslip), parameter, private :: &
|
||||||
LATTICE_bcc_systemSlip = reshape(real([&
|
LATTICE_bcc_systemSlip = reshape(real([&
|
||||||
! Slip direction Plane normal
|
! Slip direction Plane normal
|
||||||
! Slip system <111>{110}
|
! Slip system <111>{110}
|
||||||
1,-1, 1, 0, 1, 1, &
|
1,-1, 1, 0, 1, 1, &
|
||||||
-1,-1, 1, 0, 1, 1, &
|
-1,-1, 1, 0, 1, 1, &
|
||||||
1, 1, 1, 0,-1, 1, &
|
1, 1, 1, 0,-1, 1, &
|
||||||
|
@ -455,7 +455,7 @@ module lattice
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_bcc_Nslip,LATTICE_bcc_Nslip), parameter, public :: &
|
integer(pInt), dimension(LATTICE_bcc_Nslip,LATTICE_bcc_Nslip), parameter, public :: &
|
||||||
LATTICE_bcc_interactionSlipSlip = reshape(int( [&
|
LATTICE_bcc_interactionSlipSlip = reshape(int( [&
|
||||||
1,2,6,6,5,4,4,3,4,3,5,4, 6,6,4,3,3,4,6,6,4,3,6,6, & ! ---> slip
|
1,2,6,6,5,4,4,3,4,3,5,4, 6,6,4,3,3,4,6,6,4,3,6,6, & ! ---> slip
|
||||||
2,1,6,6,4,3,5,4,5,4,4,3, 6,6,3,4,4,3,6,6,3,4,6,6, & ! |
|
2,1,6,6,4,3,5,4,5,4,4,3, 6,6,3,4,4,3,6,6,3,4,6,6, & ! |
|
||||||
6,6,1,2,4,5,3,4,4,5,3,4, 4,3,6,6,6,6,3,4,6,6,4,3, & ! |
|
6,6,1,2,4,5,3,4,4,5,3,4, 4,3,6,6,6,6,3,4,6,6,4,3, & ! |
|
||||||
6,6,2,1,3,4,4,5,3,4,4,5, 3,4,6,6,6,6,4,3,6,6,3,4, & ! v slip
|
6,6,2,1,3,4,4,5,3,4,4,5, 3,4,6,6,6,6,4,3,6,6,3,4, & ! v slip
|
||||||
|
@ -492,7 +492,7 @@ module lattice
|
||||||
3,3,3,2,2,3,3,3,3,2,3,3, & ! ---> twin
|
3,3,3,2,2,3,3,3,3,2,3,3, & ! ---> twin
|
||||||
3,3,2,3,3,2,3,3,2,3,3,3, & ! |
|
3,3,2,3,3,2,3,3,2,3,3,3, & ! |
|
||||||
3,2,3,3,3,3,2,3,3,3,3,2, & ! |
|
3,2,3,3,3,3,2,3,3,3,3,2, & ! |
|
||||||
2,3,3,3,3,3,3,2,3,3,2,3, & ! v slip
|
2,3,3,3,3,3,3,2,3,3,2,3, & ! v slip
|
||||||
2,3,3,3,3,3,3,2,3,3,2,3, &
|
2,3,3,3,3,3,3,2,3,3,2,3, &
|
||||||
3,3,2,3,3,2,3,3,2,3,3,3, &
|
3,3,2,3,3,2,3,3,2,3,3,3, &
|
||||||
3,2,3,3,3,3,2,3,3,3,3,2, &
|
3,2,3,3,3,3,2,3,3,3,3,2, &
|
||||||
|
@ -556,17 +556,17 @@ module lattice
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! hexagonal
|
! hexagonal
|
||||||
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
|
||||||
lattice_hex_NslipSystem = int([ 3, 3, 3, 6, 12, 6, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for hex
|
lattice_hex_NslipSystem = int([ 3, 3, 3, 6, 12, 6, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for hex
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
|
||||||
lattice_hex_NtwinSystem = int([ 6, 6, 6, 6],pInt) !< # of slip systems per family for hex
|
lattice_hex_NtwinSystem = int([ 6, 6, 6, 6],pInt) !< # of slip systems per family for hex
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNtransFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNtransFamily), parameter, public :: &
|
||||||
LATTICE_hex_NtransSystem = int([0,0],pInt) !< # of transformation systems per family for hex
|
LATTICE_hex_NtransSystem = int([0,0],pInt) !< # of transformation systems per family for hex
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
||||||
LATTICE_hex_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for hex
|
LATTICE_hex_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for hex
|
||||||
|
|
||||||
integer(pInt), parameter, private :: &
|
integer(pInt), parameter, private :: &
|
||||||
LATTICE_hex_Nslip = 33_pInt, & !sum(lattice_hex_NslipSystem), & !< total # of slip systems for hex
|
LATTICE_hex_Nslip = 33_pInt, & !sum(lattice_hex_NslipSystem), & !< total # of slip systems for hex
|
||||||
LATTICE_hex_Ntwin = 24_pInt, & !sum(lattice_hex_NtwinSystem), & !< total # of twin systems for hex
|
LATTICE_hex_Ntwin = 24_pInt, & !sum(lattice_hex_NtwinSystem), & !< total # of twin systems for hex
|
||||||
|
@ -577,26 +577,26 @@ module lattice
|
||||||
real(pReal), dimension(4+4,LATTICE_hex_Nslip), parameter, private :: &
|
real(pReal), dimension(4+4,LATTICE_hex_Nslip), parameter, private :: &
|
||||||
LATTICE_hex_systemSlip = reshape(real([&
|
LATTICE_hex_systemSlip = reshape(real([&
|
||||||
! Slip direction Plane normal
|
! Slip direction Plane normal
|
||||||
! Basal systems <11.0>{00.1} (independent of c/a-ratio, Bravais notation (4 coordinate base))
|
! Basal systems <11.0>{00.1} (independent of c/a-ratio, Bravais notation (4 coordinate base))
|
||||||
2, -1, -1, 0, 0, 0, 0, 1, &
|
2, -1, -1, 0, 0, 0, 0, 1, &
|
||||||
-1, 2, -1, 0, 0, 0, 0, 1, &
|
-1, 2, -1, 0, 0, 0, 0, 1, &
|
||||||
-1, -1, 2, 0, 0, 0, 0, 1, &
|
-1, -1, 2, 0, 0, 0, 0, 1, &
|
||||||
! 1st type prismatic systems <11.0>{10.0} (independent of c/a-ratio)
|
! 1st type prismatic systems <11.0>{10.0} (independent of c/a-ratio)
|
||||||
2, -1, -1, 0, 0, 1, -1, 0, &
|
2, -1, -1, 0, 0, 1, -1, 0, &
|
||||||
-1, 2, -1, 0, -1, 0, 1, 0, &
|
-1, 2, -1, 0, -1, 0, 1, 0, &
|
||||||
-1, -1, 2, 0, 1, -1, 0, 0, &
|
-1, -1, 2, 0, 1, -1, 0, 0, &
|
||||||
! 2nd type prismatic systems <10.0>{11.0} -- a slip; plane normals independent of c/a-ratio
|
! 2nd type prismatic systems <10.0>{11.0} -- a slip; plane normals independent of c/a-ratio
|
||||||
0, 1, -1, 0, 2, -1, -1, 0, &
|
0, 1, -1, 0, 2, -1, -1, 0, &
|
||||||
-1, 0, 1, 0, -1, 2, -1, 0, &
|
-1, 0, 1, 0, -1, 2, -1, 0, &
|
||||||
1, -1, 0, 0, -1, -1, 2, 0, &
|
1, -1, 0, 0, -1, -1, 2, 0, &
|
||||||
! 1st type 1st order pyramidal systems <11.0>{-11.1} -- plane normals depend on the c/a-ratio
|
! 1st type 1st order pyramidal systems <11.0>{-11.1} -- plane normals depend on the c/a-ratio
|
||||||
2, -1, -1, 0, 0, 1, -1, 1, &
|
2, -1, -1, 0, 0, 1, -1, 1, &
|
||||||
-1, 2, -1, 0, -1, 0, 1, 1, &
|
-1, 2, -1, 0, -1, 0, 1, 1, &
|
||||||
-1, -1, 2, 0, 1, -1, 0, 1, &
|
-1, -1, 2, 0, 1, -1, 0, 1, &
|
||||||
1, 1, -2, 0, -1, 1, 0, 1, &
|
1, 1, -2, 0, -1, 1, 0, 1, &
|
||||||
-2, 1, 1, 0, 0, -1, 1, 1, &
|
-2, 1, 1, 0, 0, -1, 1, 1, &
|
||||||
1, -2, 1, 0, 1, 0, -1, 1, &
|
1, -2, 1, 0, 1, 0, -1, 1, &
|
||||||
! pyramidal system: c+a slip <11.3>{-10.1} -- plane normals depend on the c/a-ratio
|
! pyramidal system: c+a slip <11.3>{-10.1} -- plane normals depend on the c/a-ratio
|
||||||
2, -1, -1, 3, -1, 1, 0, 1, &
|
2, -1, -1, 3, -1, 1, 0, 1, &
|
||||||
1, -2, 1, 3, -1, 1, 0, 1, &
|
1, -2, 1, 3, -1, 1, 0, 1, &
|
||||||
-1, -1, 2, 3, 1, 0, -1, 1, &
|
-1, -1, 2, 3, 1, 0, -1, 1, &
|
||||||
|
@ -609,7 +609,7 @@ module lattice
|
||||||
2, -1, -1, 3, -1, 0, 1, 1, &
|
2, -1, -1, 3, -1, 0, 1, 1, &
|
||||||
1, -2, 1, 3, 0, 1, -1, 1, &
|
1, -2, 1, 3, 0, 1, -1, 1, &
|
||||||
-1, -1, 2, 3, 0, 1, -1, 1, &
|
-1, -1, 2, 3, 0, 1, -1, 1, &
|
||||||
! pyramidal system: c+a slip <11.3>{-1-1.2} -- as for hexagonal ice (Castelnau et al. 1996, similar to twin system found below)
|
! pyramidal system: c+a slip <11.3>{-1-1.2} -- as for hexagonal ice (Castelnau et al. 1996, similar to twin system found below)
|
||||||
2, -1, -1, 3, -2, 1, 1, 2, & ! sorted according to similar twin system
|
2, -1, -1, 3, -2, 1, 1, 2, & ! sorted according to similar twin system
|
||||||
-1, 2, -1, 3, 1, -2, 1, 2, & ! <11.3>{-1-1.2} shear = 2((c/a)^2-2)/(3 c/a)
|
-1, 2, -1, 3, 1, -2, 1, 2, & ! <11.3>{-1-1.2} shear = 2((c/a)^2-2)/(3 c/a)
|
||||||
-1, -1, 2, 3, 1, 1, -2, 2, &
|
-1, -1, 2, 3, 1, 1, -2, 2, &
|
||||||
|
@ -648,7 +648,7 @@ module lattice
|
||||||
-2, 1, 1, -3, -2, 1, 1, 2, &
|
-2, 1, 1, -3, -2, 1, 1, 2, &
|
||||||
1, -2, 1, -3, 1, -2, 1, 2, &
|
1, -2, 1, -3, 1, -2, 1, 2, &
|
||||||
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
|
||||||
|
|
||||||
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
|
||||||
|
@ -677,7 +677,7 @@ module lattice
|
||||||
4, &
|
4, &
|
||||||
4 &
|
4 &
|
||||||
],pInt),[LATTICE_hex_Ntwin])
|
],pInt),[LATTICE_hex_Ntwin])
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_hex_Nslip,LATTICE_hex_Nslip), parameter, public :: &
|
integer(pInt), dimension(LATTICE_hex_Nslip,LATTICE_hex_Nslip), parameter, public :: &
|
||||||
LATTICE_hex_interactionSlipSlip = reshape(int( [&
|
LATTICE_hex_interactionSlipSlip = reshape(int( [&
|
||||||
1, 2, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! ---> slip
|
1, 2, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! ---> slip
|
||||||
|
@ -717,10 +717,10 @@ module lattice
|
||||||
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,36,37,37,37, &
|
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,36,37,37,37, &
|
||||||
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,36,37,37, &
|
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,36,37,37, &
|
||||||
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,36,37, &
|
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,36,37, &
|
||||||
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,37,36 &
|
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,37,36 &
|
||||||
!
|
!
|
||||||
],pInt),[LATTICE_hex_Nslip,LATTICE_hex_Nslip],order=[2,1]) !< Slip--slip interaction types for hex (onion peel naming scheme)
|
],pInt),[LATTICE_hex_Nslip,LATTICE_hex_Nslip],order=[2,1]) !< Slip--slip interaction types for hex (onion peel naming scheme)
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_hex_Nslip,LATTICE_hex_Ntwin), parameter, public :: &
|
integer(pInt), dimension(LATTICE_hex_Nslip,LATTICE_hex_Ntwin), parameter, public :: &
|
||||||
LATTICE_hex_interactionSlipTwin = reshape(int( [&
|
LATTICE_hex_interactionSlipTwin = reshape(int( [&
|
||||||
1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! --> twin
|
1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! --> twin
|
||||||
|
@ -728,7 +728,7 @@ module lattice
|
||||||
1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! |
|
1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! |
|
||||||
! v
|
! v
|
||||||
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & ! slip
|
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & ! slip
|
||||||
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, &
|
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, &
|
||||||
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, &
|
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, &
|
||||||
!
|
!
|
||||||
9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, &
|
9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, &
|
||||||
|
@ -762,7 +762,7 @@ module lattice
|
||||||
21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, &
|
21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, &
|
||||||
21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24 &
|
21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24 &
|
||||||
!
|
!
|
||||||
],pInt),[LATTICE_hex_Nslip,LATTICE_hex_Ntwin],order=[2,1]) !< Slip--twin interaction types for hex (isotropic, 24 in total)
|
],pInt),[LATTICE_hex_Nslip,LATTICE_hex_Ntwin],order=[2,1]) !< Slip--twin interaction types for hex (isotropic, 24 in total)
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_hex_Ntwin,LATTICE_hex_Nslip), parameter, public :: &
|
integer(pInt), dimension(LATTICE_hex_Ntwin,LATTICE_hex_Nslip), parameter, public :: &
|
||||||
LATTICE_hex_interactionTwinSlip = reshape(int( [&
|
LATTICE_hex_interactionTwinSlip = reshape(int( [&
|
||||||
|
@ -848,14 +848,14 @@ module lattice
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
||||||
LATTICE_bct_NcleavageSystem = int([0,0,0],pInt) !< # of cleavage systems per family for bct
|
LATTICE_bct_NcleavageSystem = int([0,0,0],pInt) !< # of cleavage systems per family for bct
|
||||||
|
|
||||||
integer(pInt), parameter, private :: &
|
integer(pInt), parameter, private :: &
|
||||||
LATTICE_bct_Nslip = 52_pInt, & !sum(lattice_bct_NslipSystem), & !< total # of slip systems for bct
|
LATTICE_bct_Nslip = 52_pInt, & !sum(lattice_bct_NslipSystem), & !< total # of slip systems for bct
|
||||||
LATTICE_bct_Ntwin = 0_pInt, & !sum(lattice_bct_NtwinSystem), & !< total # of twin systems for bct
|
LATTICE_bct_Ntwin = 0_pInt, & !sum(lattice_bct_NtwinSystem), & !< total # of twin systems for bct
|
||||||
LATTICE_bct_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for bct
|
LATTICE_bct_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for bct
|
||||||
LATTICE_bct_Ntrans = 0_pInt, & !sum(lattice_bct_NtransSystem), & !< total # of transformation systems for bct
|
LATTICE_bct_Ntrans = 0_pInt, & !sum(lattice_bct_NtransSystem), & !< total # of transformation systems for bct
|
||||||
LATTICE_bct_Ncleavage = 0_pInt !sum(lattice_bct_NcleavageSystem) !< total # of cleavage systems for bct
|
LATTICE_bct_Ncleavage = 0_pInt !sum(lattice_bct_NcleavageSystem) !< total # of cleavage systems for bct
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_bct_Nslip), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_bct_Nslip), parameter, private :: &
|
||||||
LATTICE_bct_systemSlip = reshape(real([&
|
LATTICE_bct_systemSlip = reshape(real([&
|
||||||
! Slip direction Plane normal
|
! Slip direction Plane normal
|
||||||
|
@ -865,7 +865,7 @@ module lattice
|
||||||
! Slip family 2 {110)<001]
|
! Slip family 2 {110)<001]
|
||||||
0, 0, 1, 1, 1, 0, &
|
0, 0, 1, 1, 1, 0, &
|
||||||
0, 0, 1, -1, 1, 0, &
|
0, 0, 1, -1, 1, 0, &
|
||||||
! slip family 3 {100)<010]
|
! slip family 3 {100)<010]
|
||||||
0, 1, 0, 1, 0, 0, &
|
0, 1, 0, 1, 0, 0, &
|
||||||
1, 0, 0, 0, 1, 0, &
|
1, 0, 0, 0, 1, 0, &
|
||||||
! Slip family 4 {110)<1-11]/2
|
! Slip family 4 {110)<1-11]/2
|
||||||
|
@ -876,54 +876,54 @@ module lattice
|
||||||
! Slip family 5 {110)<1-10]
|
! Slip family 5 {110)<1-10]
|
||||||
1, -1, 0, 1, 1, 0, &
|
1, -1, 0, 1, 1, 0, &
|
||||||
1, 1, 0, 1,-1, 0, &
|
1, 1, 0, 1,-1, 0, &
|
||||||
! Slip family 6 {100)<011]
|
! Slip family 6 {100)<011]
|
||||||
0, 1, 1, 1, 0, 0, &
|
0, 1, 1, 1, 0, 0, &
|
||||||
0,-1, 1, 1, 0, 0, &
|
0,-1, 1, 1, 0, 0, &
|
||||||
-1, 0, 1, 0, 1, 0, &
|
-1, 0, 1, 0, 1, 0, &
|
||||||
1, 0, 1, 0, 1, 0, &
|
1, 0, 1, 0, 1, 0, &
|
||||||
! Slip family 7 {001)<010]
|
! Slip family 7 {001)<010]
|
||||||
0, 1, 0, 0, 0, 1, &
|
0, 1, 0, 0, 0, 1, &
|
||||||
1, 0, 0, 0, 0, 1, &
|
1, 0, 0, 0, 0, 1, &
|
||||||
! Slip family 8 {001)<110]
|
! Slip family 8 {001)<110]
|
||||||
1, 1, 0, 0, 0, 1, &
|
1, 1, 0, 0, 0, 1, &
|
||||||
-1, 1, 0, 0, 0, 1, &
|
-1, 1, 0, 0, 0, 1, &
|
||||||
! Slip family 9 {011)<01-1]
|
! Slip family 9 {011)<01-1]
|
||||||
0, 1,-1, 0, 1, 1, &
|
0, 1,-1, 0, 1, 1, &
|
||||||
0,-1,-1, 0,-1, 1, &
|
0,-1,-1, 0,-1, 1, &
|
||||||
-1, 0,-1, -1, 0, 1, &
|
-1, 0,-1, -1, 0, 1, &
|
||||||
1, 0,-1, 1, 0, 1, &
|
1, 0,-1, 1, 0, 1, &
|
||||||
! Slip family 10 {011)<1-11]/2
|
! Slip family 10 {011)<1-11]/2
|
||||||
1,-1, 1, 0, 1, 1, &
|
1,-1, 1, 0, 1, 1, &
|
||||||
1, 1,-1, 0, 1, 1, &
|
1, 1,-1, 0, 1, 1, &
|
||||||
1, 1, 1, 0, 1,-1, &
|
1, 1, 1, 0, 1,-1, &
|
||||||
-1, 1, 1, 0, 1,-1, &
|
-1, 1, 1, 0, 1,-1, &
|
||||||
1,-1,-1, 1, 0, 1, &
|
1,-1,-1, 1, 0, 1, &
|
||||||
-1,-1, 1, 1, 0, 1, &
|
-1,-1, 1, 1, 0, 1, &
|
||||||
1, 1, 1, 1, 0,-1, &
|
1, 1, 1, 1, 0,-1, &
|
||||||
1,-1, 1, 1, 0,-1, &
|
1,-1, 1, 1, 0,-1, &
|
||||||
! Slip family 11 {011)<100]
|
! Slip family 11 {011)<100]
|
||||||
1, 0, 0, 0, 1, 1, &
|
1, 0, 0, 0, 1, 1, &
|
||||||
1, 0, 0, 0, 1,-1, &
|
1, 0, 0, 0, 1,-1, &
|
||||||
0, 1, 0, 1, 0, 1, &
|
0, 1, 0, 1, 0, 1, &
|
||||||
0, 1, 0, 1, 0,-1, &
|
0, 1, 0, 1, 0,-1, &
|
||||||
! Slip family 12 {211)<01-1]
|
! Slip family 12 {211)<01-1]
|
||||||
0, 1,-1, 2, 1, 1, &
|
0, 1,-1, 2, 1, 1, &
|
||||||
0,-1,-1, 2,-1, 1, &
|
0,-1,-1, 2,-1, 1, &
|
||||||
1, 0,-1, 1, 2, 1, &
|
1, 0,-1, 1, 2, 1, &
|
||||||
-1, 0,-1, -1, 2, 1, &
|
-1, 0,-1, -1, 2, 1, &
|
||||||
0, 1,-1, -2, 1, 1, &
|
0, 1,-1, -2, 1, 1, &
|
||||||
0,-1,-1, -2,-1, 1, &
|
0,-1,-1, -2,-1, 1, &
|
||||||
-1, 0,-1, -1,-2, 1, &
|
-1, 0,-1, -1,-2, 1, &
|
||||||
1, 0,-1, 1,-2, 1, &
|
1, 0,-1, 1,-2, 1, &
|
||||||
! Slip family 13 {211)<-111]/2
|
! Slip family 13 {211)<-111]/2
|
||||||
-1, 1, 1, 2, 1, 1, &
|
-1, 1, 1, 2, 1, 1, &
|
||||||
-1,-1, 1, 2,-1, 1, &
|
-1,-1, 1, 2,-1, 1, &
|
||||||
1,-1, 1, 1, 2, 1, &
|
1,-1, 1, 1, 2, 1, &
|
||||||
-1,-1, 1, -1, 2, 1, &
|
-1,-1, 1, -1, 2, 1, &
|
||||||
1, 1, 1, -2, 1, 1, &
|
1, 1, 1, -2, 1, 1, &
|
||||||
1,-1, 1, -2,-1, 1, &
|
1,-1, 1, -2,-1, 1, &
|
||||||
-1, 1, 1, -1,-2, 1, &
|
-1, 1, 1, -1,-2, 1, &
|
||||||
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
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: &
|
integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: &
|
||||||
|
@ -933,7 +933,7 @@ module lattice
|
||||||
!
|
!
|
||||||
6, 6, 4, 5, 8, 8, 14, 14, 14, 14, 22, 22, 32, 32, 32, 32, 44, 44, 58, 58, 74, 74, 74, 74, 92, 92, 92, 92, 92, 92, 92, 92, 112, 112, 112, 112, 134,134,134,134,134,134,134,134, 158,158,158,158,158,158,158,158, &
|
6, 6, 4, 5, 8, 8, 14, 14, 14, 14, 22, 22, 32, 32, 32, 32, 44, 44, 58, 58, 74, 74, 74, 74, 92, 92, 92, 92, 92, 92, 92, 92, 112, 112, 112, 112, 134,134,134,134,134,134,134,134, 158,158,158,158,158,158,158,158, &
|
||||||
6, 6, 5, 4, 8, 8, 14, 14, 14, 14, 22, 22, 32, 32, 32, 32, 44, 44, 58, 58, 74, 74, 74, 74, 92, 92, 92, 92, 92, 92, 92, 92, 112, 112, 112, 112, 134,134,134,134,134,134,134,134, 158,158,158,158,158,158,158,158, &
|
6, 6, 5, 4, 8, 8, 14, 14, 14, 14, 22, 22, 32, 32, 32, 32, 44, 44, 58, 58, 74, 74, 74, 74, 92, 92, 92, 92, 92, 92, 92, 92, 112, 112, 112, 112, 134,134,134,134,134,134,134,134, 158,158,158,158,158,158,158,158, &
|
||||||
!
|
!
|
||||||
12, 12, 11, 11, 9, 10, 15, 15, 15, 15, 23, 23, 33, 33, 33, 33, 45, 45, 59, 59, 75, 75, 75, 75, 93, 93, 93, 93, 93, 93, 93, 93, 113, 113, 113, 113, 135,135,135,135,135,135,135,135, 159,159,159,159,159,159,159,159, &
|
12, 12, 11, 11, 9, 10, 15, 15, 15, 15, 23, 23, 33, 33, 33, 33, 45, 45, 59, 59, 75, 75, 75, 75, 93, 93, 93, 93, 93, 93, 93, 93, 113, 113, 113, 113, 135,135,135,135,135,135,135,135, 159,159,159,159,159,159,159,159, &
|
||||||
12, 12, 11, 11, 10, 9, 15, 15, 15, 15, 23, 23, 33, 33, 33, 33, 45, 45, 59, 59, 75, 75, 75, 75, 93, 93, 93, 93, 93, 93, 93, 93, 113, 113, 113, 113, 135,135,135,135,135,135,135,135, 159,159,159,159,159,159,159,159, &
|
12, 12, 11, 11, 10, 9, 15, 15, 15, 15, 23, 23, 33, 33, 33, 33, 45, 45, 59, 59, 75, 75, 75, 75, 93, 93, 93, 93, 93, 93, 93, 93, 113, 113, 113, 113, 135,135,135,135,135,135,135,135, 159,159,159,159,159,159,159,159, &
|
||||||
!
|
!
|
||||||
|
@ -993,7 +993,7 @@ module lattice
|
||||||
182,182, 181,181, 180,180, 179,179,179,179, 178,178, 177,177,177,177, 176,176, 175,175, 174,174,174,174, 173,173,173,173,173,173,173,173, 172, 172, 172, 172, 171,171,171,171,171,171,171,171, 169,170,170,170,170,170,169,170, &
|
182,182, 181,181, 180,180, 179,179,179,179, 178,178, 177,177,177,177, 176,176, 175,175, 174,174,174,174, 173,173,173,173,173,173,173,173, 172, 172, 172, 172, 171,171,171,171,171,171,171,171, 169,170,170,170,170,170,169,170, &
|
||||||
182,182, 181,181, 180,180, 179,179,179,179, 178,178, 177,177,177,177, 176,176, 175,175, 174,174,174,174, 173,173,173,173,173,173,173,173, 172, 172, 172, 172, 171,171,171,171,171,171,171,171, 169,170,170,170,170,170,170,169 &
|
182,182, 181,181, 180,180, 179,179,179,179, 178,178, 177,177,177,177, 176,176, 175,175, 174,174,174,174, 173,173,173,173,173,173,173,173, 172, 172, 172, 172, 171,171,171,171,171,171,171,171, 169,170,170,170,170,170,170,169 &
|
||||||
|
|
||||||
],pInt),[lattice_bct_Nslip,lattice_bct_Nslip],order=[2,1])
|
],pInt),[lattice_bct_Nslip,lattice_bct_Nslip],order=[2,1])
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! isotropic
|
! isotropic
|
||||||
|
@ -1008,14 +1008,14 @@ module lattice
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
||||||
LATTICE_iso_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for iso
|
LATTICE_iso_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for iso
|
||||||
|
|
||||||
integer(pInt), parameter, private :: &
|
integer(pInt), parameter, private :: &
|
||||||
LATTICE_iso_Nslip = 0_pInt, & !sum(lattice_iso_NslipSystem), & !< total # of slip systems for iso
|
LATTICE_iso_Nslip = 0_pInt, & !sum(lattice_iso_NslipSystem), & !< total # of slip systems for iso
|
||||||
LATTICE_iso_Ntwin = 0_pInt, & !sum(lattice_iso_NtwinSystem), & !< total # of twin systems for iso
|
LATTICE_iso_Ntwin = 0_pInt, & !sum(lattice_iso_NtwinSystem), & !< total # of twin systems for iso
|
||||||
LATTICE_iso_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for iso
|
LATTICE_iso_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for iso
|
||||||
LATTICE_iso_Ntrans = 0_pInt, & !sum(lattice_iso_NtransSystem), & !< total # of transformation systems for iso
|
LATTICE_iso_Ntrans = 0_pInt, & !sum(lattice_iso_NtransSystem), & !< total # of transformation systems for iso
|
||||||
LATTICE_iso_Ncleavage = 3_pInt !sum(lattice_iso_NcleavageSystem) !< total # of cleavage systems for iso
|
LATTICE_iso_Ncleavage = 3_pInt !sum(lattice_iso_NcleavageSystem) !< total # of cleavage systems for iso
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_iso_Ncleavage), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_iso_Ncleavage), parameter, private :: &
|
||||||
LATTICE_iso_systemCleavage = reshape(real([&
|
LATTICE_iso_systemCleavage = reshape(real([&
|
||||||
! Cleavage direction Plane normal
|
! Cleavage direction Plane normal
|
||||||
|
@ -1037,14 +1037,14 @@ module lattice
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
|
||||||
LATTICE_ortho_NcleavageSystem = int([1,1,1],pInt) !< # of cleavage systems per family for ortho
|
LATTICE_ortho_NcleavageSystem = int([1,1,1],pInt) !< # of cleavage systems per family for ortho
|
||||||
|
|
||||||
integer(pInt), parameter, private :: &
|
integer(pInt), parameter, private :: &
|
||||||
LATTICE_ortho_Nslip = 0_pInt, & !sum(lattice_ortho_NslipSystem), & !< total # of slip systems for ortho
|
LATTICE_ortho_Nslip = 0_pInt, & !sum(lattice_ortho_NslipSystem), & !< total # of slip systems for ortho
|
||||||
LATTICE_ortho_Ntwin = 0_pInt, & !sum(lattice_ortho_NtwinSystem), & !< total # of twin systems for ortho
|
LATTICE_ortho_Ntwin = 0_pInt, & !sum(lattice_ortho_NtwinSystem), & !< total # of twin systems for ortho
|
||||||
LATTICE_ortho_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for ortho
|
LATTICE_ortho_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for ortho
|
||||||
LATTICE_ortho_Ntrans = 0_pInt, & !sum(lattice_ortho_NtransSystem), & !< total # of transformation systems for ortho
|
LATTICE_ortho_Ntrans = 0_pInt, & !sum(lattice_ortho_NtransSystem), & !< total # of transformation systems for ortho
|
||||||
LATTICE_ortho_Ncleavage = 3_pInt !sum(lattice_ortho_NcleavageSystem) !< total # of cleavage systems for ortho
|
LATTICE_ortho_Ncleavage = 3_pInt !sum(lattice_ortho_NcleavageSystem) !< total # of cleavage systems for ortho
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_ortho_Ncleavage), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_ortho_Ncleavage), parameter, private :: &
|
||||||
LATTICE_ortho_systemCleavage = reshape(real([&
|
LATTICE_ortho_systemCleavage = reshape(real([&
|
||||||
! Cleavage direction Plane normal
|
! Cleavage direction Plane normal
|
||||||
|
@ -1075,14 +1075,14 @@ module lattice
|
||||||
|
|
||||||
real(pReal), dimension(:,:,:), allocatable, public, protected :: &
|
real(pReal), dimension(:,:,:), allocatable, public, protected :: &
|
||||||
lattice_C66, lattice_trans_C66
|
lattice_C66, lattice_trans_C66
|
||||||
real(pReal), dimension(:,:,:,:,:), allocatable, public, protected :: &
|
real(pReal), dimension(:,:,:,:,:), allocatable, public, protected :: &
|
||||||
lattice_C3333, lattice_trans_C3333
|
lattice_C3333, lattice_trans_C3333
|
||||||
real(pReal), dimension(:), allocatable, public, protected :: &
|
real(pReal), dimension(:), allocatable, public, protected :: &
|
||||||
lattice_mu, &
|
lattice_mu, &
|
||||||
lattice_nu, &
|
lattice_nu, &
|
||||||
lattice_trans_mu, &
|
lattice_trans_mu, &
|
||||||
lattice_trans_nu
|
lattice_trans_nu
|
||||||
real(pReal), dimension(:,:,:), allocatable, public, protected :: &
|
real(pReal), dimension(:,:,:), allocatable, public, protected :: &
|
||||||
lattice_thermalConductivity33, &
|
lattice_thermalConductivity33, &
|
||||||
lattice_thermalExpansion33, &
|
lattice_thermalExpansion33, &
|
||||||
lattice_damageDiffusion33, &
|
lattice_damageDiffusion33, &
|
||||||
|
@ -1091,7 +1091,7 @@ module lattice
|
||||||
lattice_porosityDiffusion33, &
|
lattice_porosityDiffusion33, &
|
||||||
lattice_hydrogenfluxDiffusion33, &
|
lattice_hydrogenfluxDiffusion33, &
|
||||||
lattice_hydrogenfluxMobility33
|
lattice_hydrogenfluxMobility33
|
||||||
real(pReal), dimension(:), allocatable, public, protected :: &
|
real(pReal), dimension(:), allocatable, public, protected :: &
|
||||||
lattice_damageMobility, &
|
lattice_damageMobility, &
|
||||||
lattice_porosityMobility, &
|
lattice_porosityMobility, &
|
||||||
lattice_massDensity, &
|
lattice_massDensity, &
|
||||||
|
@ -1120,7 +1120,7 @@ module lattice
|
||||||
|
|
||||||
|
|
||||||
integer(pInt), dimension(2), parameter, private :: &
|
integer(pInt), dimension(2), parameter, private :: &
|
||||||
lattice_NsymOperations = [24_pInt,12_pInt]
|
lattice_NsymOperations = [24_pInt,12_pInt]
|
||||||
|
|
||||||
real(pReal), dimension(4,36), parameter, private :: &
|
real(pReal), dimension(4,36), parameter, private :: &
|
||||||
lattice_symOperations = reshape([&
|
lattice_symOperations = reshape([&
|
||||||
|
@ -1268,7 +1268,7 @@ subroutine lattice_init
|
||||||
debug_levelBasic
|
debug_levelBasic
|
||||||
use numerics, only: &
|
use numerics, only: &
|
||||||
worldrank
|
worldrank
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
||||||
integer(pInt) :: Nphases
|
integer(pInt) :: Nphases
|
||||||
|
@ -1279,7 +1279,7 @@ subroutine lattice_init
|
||||||
integer(pInt) :: section = 0_pInt,i
|
integer(pInt) :: section = 0_pInt,i
|
||||||
real(pReal), dimension(:), allocatable :: &
|
real(pReal), dimension(:), allocatable :: &
|
||||||
CoverA, & !!!!!!< c/a ratio for low symmetry type lattice
|
CoverA, & !!!!!!< c/a ratio for low symmetry type lattice
|
||||||
CoverA_trans, & !< c/a ratio for transformed hex type lattice
|
CoverA_trans, & !< c/a ratio for transformed hex type lattice
|
||||||
a_fcc, & !< lattice parameter a for fcc austenite
|
a_fcc, & !< lattice parameter a for fcc austenite
|
||||||
a_bcc !< lattice paramater a for bcc martensite
|
a_bcc !< lattice paramater a for bcc martensite
|
||||||
|
|
||||||
|
@ -1371,7 +1371,7 @@ subroutine lattice_init
|
||||||
if (iand(debug_level(debug_lattice),debug_levelBasic) /= 0_pInt) then
|
if (iand(debug_level(debug_lattice),debug_levelBasic) /= 0_pInt) then
|
||||||
write(6,'(a16,1x,i5)') ' # phases:',Nphases
|
write(6,'(a16,1x,i5)') ' # phases:',Nphases
|
||||||
endif
|
endif
|
||||||
|
|
||||||
allocate(lattice_structure(Nphases),source = LATTICE_undefined_ID)
|
allocate(lattice_structure(Nphases),source = LATTICE_undefined_ID)
|
||||||
allocate(trans_lattice_structure(Nphases),source = LATTICE_undefined_ID)
|
allocate(trans_lattice_structure(Nphases),source = LATTICE_undefined_ID)
|
||||||
allocate(lattice_C66(6,6,Nphases), source=0.0_pReal)
|
allocate(lattice_C66(6,6,Nphases), source=0.0_pReal)
|
||||||
|
@ -1459,7 +1459,7 @@ subroutine lattice_init
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
if (IO_isBlank(line)) cycle ! skip empty lines
|
||||||
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
line = IO_read(fileUnit, .true.) ! reset IO_read
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
if (IO_getTag(line,'[',']') /= '') then ! next section
|
if (IO_getTag(line,'[',']') /= '') then ! next section
|
||||||
section = section + 1_pInt
|
section = section + 1_pInt
|
||||||
|
@ -1613,7 +1613,7 @@ subroutine lattice_init
|
||||||
end select
|
end select
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
do i = 1_pInt,Nphases
|
do i = 1_pInt,Nphases
|
||||||
if ((CoverA(i) < 1.0_pReal .or. CoverA(i) > 2.0_pReal) &
|
if ((CoverA(i) < 1.0_pReal .or. CoverA(i) > 2.0_pReal) &
|
||||||
.and. lattice_structure(i) == LATTICE_hex_ID) call IO_error(131_pInt,el=i) ! checking physical significance of c/a
|
.and. lattice_structure(i) == LATTICE_hex_ID) call IO_error(131_pInt,el=i) ! checking physical significance of c/a
|
||||||
|
@ -1650,7 +1650,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_error, &
|
IO_error, &
|
||||||
IO_warning
|
IO_warning
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: myPhase
|
integer(pInt), intent(in) :: myPhase
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
|
@ -1687,7 +1687,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
|
|
||||||
lattice_C66(1:6,1:6,myPhase) = lattice_symmetrizeC66(lattice_structure(myPhase),&
|
lattice_C66(1:6,1:6,myPhase) = lattice_symmetrizeC66(lattice_structure(myPhase),&
|
||||||
lattice_C66(1:6,1:6,myPhase))
|
lattice_C66(1:6,1:6,myPhase))
|
||||||
|
|
||||||
lattice_mu(myPhase) = 0.2_pReal *( lattice_C66(1,1,myPhase) &
|
lattice_mu(myPhase) = 0.2_pReal *( lattice_C66(1,1,myPhase) &
|
||||||
- lattice_C66(1,2,myPhase) &
|
- lattice_C66(1,2,myPhase) &
|
||||||
+ 3.0_pReal*lattice_C66(4,4,myPhase)) ! (C11iso-C12iso)/2 with C11iso=(3*C11+2*C12+4*C44)/5 and C12iso=(C11+4*C12-2*C44)/5
|
+ 3.0_pReal*lattice_C66(4,4,myPhase)) ! (C11iso-C12iso)/2 with C11iso=(3*C11+2*C12+4*C44)/5 and C12iso=(C11+4*C12-2*C44)/5
|
||||||
|
@ -1733,7 +1733,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
lattice_trans_C66(1,3,myPhase) = c13bar
|
lattice_trans_C66(1,3,myPhase) = c13bar
|
||||||
lattice_trans_C66(3,3,myPhase) = c33bar
|
lattice_trans_C66(3,3,myPhase) = c33bar
|
||||||
lattice_trans_C66(4,4,myPhase) = c44bar - B
|
lattice_trans_C66(4,4,myPhase) = c44bar - B
|
||||||
|
|
||||||
lattice_trans_C66(1:6,1:6,myPhase) = lattice_symmetrizeC66(trans_lattice_structure(myPhase),&
|
lattice_trans_C66(1:6,1:6,myPhase) = lattice_symmetrizeC66(trans_lattice_structure(myPhase),&
|
||||||
lattice_trans_C66(1:6,1:6,myPhase))
|
lattice_trans_C66(1:6,1:6,myPhase))
|
||||||
lattice_trans_mu(myPhase) = 0.2_pReal *( lattice_trans_C66(1,1,myPhase) &
|
lattice_trans_mu(myPhase) = 0.2_pReal *( lattice_trans_C66(1,1,myPhase) &
|
||||||
|
@ -1770,7 +1770,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
lattice_hydrogenfluxDiffusion33(1:3,1:3,myPhase))
|
lattice_hydrogenfluxDiffusion33(1:3,1:3,myPhase))
|
||||||
lattice_hydrogenfluxMobility33(1:3,1:3,myPhase) = lattice_symmetrize33(lattice_structure(myPhase),&
|
lattice_hydrogenfluxMobility33(1:3,1:3,myPhase) = lattice_symmetrize33(lattice_structure(myPhase),&
|
||||||
lattice_hydrogenfluxMobility33(1:3,1:3,myPhase))
|
lattice_hydrogenfluxMobility33(1:3,1:3,myPhase))
|
||||||
|
|
||||||
select case(lattice_structure(myPhase))
|
select case(lattice_structure(myPhase))
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! fcc
|
! fcc
|
||||||
|
@ -1782,7 +1782,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
do i = 1_pInt,myNslip ! assign slip system vectors
|
do i = 1_pInt,myNslip ! assign slip system vectors
|
||||||
sd(1:3,i) = lattice_fcc_systemSlip(1:3,i)
|
sd(1:3,i) = lattice_fcc_systemSlip(1:3,i)
|
||||||
sn(1:3,i) = lattice_fcc_systemSlip(4:6,i)
|
sn(1:3,i) = lattice_fcc_systemSlip(4:6,i)
|
||||||
enddo
|
enddo
|
||||||
do i = 1_pInt,myNtwin ! assign twin system vectors and shears
|
do i = 1_pInt,myNtwin ! assign twin system vectors and shears
|
||||||
td(1:3,i) = lattice_fcc_systemTwin(1:3,i)
|
td(1:3,i) = lattice_fcc_systemTwin(1:3,i)
|
||||||
tn(1:3,i) = lattice_fcc_systemTwin(4:6,i)
|
tn(1:3,i) = lattice_fcc_systemTwin(4:6,i)
|
||||||
|
@ -1792,11 +1792,11 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
cd(1:3,i) = lattice_fcc_systemCleavage(1:3,i)/norm2(lattice_fcc_systemCleavage(1:3,i))
|
cd(1:3,i) = lattice_fcc_systemCleavage(1:3,i)/norm2(lattice_fcc_systemCleavage(1:3,i))
|
||||||
cn(1:3,i) = lattice_fcc_systemCleavage(4:6,i)/norm2(lattice_fcc_systemCleavage(4:6,i))
|
cn(1:3,i) = lattice_fcc_systemCleavage(4:6,i)/norm2(lattice_fcc_systemCleavage(4:6,i))
|
||||||
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! Phase transformation
|
! Phase transformation
|
||||||
select case(trans_lattice_structure(myPhase))
|
select case(trans_lattice_structure(myPhase))
|
||||||
case (LATTICE_bcc_ID) ! fcc to bcc transformation
|
case (LATTICE_bcc_ID) ! fcc to bcc transformation
|
||||||
do i = 1_pInt,myNtrans
|
do i = 1_pInt,myNtrans
|
||||||
Rtr(1:3,1:3,i) = math_axisAngleToR(lattice_fccTobcc_systemTrans(1:3,i), & ! Pitsch rotation
|
Rtr(1:3,1:3,i) = math_axisAngleToR(lattice_fccTobcc_systemTrans(1:3,i), & ! Pitsch rotation
|
||||||
lattice_fccTobcc_systemTrans(4,i)*INRAD)
|
lattice_fccTobcc_systemTrans(4,i)*INRAD)
|
||||||
|
@ -1892,7 +1892,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
cd(1:3,i) = lattice_bcc_systemCleavage(1:3,i)/norm2(lattice_bcc_systemCleavage(1:3,i))
|
cd(1:3,i) = lattice_bcc_systemCleavage(1:3,i)/norm2(lattice_bcc_systemCleavage(1:3,i))
|
||||||
cn(1:3,i) = lattice_bcc_systemCleavage(4:6,i)/norm2(lattice_bcc_systemCleavage(4:6,i))
|
cn(1:3,i) = lattice_bcc_systemCleavage(4:6,i)/norm2(lattice_bcc_systemCleavage(4:6,i))
|
||||||
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
||||||
enddo
|
enddo
|
||||||
lattice_NslipSystem(1:lattice_maxNslipFamily,myPhase) = lattice_bcc_NslipSystem
|
lattice_NslipSystem(1:lattice_maxNslipFamily,myPhase) = lattice_bcc_NslipSystem
|
||||||
lattice_NtwinSystem(1:lattice_maxNtwinFamily,myPhase) = lattice_bcc_NtwinSystem
|
lattice_NtwinSystem(1:lattice_maxNtwinFamily,myPhase) = lattice_bcc_NtwinSystem
|
||||||
lattice_NtransSystem(1:lattice_maxNtransFamily,myPhase) = lattice_bcc_NtransSystem
|
lattice_NtransSystem(1:lattice_maxNtransFamily,myPhase) = lattice_bcc_NtransSystem
|
||||||
|
@ -1902,7 +1902,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
lattice_interactionSlipTwin(1:myNslip,1:myNtwin,myPhase) = lattice_bcc_interactionSlipTwin
|
lattice_interactionSlipTwin(1:myNslip,1:myNtwin,myPhase) = lattice_bcc_interactionSlipTwin
|
||||||
lattice_interactionTwinSlip(1:myNtwin,1:myNslip,myPhase) = lattice_bcc_interactionTwinSlip
|
lattice_interactionTwinSlip(1:myNtwin,1:myNslip,myPhase) = lattice_bcc_interactionTwinSlip
|
||||||
lattice_interactionTwinTwin(1:myNtwin,1:myNtwin,myPhase) = lattice_bcc_interactionTwinTwin
|
lattice_interactionTwinTwin(1:myNtwin,1:myNtwin,myPhase) = lattice_bcc_interactionTwinTwin
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! hex (including conversion from miller-bravais (a1=a2=a3=c) to miller (a, b, c) indices)
|
! hex (including conversion from miller-bravais (a1=a2=a3=c) to miller (a, b, c) indices)
|
||||||
case (LATTICE_hex_ID)
|
case (LATTICE_hex_ID)
|
||||||
|
@ -1910,7 +1910,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
myNtwin = lattice_hex_Ntwin
|
myNtwin = lattice_hex_Ntwin
|
||||||
myNtrans = lattice_hex_Ntrans
|
myNtrans = lattice_hex_Ntrans
|
||||||
myNcleavage = lattice_hex_Ncleavage
|
myNcleavage = lattice_hex_Ncleavage
|
||||||
do i = 1_pInt,myNslip ! assign slip system vectors
|
do i = 1_pInt,myNslip ! assign slip system vectors
|
||||||
sd(1,i) = lattice_hex_systemSlip(1,i)*1.5_pReal ! direction [uvtw]->[3u/2 (u+2v)*sqrt(3)/2 w*(c/a)]
|
sd(1,i) = lattice_hex_systemSlip(1,i)*1.5_pReal ! direction [uvtw]->[3u/2 (u+2v)*sqrt(3)/2 w*(c/a)]
|
||||||
sd(2,i) = (lattice_hex_systemSlip(1,i)+2.0_pReal*lattice_hex_systemSlip(2,i))*&
|
sd(2,i) = (lattice_hex_systemSlip(1,i)+2.0_pReal*lattice_hex_systemSlip(2,i))*&
|
||||||
0.5_pReal*sqrt(3.0_pReal)
|
0.5_pReal*sqrt(3.0_pReal)
|
||||||
|
@ -1918,7 +1918,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
sn(1,i) = lattice_hex_systemSlip(5,i) ! plane (hkil)->(h (h+2k)/sqrt(3) l/(c/a))
|
sn(1,i) = lattice_hex_systemSlip(5,i) ! plane (hkil)->(h (h+2k)/sqrt(3) l/(c/a))
|
||||||
sn(2,i) = (lattice_hex_systemSlip(5,i)+2.0_pReal*lattice_hex_systemSlip(6,i))/sqrt(3.0_pReal)
|
sn(2,i) = (lattice_hex_systemSlip(5,i)+2.0_pReal*lattice_hex_systemSlip(6,i))/sqrt(3.0_pReal)
|
||||||
sn(3,i) = lattice_hex_systemSlip(8,i)/CoverA
|
sn(3,i) = lattice_hex_systemSlip(8,i)/CoverA
|
||||||
enddo
|
enddo
|
||||||
do i = 1_pInt,myNtwin ! assign twin system vectors and shears
|
do i = 1_pInt,myNtwin ! assign twin system vectors and shears
|
||||||
td(1,i) = lattice_hex_systemTwin(1,i)*1.5_pReal
|
td(1,i) = lattice_hex_systemTwin(1,i)*1.5_pReal
|
||||||
td(2,i) = (lattice_hex_systemTwin(1,i)+2.0_pReal*lattice_hex_systemTwin(2,i))*&
|
td(2,i) = (lattice_hex_systemTwin(1,i)+2.0_pReal*lattice_hex_systemTwin(2,i))*&
|
||||||
|
@ -1938,7 +1938,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
ts(i) = 2.0_pReal*(CoverA*CoverA-2.0_pReal)/3.0_pReal/CoverA
|
ts(i) = 2.0_pReal*(CoverA*CoverA-2.0_pReal)/3.0_pReal/CoverA
|
||||||
end select
|
end select
|
||||||
enddo
|
enddo
|
||||||
do i = 1_pInt, myNcleavage ! cleavage system vectors
|
do i = 1_pInt, myNcleavage ! cleavage system vectors
|
||||||
cd(1,i) = lattice_hex_systemCleavage(1,i)*1.5_pReal ! direction [uvtw]->[3u/2 (u+2v)*sqrt(3)/2 w*(c/a)]
|
cd(1,i) = lattice_hex_systemCleavage(1,i)*1.5_pReal ! direction [uvtw]->[3u/2 (u+2v)*sqrt(3)/2 w*(c/a)]
|
||||||
cd(2,i) = (lattice_hex_systemCleavage(1,i)+2.0_pReal*lattice_hex_systemCleavage(2,i))*&
|
cd(2,i) = (lattice_hex_systemCleavage(1,i)+2.0_pReal*lattice_hex_systemCleavage(2,i))*&
|
||||||
0.5_pReal*sqrt(3.0_pReal)
|
0.5_pReal*sqrt(3.0_pReal)
|
||||||
|
@ -1949,7 +1949,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
cn(3,i) = lattice_hex_systemCleavage(8,i)/CoverA
|
cn(3,i) = lattice_hex_systemCleavage(8,i)/CoverA
|
||||||
cn(1:3,1) = cn(1:3,i)/norm2(cn(1:3,i))
|
cn(1:3,1) = cn(1:3,i)/norm2(cn(1:3,i))
|
||||||
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
||||||
enddo
|
enddo
|
||||||
lattice_NslipSystem(1:lattice_maxNslipFamily,myPhase) = lattice_hex_NslipSystem
|
lattice_NslipSystem(1:lattice_maxNslipFamily,myPhase) = lattice_hex_NslipSystem
|
||||||
lattice_NtwinSystem(1:lattice_maxNtwinFamily,myPhase) = lattice_hex_NtwinSystem
|
lattice_NtwinSystem(1:lattice_maxNtwinFamily,myPhase) = lattice_hex_NtwinSystem
|
||||||
lattice_NtransSystem(1:lattice_maxNtransFamily,myPhase) = lattice_hex_NtransSystem
|
lattice_NtransSystem(1:lattice_maxNtransFamily,myPhase) = lattice_hex_NtransSystem
|
||||||
|
@ -1992,7 +1992,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
cd(1:3,i) = lattice_iso_systemCleavage(1:3,i)/norm2(LATTICE_ortho_systemCleavage(1:3,i))
|
cd(1:3,i) = lattice_iso_systemCleavage(1:3,i)/norm2(LATTICE_ortho_systemCleavage(1:3,i))
|
||||||
cn(1:3,i) = lattice_iso_systemCleavage(4:6,i)/norm2(LATTICE_ortho_systemCleavage(4:6,i))
|
cn(1:3,i) = lattice_iso_systemCleavage(4:6,i)/norm2(LATTICE_ortho_systemCleavage(4:6,i))
|
||||||
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
||||||
enddo
|
enddo
|
||||||
lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,myPhase) = lattice_iso_NcleavageSystem
|
lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,myPhase) = lattice_iso_NcleavageSystem
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -2006,7 +2006,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
cd(1:3,i) = lattice_iso_systemCleavage(1:3,i)/norm2(lattice_iso_systemCleavage(1:3,i))
|
cd(1:3,i) = lattice_iso_systemCleavage(1:3,i)/norm2(lattice_iso_systemCleavage(1:3,i))
|
||||||
cn(1:3,i) = lattice_iso_systemCleavage(4:6,i)/norm2(lattice_iso_systemCleavage(4:6,i))
|
cn(1:3,i) = lattice_iso_systemCleavage(4:6,i)/norm2(lattice_iso_systemCleavage(4:6,i))
|
||||||
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
|
||||||
enddo
|
enddo
|
||||||
lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,myPhase) = lattice_iso_NcleavageSystem
|
lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,myPhase) = lattice_iso_NcleavageSystem
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -2026,7 +2026,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
do j = 1_pInt,lattice_NnonSchmid(myPhase)
|
do j = 1_pInt,lattice_NnonSchmid(myPhase)
|
||||||
lattice_Sslip(1:3,1:3,2*j ,i,myPhase) = sns(1:3,1:3,1,j,i)
|
lattice_Sslip(1:3,1:3,2*j ,i,myPhase) = sns(1:3,1:3,1,j,i)
|
||||||
lattice_Sslip(1:3,1:3,2*j+1,i,myPhase) = sns(1:3,1:3,2,j,i)
|
lattice_Sslip(1:3,1:3,2*j+1,i,myPhase) = sns(1:3,1:3,2,j,i)
|
||||||
enddo
|
enddo
|
||||||
do j = 1_pInt,1_pInt+2_pInt*lattice_NnonSchmid(myPhase)
|
do j = 1_pInt,1_pInt+2_pInt*lattice_NnonSchmid(myPhase)
|
||||||
lattice_Sslip_v(1:6,j,i,myPhase) = &
|
lattice_Sslip_v(1:6,j,i,myPhase) = &
|
||||||
math_Mandel33to6(math_symmetric33(lattice_Sslip(1:3,1:3,j,i,myPhase)))
|
math_Mandel33to6(math_symmetric33(lattice_Sslip(1:3,1:3,j,i,myPhase)))
|
||||||
|
@ -2062,7 +2062,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||||
math_Mandel33to6(math_symmetric33(lattice_Scleavage(1:3,1:3,j,i,myPhase)))
|
math_Mandel33to6(math_symmetric33(lattice_Scleavage(1:3,1:3,j,i,myPhase)))
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
end subroutine lattice_initializeStructure
|
end subroutine lattice_initializeStructure
|
||||||
|
|
||||||
|
|
||||||
|
@ -2078,7 +2078,7 @@ pure function lattice_symmetrizeC66(struct,C66)
|
||||||
integer(pInt) :: j,k
|
integer(pInt) :: j,k
|
||||||
|
|
||||||
lattice_symmetrizeC66 = 0.0_pReal
|
lattice_symmetrizeC66 = 0.0_pReal
|
||||||
|
|
||||||
select case(struct)
|
select case(struct)
|
||||||
case (LATTICE_iso_ID)
|
case (LATTICE_iso_ID)
|
||||||
forall(k=1_pInt:3_pInt)
|
forall(k=1_pInt:3_pInt)
|
||||||
|
@ -2091,7 +2091,7 @@ pure function lattice_symmetrizeC66(struct,C66)
|
||||||
forall(j=1_pInt:3_pInt) lattice_symmetrizeC66(k,j) = C66(1,2)
|
forall(j=1_pInt:3_pInt) lattice_symmetrizeC66(k,j) = C66(1,2)
|
||||||
lattice_symmetrizeC66(k,k) = C66(1,1)
|
lattice_symmetrizeC66(k,k) = C66(1,1)
|
||||||
lattice_symmetrizeC66(k+3_pInt,k+3_pInt) = C66(4,4)
|
lattice_symmetrizeC66(k+3_pInt,k+3_pInt) = C66(4,4)
|
||||||
end forall
|
end forall
|
||||||
case (LATTICE_hex_ID)
|
case (LATTICE_hex_ID)
|
||||||
lattice_symmetrizeC66(1,1) = C66(1,1)
|
lattice_symmetrizeC66(1,1) = C66(1,1)
|
||||||
lattice_symmetrizeC66(2,2) = C66(1,1)
|
lattice_symmetrizeC66(2,2) = C66(1,1)
|
||||||
|
@ -2134,7 +2134,7 @@ pure function lattice_symmetrizeC66(struct,C66)
|
||||||
case default
|
case default
|
||||||
lattice_symmetrizeC66 = C66
|
lattice_symmetrizeC66 = C66
|
||||||
end select
|
end select
|
||||||
|
|
||||||
end function lattice_symmetrizeC66
|
end function lattice_symmetrizeC66
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -2149,7 +2149,7 @@ pure function lattice_symmetrize33(struct,T33)
|
||||||
integer(pInt) :: k
|
integer(pInt) :: k
|
||||||
|
|
||||||
lattice_symmetrize33 = 0.0_pReal
|
lattice_symmetrize33 = 0.0_pReal
|
||||||
|
|
||||||
select case(struct)
|
select case(struct)
|
||||||
case (LATTICE_iso_ID,LATTICE_fcc_ID,LATTICE_bcc_ID)
|
case (LATTICE_iso_ID,LATTICE_fcc_ID,LATTICE_bcc_ID)
|
||||||
forall(k=1_pInt:3_pInt) lattice_symmetrize33(k,k) = T33(1,1)
|
forall(k=1_pInt:3_pInt) lattice_symmetrize33(k,k) = T33(1,1)
|
||||||
|
@ -2164,7 +2164,7 @@ pure function lattice_symmetrize33(struct,T33)
|
||||||
case default
|
case default
|
||||||
lattice_symmetrize33 = T33
|
lattice_symmetrize33 = T33
|
||||||
end select
|
end select
|
||||||
|
|
||||||
end function lattice_symmetrize33
|
end function lattice_symmetrize33
|
||||||
|
|
||||||
|
|
||||||
|
@ -2248,7 +2248,7 @@ pure function lattice_qDisorientation(Q1, Q2, struct)
|
||||||
dQ = math_qMul(math_qConj(Q1),Q2)
|
dQ = math_qMul(math_qConj(Q1),Q2)
|
||||||
lattice_qDisorientation = dQ
|
lattice_qDisorientation = dQ
|
||||||
|
|
||||||
select case(symmetry)
|
select case(symmetry)
|
||||||
|
|
||||||
case (1_pInt,2_pInt)
|
case (1_pInt,2_pInt)
|
||||||
s = sum(lattice_NsymOperations(1:symmetry-1_pInt))
|
s = sum(lattice_NsymOperations(1:symmetry-1_pInt))
|
|
@ -452,7 +452,6 @@ pure function math_tensorproduct(A,B)
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), dimension(:), intent(in) :: A,B
|
real(pReal), dimension(:), intent(in) :: A,B
|
||||||
real(pReal), dimension(size(A,1),size(B,1)) :: math_tensorproduct
|
real(pReal), dimension(size(A,1),size(B,1)) :: math_tensorproduct
|
||||||
|
|
||||||
integer(pInt) :: i,j
|
integer(pInt) :: i,j
|
||||||
|
|
||||||
forall (i=1_pInt:size(A,1),j=1_pInt:size(B,1)) math_tensorproduct(i,j) = A(i)*B(j)
|
forall (i=1_pInt:size(A,1),j=1_pInt:size(B,1)) math_tensorproduct(i,j) = A(i)*B(j)
|
|
@ -3352,15 +3352,10 @@ end function FE_mapElemtype
|
||||||
subroutine mesh_faceMatch(elem, face ,matchingElem, matchingFace)
|
subroutine mesh_faceMatch(elem, face ,matchingElem, matchingFace)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
!*** output variables
|
|
||||||
integer(pInt), intent(out) :: matchingElem, & ! matching CP element ID
|
integer(pInt), intent(out) :: matchingElem, & ! matching CP element ID
|
||||||
matchingFace ! matching face ID
|
matchingFace ! matching face ID
|
||||||
|
|
||||||
!*** input variables
|
|
||||||
integer(pInt), intent(in) :: face, & ! face ID
|
integer(pInt), intent(in) :: face, & ! face ID
|
||||||
elem ! CP elem ID
|
elem ! CP elem ID
|
||||||
|
|
||||||
!*** local variables
|
|
||||||
integer(pInt), dimension(FE_NmatchingNodesPerFace(face,FE_geomtype(mesh_element(2,elem)))) :: &
|
integer(pInt), dimension(FE_NmatchingNodesPerFace(face,FE_geomtype(mesh_element(2,elem)))) :: &
|
||||||
myFaceNodes ! global node ids on my face
|
myFaceNodes ! global node ids on my face
|
||||||
integer(pInt) :: myType, &
|
integer(pInt) :: myType, &
|
Loading…
Reference in New Issue