consistent capitalization
Capitals for pre processor macros to avoid clashes
This commit is contained in:
parent
223e6054d4
commit
f0a75d8d62
|
@ -15,16 +15,15 @@ pkg_get_variable (CMAKE_Fortran_COMPILER PETSc fcompiler)
|
|||
pkg_get_variable (CMAKE_C_COMPILER PETSc ccompiler)
|
||||
|
||||
# Solver determines name of project
|
||||
string(TOLOWER "${DAMASK_SOLVER}" DAMASK_SOLVER)
|
||||
if (DAMASK_SOLVER STREQUAL "grid")
|
||||
string(TOUPPER "${DAMASK_SOLVER}" DAMASK_SOLVER)
|
||||
if (DAMASK_SOLVER STREQUAL "GRID")
|
||||
project (damask-grid HOMEPAGE_URL https://damask.mpie.de LANGUAGES Fortran C)
|
||||
add_definitions (-DGrid)
|
||||
elseif (DAMASK_SOLVER STREQUAL "mesh")
|
||||
elseif (DAMASK_SOLVER STREQUAL "MESH")
|
||||
project (damask-mesh HOMEPAGE_URL https://damask.mpie.de LANGUAGES Fortran C)
|
||||
add_definitions (-DMesh)
|
||||
else ()
|
||||
message (FATAL_ERROR "Build target (DAMASK_SOLVER) is not defined")
|
||||
endif ()
|
||||
add_definitions ("-D${DAMASK_SOLVER}")
|
||||
|
||||
file (STRINGS ${PROJECT_SOURCE_DIR}/VERSION DAMASK_VERSION)
|
||||
|
||||
|
|
4
Makefile
4
Makefile
|
@ -9,13 +9,13 @@ all: grid mesh
|
|||
|
||||
.PHONY: grid
|
||||
grid:
|
||||
@cmake -B build/grid -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${PWD} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP}
|
||||
@cmake -B build/grid -DDAMASK_SOLVER=grid -DCMAKE_INSTALL_PREFIX=${PWD} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP}
|
||||
@cmake --build build/grid --parallel
|
||||
@cmake --install build/grid
|
||||
|
||||
.PHONY: mesh
|
||||
mesh:
|
||||
@cmake -B build/mesh -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${PWD} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP}
|
||||
@cmake -B build/mesh -DDAMASK_SOLVER=mesh -DCMAKE_INSTALL_PREFIX=${PWD} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP}
|
||||
@cmake --build build/mesh --parallel
|
||||
@cmake --install build/mesh
|
||||
|
||||
|
|
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
|||
Subproject commit 9fec97ad816c50d33ce235ca2e65602f525c1194
|
||||
Subproject commit 89ee5ced410c0d7f50ef20e39080f2c637b1b0f7
|
|
@ -20,10 +20,10 @@ module CPFEM2
|
|||
use HDF5_utilities
|
||||
use homogenization
|
||||
use phase
|
||||
#if defined(Mesh)
|
||||
#if defined(MESH)
|
||||
use FEM_quadrature
|
||||
use discretization_mesh
|
||||
#elif defined(Grid)
|
||||
#elif defined(GRID)
|
||||
use discretization_grid
|
||||
#endif
|
||||
|
||||
|
@ -43,7 +43,7 @@ subroutine CPFEM_initAll
|
|||
call prec_init
|
||||
call IO_init
|
||||
call base64_init
|
||||
#ifdef Mesh
|
||||
#ifdef MESH
|
||||
call FEM_quadrature_init
|
||||
#endif
|
||||
call YAML_types_init
|
||||
|
@ -54,9 +54,9 @@ subroutine CPFEM_initAll
|
|||
call lattice_init
|
||||
call HDF5_utilities_init
|
||||
call results_init(restart=interface_restartInc>0)
|
||||
#if defined(Mesh)
|
||||
#if defined(MESH)
|
||||
call discretization_mesh_init(restart=interface_restartInc>0)
|
||||
#elif defined(Grid)
|
||||
#elif defined(GRID)
|
||||
call discretization_grid_init(restart=interface_restartInc>0)
|
||||
#endif
|
||||
call material_init(restart=interface_restartInc>0)
|
||||
|
|
|
@ -11,15 +11,17 @@
|
|||
#define QUOTE(x) #x
|
||||
#define PASTE(x,y) x ## y
|
||||
|
||||
#ifdef Marc4DAMASK
|
||||
#define MARC4DAMASK Marc4DAMASK
|
||||
#endif
|
||||
|
||||
#include "prec.f90"
|
||||
|
||||
module DAMASK_interface
|
||||
use prec
|
||||
#if __INTEL_COMPILER >= 1800
|
||||
use, intrinsic :: ISO_fortran_env, only: &
|
||||
compiler_version, &
|
||||
compiler_options
|
||||
#endif
|
||||
use ifport, only: &
|
||||
CHDIR
|
||||
|
||||
|
@ -212,8 +214,8 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
|
|||
! Marc common blocks are in fixed format so they have to be reformated to free format (f90)
|
||||
! Beware of changes in newer Marc versions
|
||||
|
||||
#include QUOTE(PASTE(./Marc/include/concom,Marc4DAMASK)) ! concom is needed for inc, lovl
|
||||
#include QUOTE(PASTE(./Marc/include/creeps,Marc4DAMASK)) ! creeps is needed for timinc (time increment)
|
||||
#include QUOTE(PASTE(./Marc/include/concom,MARC4DAMASK)) ! concom is needed for inc, lovl
|
||||
#include QUOTE(PASTE(./Marc/include/creeps,MARC4DAMASK)) ! creeps is needed for timinc (time increment)
|
||||
|
||||
logical :: cutBack
|
||||
real(pReal), dimension(6) :: stress
|
||||
|
@ -365,7 +367,7 @@ subroutine uedinc(inc,incsub)
|
|||
integer :: n, nqncomp, nqdatatype
|
||||
integer, save :: inc_written
|
||||
real(pReal), allocatable, dimension(:,:) :: d_n
|
||||
#include QUOTE(PASTE(./Marc/include/creeps,Marc4DAMASK)) ! creeps is needed for timinc (time increment)
|
||||
#include QUOTE(PASTE(./Marc/include/creeps,MARC4DAMASK)) ! creeps is needed for timinc (time increment)
|
||||
|
||||
|
||||
if (inc > inc_written) then
|
||||
|
|
|
@ -86,6 +86,11 @@ subroutine DAMASK_interface_init
|
|||
print*, ' _/ _/ _/_/_/_/ _/ _/ _/ _/_/_/_/ _/_/ _/_/ _/_/'
|
||||
print*, ' _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/'
|
||||
print*, ' _/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/_/_/'
|
||||
#if defined(GRID)
|
||||
print*, ' Grid solver'
|
||||
#elif defined(Mesh)
|
||||
print*, ' Mesh solver'
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
print'(/,a)', ' debug version - debug version - debug version - debug version - debug version'
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue