polishing
This commit is contained in:
parent
385085de73
commit
bd5f963260
|
@ -117,9 +117,7 @@ elseif (DAMASK_SOLVER STREQUAL "fem" OR DAMASK_SOLVER STREQUAL "mesh")
|
||||||
else ()
|
else ()
|
||||||
message (FATAL_ERROR "Build target (DAMASK_SOLVER) is not defined")
|
message (FATAL_ERROR "Build target (DAMASK_SOLVER) is not defined")
|
||||||
endif ()
|
endif ()
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
# set linker commands (needs to be done after defining the project)
|
|
||||||
set (CMAKE_LINKER "${PETSC_LINKER}")
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "")
|
if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||||
set (CMAKE_BUILD_TYPE "RELEASE")
|
set (CMAKE_BUILD_TYPE "RELEASE")
|
||||||
|
@ -168,9 +166,6 @@ add_definitions (-DDAMASKVERSION="${DAMASK_V}")
|
||||||
# definition of other macros
|
# definition of other macros
|
||||||
add_definitions (-DPETSc)
|
add_definitions (-DPETSc)
|
||||||
|
|
||||||
set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} ${PETSC_INCLUDES}")
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
|
||||||
|
|
||||||
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
||||||
include(Compiler-Intel)
|
include(Compiler-Intel)
|
||||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
||||||
|
@ -183,14 +178,14 @@ endif ()
|
||||||
|
|
||||||
|
|
||||||
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${BUILDCMD_PRE} ${OPENMP_FLAGS} ${STANDARD_CHECK} ${OPTIMIZATION_FLAGS} ${COMPILE_FLAGS} ${PRECISION_FLAGS}")
|
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${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}")
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${PETSC_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}")
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
|
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
|
||||||
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DEBUG_FLAGS}")
|
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DEBUG_FLAGS}")
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}")
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DAMASK_INCLUDE_FLAGS} ${BUILDCMD_POST}")
|
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${PETSC_INCLUDES} ${BUILDCMD_POST}")
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${PETSC_EXTERNAL_LIB} ${BUILDCMD_POST}")
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${PETSC_EXTERNAL_LIB} ${BUILDCMD_POST}")
|
||||||
|
|
||||||
message ("Fortran Compiler Flags:\n${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}}\n")
|
message ("Fortran Compiler Flags:\n${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}}\n")
|
||||||
|
|
17
src/IO.f90
17
src/IO.f90
|
@ -384,7 +384,7 @@ function IO_stringValue(string,chunkPos,myChunk,silent)
|
||||||
logical :: warn
|
logical :: warn
|
||||||
|
|
||||||
if (present(silent)) then
|
if (present(silent)) then
|
||||||
warn = silent
|
warn = .not. silent
|
||||||
else
|
else
|
||||||
warn = .false.
|
warn = .false.
|
||||||
endif
|
endif
|
||||||
|
@ -414,11 +414,10 @@ real(pReal) function IO_floatValue (string,chunkPos,myChunk)
|
||||||
|
|
||||||
valuePresent: if (myChunk > chunkPos(1) .or. myChunk < 1) then
|
valuePresent: if (myChunk > chunkPos(1) .or. myChunk < 1) then
|
||||||
call IO_warning(201,el=myChunk,ext_msg=MYNAME//trim(string))
|
call IO_warning(201,el=myChunk,ext_msg=MYNAME//trim(string))
|
||||||
else valuePresent
|
else valuePresent
|
||||||
IO_floatValue = &
|
IO_floatValue = verifyFloatValue(trim(adjustl(string(chunkPos(myChunk*2):chunkPos(myChunk*2+1)))),&
|
||||||
verifyFloatValue(trim(adjustl(string(chunkPos(myChunk*2):chunkPos(myChunk*2+1)))),&
|
VALIDCHARACTERS,MYNAME)
|
||||||
VALIDCHARACTERS,MYNAME)
|
endif valuePresent
|
||||||
endif valuePresent
|
|
||||||
|
|
||||||
end function IO_floatValue
|
end function IO_floatValue
|
||||||
|
|
||||||
|
@ -466,12 +465,12 @@ real(pReal) function IO_fixedNoEFloatValue (string,ends,myChunk)
|
||||||
pos_exp = scan(string(ends(myChunk)+1:ends(myChunk+1)),'+-',back=.true.)
|
pos_exp = scan(string(ends(myChunk)+1:ends(myChunk+1)),'+-',back=.true.)
|
||||||
hasExponent: if (pos_exp > 1) then
|
hasExponent: if (pos_exp > 1) then
|
||||||
base = verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk)+pos_exp-1))),&
|
base = verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk)+pos_exp-1))),&
|
||||||
VALIDBASE,MYNAME//'(base): ')
|
VALIDBASE,MYNAME//'(base): ')
|
||||||
expon = verifyIntValue(trim(adjustl(string(ends(myChunk)+pos_exp:ends(myChunk+1)))),&
|
expon = verifyIntValue(trim(adjustl(string(ends(myChunk)+pos_exp:ends(myChunk+1)))),&
|
||||||
VALIDEXP,MYNAME//'(exp): ')
|
VALIDEXP,MYNAME//'(exp): ')
|
||||||
else hasExponent
|
else hasExponent
|
||||||
base = verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk+1)))),&
|
base = verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk+1)))),&
|
||||||
VALIDBASE,MYNAME//'(base): ')
|
VALIDBASE,MYNAME//'(base): ')
|
||||||
expon = 0
|
expon = 0
|
||||||
endif hasExponent
|
endif hasExponent
|
||||||
IO_fixedNoEFloatValue = base*10.0_pReal**real(expon,pReal)
|
IO_fixedNoEFloatValue = base*10.0_pReal**real(expon,pReal)
|
||||||
|
|
|
@ -94,7 +94,6 @@ subroutine grid_mech_FEM_init
|
||||||
1.0_pReal,-1.0_pReal,-1.0_pReal,-1.0_pReal, &
|
1.0_pReal,-1.0_pReal,-1.0_pReal,-1.0_pReal, &
|
||||||
1.0_pReal, 1.0_pReal, 1.0_pReal, 1.0_pReal], [4,8])
|
1.0_pReal, 1.0_pReal, 1.0_pReal, 1.0_pReal], [4,8])
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
integer :: rank
|
|
||||||
integer(HID_T) :: fileHandle, groupHandle
|
integer(HID_T) :: fileHandle, groupHandle
|
||||||
character(len=pStringLen) :: fileName
|
character(len=pStringLen) :: fileName
|
||||||
real(pReal), dimension(3,3,3,3) :: devNull
|
real(pReal), dimension(3,3,3,3) :: devNull
|
||||||
|
|
Loading…
Reference in New Issue