introduced new state structure, compile with STATE=NEW
This commit is contained in:
parent
a8a9c8eef5
commit
302423d266
|
@ -117,6 +117,11 @@ RUN_PATH :=$(RUN_PATH),-rpath,$(HDF5_ROOT)/lib
|
||||||
INCLUDE_DIRS +=-I$(HDF5_ROOT)/include -DHDF
|
INCLUDE_DIRS +=-I$(HDF5_ROOT)/include -DHDF
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#new state
|
||||||
|
ifeq "$(STATE)" "NEW"
|
||||||
|
INCLUDE_DIRS +=-DNEWSTATE
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef STANDARD_CHECK
|
ifdef STANDARD_CHECK
|
||||||
STANDARD_CHECK_ifort =$(STANDARD_CHECK)
|
STANDARD_CHECK_ifort =$(STANDARD_CHECK)
|
||||||
STANDARD_CHECK_gfortran =$(STANDARD_CHECK)
|
STANDARD_CHECK_gfortran =$(STANDARD_CHECK)
|
||||||
|
|
|
@ -12,6 +12,9 @@ module material
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
pReal, &
|
pReal, &
|
||||||
pInt, &
|
pInt, &
|
||||||
|
#ifdef NEWSTATE
|
||||||
|
tState, &
|
||||||
|
#endif
|
||||||
p_intvec
|
p_intvec
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -88,6 +91,12 @@ module material
|
||||||
|
|
||||||
integer(pInt), dimension(:,:,:), allocatable, public :: &
|
integer(pInt), dimension(:,:,:), allocatable, public :: &
|
||||||
material_phase !< phase (index) of each grain,IP,element
|
material_phase !< phase (index) of each grain,IP,element
|
||||||
|
|
||||||
|
#ifdef NEWSTATE
|
||||||
|
type(tState), allocatable, dimension(:) :: &
|
||||||
|
plasticState, &
|
||||||
|
elasticState
|
||||||
|
#endif
|
||||||
integer(pInt), dimension(:,:,:), allocatable, public, protected :: &
|
integer(pInt), dimension(:,:,:), allocatable, public, protected :: &
|
||||||
material_texture !< texture (index) of each grain,IP,element
|
material_texture !< texture (index) of each grain,IP,element
|
||||||
|
|
||||||
|
@ -208,6 +217,11 @@ subroutine material_init
|
||||||
call material_parsePhase(FILEUNIT,material_partPhase)
|
call material_parsePhase(FILEUNIT,material_partPhase)
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Phase parsed'
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Phase parsed'
|
||||||
close(FILEUNIT)
|
close(FILEUNIT)
|
||||||
|
#ifdef NEWSTATE
|
||||||
|
allocate(plasticState(material_Nphase))
|
||||||
|
allocate(plasticState(material_Nphase))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
do m = 1_pInt,material_Nmicrostructure
|
do m = 1_pInt,material_Nmicrostructure
|
||||||
if(microstructure_crystallite(m) < 1_pInt .or. &
|
if(microstructure_crystallite(m) < 1_pInt .or. &
|
||||||
|
@ -221,12 +235,6 @@ subroutine material_init
|
||||||
call IO_error(150_pInt,m,ext_msg='texture')
|
call IO_error(150_pInt,m,ext_msg='texture')
|
||||||
if(microstructure_Nconstituents(m) < 1_pInt) &
|
if(microstructure_Nconstituents(m) < 1_pInt) &
|
||||||
call IO_error(151_pInt,m)
|
call IO_error(151_pInt,m)
|
||||||
! if (abs(sum(microstructure_fraction(:,m)) - 1.0_pReal) >= 1.0e-6_pReal) then ! have ppm precision in fractions
|
|
||||||
! if (iand(myDebug,debug_levelExtensive) /= 0_pInt) then
|
|
||||||
! write(6,'(a,1x,f12.9)') ' sum of microstructure fraction = ',sum(microstructure_fraction(:,m))
|
|
||||||
! endif
|
|
||||||
! call IO_error(153_pInt,m)
|
|
||||||
! endif
|
|
||||||
enddo
|
enddo
|
||||||
debugOut: if (iand(myDebug,debug_levelExtensive) /= 0_pInt) then
|
debugOut: if (iand(myDebug,debug_levelExtensive) /= 0_pInt) then
|
||||||
write(6,'(/,a,/)') ' MATERIAL configuration'
|
write(6,'(/,a,/)') ' MATERIAL configuration'
|
||||||
|
|
|
@ -56,6 +56,13 @@ module prec
|
||||||
integer(pInt), dimension(:), pointer :: p
|
integer(pInt), dimension(:), pointer :: p
|
||||||
end type p_intvec
|
end type p_intvec
|
||||||
|
|
||||||
|
#ifdef NEWSTATE
|
||||||
|
!http://stackoverflow.com/questions/3948210/can-i-have-a-pointer-to-an-item-in-an-allocatable-array
|
||||||
|
type, public :: tState
|
||||||
|
real(pReal), pointer, dimension(:,:) :: s ! material points, state size
|
||||||
|
end type
|
||||||
|
#endif
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
prec_init
|
prec_init
|
||||||
|
|
||||||
|
@ -74,11 +81,15 @@ subroutine prec_init
|
||||||
write(6,'(/,a)') ' <<<+- prec init -+>>>'
|
write(6,'(/,a)') ' <<<+- prec init -+>>>'
|
||||||
write(6,'(a)') ' $Id$'
|
write(6,'(a)') ' $Id$'
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
|
#ifdef NEWSTATE
|
||||||
|
write(6,'(a)') 'Using new state structure'
|
||||||
|
#endif
|
||||||
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
||||||
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
|
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
|
||||||
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
|
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
|
||||||
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
||||||
write(6,'(a,l3,/)') ' NaN /= NaN: ',DAMASK_NaN/=DAMASK_NaN
|
write(6,'(a,l3,/)') ' NaN /= NaN: ',DAMASK_NaN/=DAMASK_NaN
|
||||||
|
|
||||||
if (DAMASK_NaN == DAMASK_NaN) call quit(9000)
|
if (DAMASK_NaN == DAMASK_NaN) call quit(9000)
|
||||||
|
|
||||||
end subroutine prec_init
|
end subroutine prec_init
|
||||||
|
|
Loading…
Reference in New Issue