Merge branch 'development' of magit1.mpie.de:damask/DAMASK into development

This commit is contained in:
Franz Roters 2017-04-25 12:44:03 +02:00
commit 597ee589a5
6 changed files with 29 additions and 31 deletions

View File

@ -54,7 +54,7 @@ execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_conf
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
# 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
@ -110,6 +110,10 @@ elseif ("${DAMASK_SOLVER}" STREQUAL "FEM")
message ("Building FEM Solver\n")
endif ()
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set (CMAKE_BUILD_TYPE "RELEASE")
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}")
@ -177,7 +181,6 @@ 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
@ -447,9 +450,7 @@ 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")
if ("${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 ()

View File

@ -1266,8 +1266,6 @@ subroutine lattice_init
debug_level, &
debug_lattice, &
debug_levelBasic
use numerics, only: &
worldrank
implicit none
integer(pInt), parameter :: FILEUNIT = 200_pInt

View File

@ -729,6 +729,8 @@ end subroutine material_parseHomogenization
!> @brief parses the microstructure part in the material configuration file
!--------------------------------------------------------------------------------------------------
subroutine material_parseMicrostructure(fileUnit,myPart)
use prec, only: &
dNeq
use IO
use mesh, only: &
mesh_element, &
@ -738,7 +740,6 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
character(len=*), intent(in) :: myPart
integer(pInt), intent(in) :: fileUnit
integer(pInt), allocatable, dimension(:) :: chunkPos
integer(pInt) :: Nsections, section, constituent, e, i
character(len=65536) :: &
@ -818,9 +819,10 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
!sanity check
do section = 1_pInt, Nsections
if (sum(microstructure_fraction(:,section)) /= 1.0_pReal) &
if (dNeq(sum(microstructure_fraction(:,section)),1.0_pReal)) &
call IO_error(153_pInt,ext_msg=microstructure_name(section))
enddo
end subroutine material_parseMicrostructure

View File

@ -921,24 +921,22 @@ subroutine mesh_build_ipCoordinates
integer(pInt) :: e,t,g,c,i,n
real(pReal), dimension(3) :: myCoords
if (.not. allocated(mesh_ipCoordinates)) then
allocate(mesh_ipCoordinates(3,mesh_maxNips,mesh_NcpElems))
mesh_ipCoordinates = 0.0_pReal
endif
if (.not. allocated(mesh_ipCoordinates)) &
allocate(mesh_ipCoordinates(3,mesh_maxNips,mesh_NcpElems),source=0.0_pReal)
!$OMP PARALLEL DO PRIVATE(t,g,c,myCoords)
do e = 1_pInt,mesh_NcpElems ! loop over cpElems
t = mesh_element(2_pInt,e) ! get element type
g = FE_geomtype(t) ! get geometry type
c = FE_celltype(g) ! get cell type
do i = 1_pInt,FE_Nips(g) ! loop over ips=cells in this element
myCoords = 0.0_pReal
do n = 1_pInt,FE_NcellnodesPerCell(c) ! loop over cell nodes in this cell
myCoords = myCoords + mesh_cellnode(1:3,mesh_cell(n,i,e))
enddo
mesh_ipCoordinates(1:3,i,e) = myCoords / FE_NcellnodesPerCell(c)
do e = 1_pInt,mesh_NcpElems ! loop over cpElems
t = mesh_element(2_pInt,e) ! get element type
g = FE_geomtype(t) ! get geometry type
c = FE_celltype(g) ! get cell type
do i = 1_pInt,FE_Nips(g) ! loop over ips=cells in this element
myCoords = 0.0_pReal
do n = 1_pInt,FE_NcellnodesPerCell(c) ! loop over cell nodes in this cell
myCoords = myCoords + mesh_cellnode(1:3,mesh_cell(n,i,e))
enddo
mesh_ipCoordinates(1:3,i,e) = myCoords / real(FE_NcellnodesPerCell(c),pReal)
enddo
enddo
!$OMP END PARALLEL DO
end subroutine mesh_build_ipCoordinates
@ -955,7 +953,6 @@ pure function mesh_cellCenterCoordinates(ip,el)
real(pReal), dimension(3) :: mesh_cellCenterCoordinates !< x,y,z coordinates of the cell center of the requested IP cell
integer(pInt) :: t,g,c,n
t = mesh_element(2_pInt,el) ! get element type
g = FE_geomtype(t) ! get geometry type
c = FE_celltype(g) ! get cell type
@ -963,7 +960,7 @@ pure function mesh_cellCenterCoordinates(ip,el)
do n = 1_pInt,FE_NcellnodesPerCell(c) ! loop over cell nodes in this cell
mesh_cellCenterCoordinates = mesh_cellCenterCoordinates + mesh_cellnode(1:3,mesh_cell(n,ip,el))
enddo
mesh_cellCenterCoordinates = mesh_cellCenterCoordinates / FE_NcellnodesPerCell(c)
mesh_cellCenterCoordinates = mesh_cellCenterCoordinates / real(FE_NcellnodesPerCell(c),pReal)
end function mesh_cellCenterCoordinates
@ -1511,8 +1508,8 @@ function mesh_nodesAroundCentres(gDim,Favg,centres) result(nodes)
shift = sign(abs(iRes+diag-2_pInt*me)/(iRes+diag),iRes+diag-2_pInt*me)
lookup = me-diag+shift*iRes
wrappedCentres(1:3,i+1_pInt, j+1_pInt, k+1_pInt) = &
centres(1:3,lookup(1)+1_pInt,lookup(2)+1_pInt,lookup(3)+1_pInt) - &
math_mul33x3(Favg, shift*gDim)
centres(1:3,lookup(1)+1_pInt,lookup(2)+1_pInt,lookup(3)+1_pInt) &
- math_mul33x3(Favg, real(shift,pReal)*gDim)
endif
enddo; enddo; enddo

View File

@ -251,10 +251,8 @@ subroutine numerics_init
!--------------------------------------------------------------------------------------------------
! try to open the config file
fileExists: if(IO_open_file_stat(FILEUNIT,numerics_configFile)) then
mainProcess2: if (worldrank == 0) then
write(6,'(a,/)') ' using values from config file'
flush(6)
endif mainProcess2
write(6,'(a,/)') ' using values from config file'
flush(6)
!--------------------------------------------------------------------------------------------------
! read variables from config file and overwrite default parameters if keyword is present

View File

@ -57,7 +57,9 @@ subroutine DAMASK_interface_init()
tag
integer :: &
i, &
#ifdef _OPENMP
threadLevel, &
#endif
worldrank = 0, &
worldsize = 0
integer, allocatable, dimension(:) :: &