Merge branch 'only-use-rotation-class' into plasticity-submodule

This commit is contained in:
Martin Diehl 2019-12-04 19:02:01 +01:00
commit 7d6a57dc17
1 changed files with 17 additions and 23 deletions

View File

@ -24,13 +24,10 @@ module plastic_nonlocal
implicit none implicit none
private private
real(pReal), parameter, private :: & real(pReal), parameter :: &
KB = 1.38e-23_pReal !< Physical parameter, Boltzmann constant in J/Kelvin KB = 1.38e-23_pReal !< Physical parameter, Boltzmann constant in J/Kelvin
integer, dimension(:,:), allocatable, target, public :: &
plastic_nonlocal_sizePostResult !< size of each post result output
character(len=64), dimension(:,:), allocatable, target, public :: & character(len=64), dimension(:,:), allocatable :: &
plastic_nonlocal_output !< name of each post result output plastic_nonlocal_output !< name of each post result output
@ -54,18 +51,18 @@ module plastic_nonlocal
mob_scr_neg = 4 !< mobile screw positive mob_scr_neg = 4 !< mobile screw positive
! BEGIN DEPRECATES ! BEGIN DEPRECATES
integer, dimension(:,:,:), allocatable, private :: & integer, dimension(:,:,:), allocatable :: &
iRhoU, & !< state indices for unblocked density iRhoU, & !< state indices for unblocked density
iRhoB, & !< state indices for blocked density iRhoB, & !< state indices for blocked density
iRhoD, & !< state indices for dipole density iRhoD, & !< state indices for dipole density
iV, & !< state indices for dislcation velocities iV, & !< state indices for dislcation velocities
iD !< state indices for stable dipole height iD !< state indices for stable dipole height
integer, dimension(:), allocatable, private, protected :: & integer, dimension(:), allocatable :: &
totalNslip !< total number of active slip systems for each instance totalNslip !< total number of active slip systems for each instance
!END DEPRECATED !END DEPRECATED
real(pReal), dimension(:,:,:,:,:,:), allocatable, private :: & real(pReal), dimension(:,:,:,:,:,:), allocatable :: &
compatibility !< slip system compatibility between me and my neighbors compatibility !< slip system compatibility between me and my neighbors
enum, bind(c) enum, bind(c)
enumerator :: & enumerator :: &
@ -93,7 +90,7 @@ module plastic_nonlocal
gamma_ID gamma_ID
end enum end enum
type, private :: tParameters !< container type for internal constitutive parameters type :: tParameters !< container type for internal constitutive parameters
real(pReal) :: & real(pReal) :: &
atomicVolume, & !< atomic volume atomicVolume, & !< atomic volume
Dsd0, & !< prefactor for self-diffusion coefficient Dsd0, & !< prefactor for self-diffusion coefficient
@ -143,19 +140,19 @@ module plastic_nonlocal
interactionSlipSlip ,& !< coefficients for slip-slip interaction interactionSlipSlip ,& !< coefficients for slip-slip interaction
forestProjection_Edge, & !< matrix of forest projections of edge dislocations forestProjection_Edge, & !< matrix of forest projections of edge dislocations
forestProjection_Screw !< matrix of forest projections of screw dislocations forestProjection_Screw !< matrix of forest projections of screw dislocations
real(pReal), dimension(:), allocatable, private :: & real(pReal), dimension(:), allocatable :: &
nonSchmidCoeff nonSchmidCoeff
real(pReal), dimension(:,:,:), allocatable, private :: & real(pReal), dimension(:,:,:), allocatable :: &
Schmid, & !< Schmid contribution Schmid, & !< Schmid contribution
nonSchmid_pos, & nonSchmid_pos, &
nonSchmid_neg !< combined projection of Schmid and non-Schmid contributions to the resolved shear stress (only for screws) nonSchmid_neg !< combined projection of Schmid and non-Schmid contributions to the resolved shear stress (only for screws)
integer :: & integer :: &
totalNslip totalNslip
integer, dimension(:) ,allocatable , public:: & integer, dimension(:) ,allocatable :: &
Nslip,& Nslip,&
colinearSystem !< colinear system to the active slip system (only valid for fcc!) colinearSystem !< colinear system to the active slip system (only valid for fcc!)
logical, private :: & logical :: &
shortRangeStressCorrection, & !< flag indicating the use of the short range stress correction by a excess density gradient term shortRangeStressCorrection, & !< flag indicating the use of the short range stress correction by a excess density gradient term
probabilisticMultiplication probabilisticMultiplication
@ -164,13 +161,13 @@ module plastic_nonlocal
end type tParameters end type tParameters
type, private :: tNonlocalMicrostructure type :: tNonlocalMicrostructure
real(pReal), allocatable, dimension(:,:) :: & real(pReal), allocatable, dimension(:,:) :: &
tau_pass, & tau_pass, &
tau_Back tau_Back
end type tNonlocalMicrostructure end type tNonlocalMicrostructure
type, private :: tNonlocalState type :: tNonlocalState
real(pReal), pointer, dimension(:,:) :: & real(pReal), pointer, dimension(:,:) :: &
rho, & ! < all dislocations rho, & ! < all dislocations
rhoSgl, & rhoSgl, &
@ -196,16 +193,16 @@ module plastic_nonlocal
v_scr_neg v_scr_neg
end type tNonlocalState end type tNonlocalState
type(tNonlocalState), allocatable, dimension(:), private :: & type(tNonlocalState), allocatable, dimension(:) :: &
deltaState, & deltaState, &
dotState, & dotState, &
state state
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance) type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance)
type(tNonlocalMicrostructure), dimension(:), allocatable, private :: microstructure type(tNonlocalMicrostructure), dimension(:), allocatable :: microstructure
integer(kind(undefined_ID)), dimension(:,:), allocatable, private :: & integer(kind(undefined_ID)), dimension(:,:), allocatable :: &
plastic_nonlocal_outputID !< ID of each post result output plastic_nonlocal_outputID !< ID of each post result output
public :: & public :: &
@ -268,7 +265,6 @@ subroutine plastic_nonlocal_init
allocate(deltaState(maxNinstances)) allocate(deltaState(maxNinstances))
allocate(microstructure(maxNinstances)) allocate(microstructure(maxNinstances))
allocate(plastic_nonlocal_sizePostResult(maxval(phase_Noutput), maxNinstances), source=0)
allocate(plastic_nonlocal_output(maxval(phase_Noutput), maxNinstances)) allocate(plastic_nonlocal_output(maxval(phase_Noutput), maxNinstances))
plastic_nonlocal_output = '' plastic_nonlocal_output = ''
allocate(plastic_nonlocal_outputID(maxval(phase_Noutput), maxNinstances), source=undefined_ID) allocate(plastic_nonlocal_outputID(maxval(phase_Noutput), maxNinstances), source=undefined_ID)
@ -498,7 +494,6 @@ subroutine plastic_nonlocal_init
if (outputID /= undefined_ID) then if (outputID /= undefined_ID) then
plastic_nonlocal_output(i,phase_plasticityInstance(p)) = outputs(i) plastic_nonlocal_output(i,phase_plasticityInstance(p)) = outputs(i)
plastic_nonlocal_sizePostResult(i,phase_plasticityInstance(p)) = prm%totalNslip
prm%outputID = [prm%outputID , outputID] prm%outputID = [prm%outputID , outputID]
endif endif
@ -524,7 +519,6 @@ subroutine plastic_nonlocal_init
prm%totalNslip,0,0) prm%totalNslip,0,0)
plasticState(p)%nonlocal = .true. plasticState(p)%nonlocal = .true.
plasticState(p)%offsetDeltaState = 0 ! ToDo: state structure does not follow convention plasticState(p)%offsetDeltaState = 0 ! ToDo: state structure does not follow convention
plasticState(p)%sizePostResults = sum(plastic_nonlocal_sizePostResult(:,phase_plasticityInstance(p)))
totalNslip(phase_plasticityInstance(p)) = prm%totalNslip totalNslip(phase_plasticityInstance(p)) = prm%totalNslip