using theMesh (object oriented mesh description)
This commit is contained in:
parent
f0b5b9fd59
commit
7a8d98d135
|
@ -12,8 +12,6 @@ module crystallite
|
||||||
use FEsolving, only: &
|
use FEsolving, only: &
|
||||||
FEsolving_execElem, &
|
FEsolving_execElem, &
|
||||||
FEsolving_execIP
|
FEsolving_execIP
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
use material, only: &
|
use material, only: &
|
||||||
homogenization_Ngrains
|
homogenization_Ngrains
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
|
@ -155,10 +153,8 @@ subroutine crystallite_init
|
||||||
math_inv33, &
|
math_inv33, &
|
||||||
math_mul33x33
|
math_mul33x33
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_element, &
|
theMesh, &
|
||||||
mesh_NcpElems, &
|
mesh_element
|
||||||
mesh_maxNips, &
|
|
||||||
mesh_maxNipNeighbors
|
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_timeStamp, &
|
IO_timeStamp, &
|
||||||
IO_stringValue, &
|
IO_stringValue, &
|
||||||
|
@ -196,8 +192,8 @@ subroutine crystallite_init
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
|
|
||||||
cMax = homogenization_maxNgrains
|
cMax = homogenization_maxNgrains
|
||||||
iMax = mesh_maxNips
|
iMax = theMesh%elem%nIPs
|
||||||
eMax = mesh_NcpElems
|
eMax = theMesh%nElems
|
||||||
|
|
||||||
! ---------------------------------------------------------------------------
|
! ---------------------------------------------------------------------------
|
||||||
! ToDo (when working on homogenization): should be 3x3 tensor called S
|
! ToDo (when working on homogenization): should be 3x3 tensor called S
|
||||||
|
@ -333,7 +329,7 @@ subroutine crystallite_init
|
||||||
case(elasmatrix_ID)
|
case(elasmatrix_ID)
|
||||||
mySize = 36_pInt
|
mySize = 36_pInt
|
||||||
case(neighboringip_ID,neighboringelement_ID)
|
case(neighboringip_ID,neighboringelement_ID)
|
||||||
mySize = mesh_maxNipNeighbors
|
mySize = theMesh%elem%nIPneighbors
|
||||||
case default
|
case default
|
||||||
mySize = 0_pInt
|
mySize = 0_pInt
|
||||||
end select
|
end select
|
||||||
|
@ -415,7 +411,7 @@ subroutine crystallite_init
|
||||||
write(6,'(a42,1x,i10)') ' # of elements: ', eMax
|
write(6,'(a42,1x,i10)') ' # of elements: ', eMax
|
||||||
write(6,'(a42,1x,i10)') 'max # of integration points/element: ', iMax
|
write(6,'(a42,1x,i10)') 'max # of integration points/element: ', iMax
|
||||||
write(6,'(a42,1x,i10)') 'max # of constituents/integration point: ', cMax
|
write(6,'(a42,1x,i10)') 'max # of constituents/integration point: ', cMax
|
||||||
write(6,'(a42,1x,i10)') 'max # of neigbours/integration point: ', mesh_maxNipNeighbors
|
write(6,'(a42,1x,i10)') 'max # of neigbours/integration point: ', theMesh%elem%nIPneighbors
|
||||||
write(6,'(a42,1x,i10)') ' # of nonlocal constituents: ',count(.not. crystallite_localPlasticity)
|
write(6,'(a42,1x,i10)') ' # of nonlocal constituents: ',count(.not. crystallite_localPlasticity)
|
||||||
flush(6)
|
flush(6)
|
||||||
endif
|
endif
|
||||||
|
@ -458,10 +454,8 @@ function crystallite_stress()
|
||||||
math_6toSym33, &
|
math_6toSym33, &
|
||||||
math_sym33to6
|
math_sym33to6
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_NcpElems, &
|
theMesh, &
|
||||||
mesh_element, &
|
mesh_element
|
||||||
mesh_maxNips, &
|
|
||||||
FE_geomtype
|
|
||||||
use material, only: &
|
use material, only: &
|
||||||
homogenization_Ngrains, &
|
homogenization_Ngrains, &
|
||||||
plasticState, &
|
plasticState, &
|
||||||
|
@ -474,7 +468,7 @@ function crystallite_stress()
|
||||||
constitutive_LiAndItsTangents
|
constitutive_LiAndItsTangents
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
logical, dimension(mesh_maxNips,mesh_NcpElems) :: crystallite_stress
|
logical, dimension(theMesh%elem%nIPs,theMesh%Nelems) :: crystallite_stress
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
formerSubStep
|
formerSubStep
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
|
@ -541,7 +535,7 @@ function crystallite_stress()
|
||||||
endIP = startIP
|
endIP = startIP
|
||||||
else singleRun
|
else singleRun
|
||||||
startIP = 1_pInt
|
startIP = 1_pInt
|
||||||
endIP = mesh_maxNips
|
endIP = theMesh%elem%nIPs
|
||||||
endif singleRun
|
endif singleRun
|
||||||
|
|
||||||
NiterationCrystallite = 0_pInt
|
NiterationCrystallite = 0_pInt
|
||||||
|
@ -727,8 +721,7 @@ subroutine crystallite_stressTangent()
|
||||||
math_invert2, &
|
math_invert2, &
|
||||||
math_det33
|
math_det33
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_element, &
|
mesh_element
|
||||||
FE_geomtype
|
|
||||||
use material, only: &
|
use material, only: &
|
||||||
homogenization_Ngrains
|
homogenization_Ngrains
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
|
@ -929,7 +922,7 @@ function crystallite_push33ToRef(ipc,ip,el, tensor33)
|
||||||
math_inv33, &
|
math_inv33, &
|
||||||
math_EulerToR
|
math_EulerToR
|
||||||
use material, only: &
|
use material, only: &
|
||||||
material_EulerAngles
|
material_EulerAngles ! ToDo: Why stored? We also have crystallite_orientation0
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), dimension(3,3) :: crystallite_push33ToRef
|
real(pReal), dimension(3,3) :: crystallite_push33ToRef
|
||||||
|
@ -960,13 +953,10 @@ function crystallite_postResults(ipc, ip, el)
|
||||||
inDeg, &
|
inDeg, &
|
||||||
math_6toSym33
|
math_6toSym33
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
|
theMesh, &
|
||||||
mesh_element, &
|
mesh_element, &
|
||||||
mesh_ipVolume, &
|
mesh_ipVolume, &
|
||||||
mesh_maxNipNeighbors, &
|
mesh_ipNeighborhood
|
||||||
mesh_ipNeighborhood, &
|
|
||||||
FE_NipNeighbors, &
|
|
||||||
FE_geomtype, &
|
|
||||||
FE_celltype
|
|
||||||
use material, only: &
|
use material, only: &
|
||||||
plasticState, &
|
plasticState, &
|
||||||
sourceState, &
|
sourceState, &
|
||||||
|
@ -1070,14 +1060,14 @@ function crystallite_postResults(ipc, ip, el)
|
||||||
mySize = 36_pInt
|
mySize = 36_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(constitutive_homogenizedC(ipc,ip,el),[mySize])
|
crystallite_postResults(c+1:c+mySize) = reshape(constitutive_homogenizedC(ipc,ip,el),[mySize])
|
||||||
case(neighboringelement_ID)
|
case(neighboringelement_ID)
|
||||||
mySize = mesh_maxNipNeighbors
|
mySize = theMesh%elem%nIPneighbors
|
||||||
crystallite_postResults(c+1:c+mySize) = 0.0_pReal
|
crystallite_postResults(c+1:c+mySize) = 0.0_pReal
|
||||||
forall (n = 1_pInt:FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,el))))) &
|
forall (n = 1_pInt:mySize) &
|
||||||
crystallite_postResults(c+n) = real(mesh_ipNeighborhood(1,n,ip,el),pReal)
|
crystallite_postResults(c+n) = real(mesh_ipNeighborhood(1,n,ip,el),pReal)
|
||||||
case(neighboringip_ID)
|
case(neighboringip_ID)
|
||||||
mySize = mesh_maxNipNeighbors
|
mySize = theMesh%elem%nIPneighbors
|
||||||
crystallite_postResults(c+1:c+mySize) = 0.0_pReal
|
crystallite_postResults(c+1:c+mySize) = 0.0_pReal
|
||||||
forall (n = 1_pInt:FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,el))))) &
|
forall (n = 1_pInt:mySize) &
|
||||||
crystallite_postResults(c+n) = real(mesh_ipNeighborhood(2,n,ip,el),pReal)
|
crystallite_postResults(c+n) = real(mesh_ipNeighborhood(2,n,ip,el),pReal)
|
||||||
end select
|
end select
|
||||||
c = c + mySize
|
c = c + mySize
|
||||||
|
@ -2128,7 +2118,8 @@ end subroutine nonlocalConvergenceCheck
|
||||||
!> @details: For explicitEuler, RK4 and RKCK45, adaptive Euler and FPI have their on criteria
|
!> @details: For explicitEuler, RK4 and RKCK45, adaptive Euler and FPI have their on criteria
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine setConvergenceFlag()
|
subroutine setConvergenceFlag()
|
||||||
|
use mesh, only: &
|
||||||
|
mesh_element
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
e, & !< element index in element loop
|
e, & !< element index in element loop
|
||||||
|
@ -2168,7 +2159,8 @@ end subroutine setConvergenceFlag
|
||||||
!> @brief Standard forwarding of state as state = state0 + dotState * (delta t)
|
!> @brief Standard forwarding of state as state = state0 + dotState * (delta t)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine update_stress(timeFraction)
|
subroutine update_stress(timeFraction)
|
||||||
|
use mesh, only: &
|
||||||
|
mesh_element
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
timeFraction
|
timeFraction
|
||||||
|
@ -2200,6 +2192,8 @@ end subroutine update_stress
|
||||||
!> @brief tbd
|
!> @brief tbd
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine update_dependentState()
|
subroutine update_dependentState()
|
||||||
|
use mesh, only: &
|
||||||
|
mesh_element
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_dependentState => constitutive_microstructure
|
constitutive_dependentState => constitutive_microstructure
|
||||||
|
|
||||||
|
@ -2232,6 +2226,8 @@ subroutine update_state(timeFraction)
|
||||||
sourceState, &
|
sourceState, &
|
||||||
phase_Nsources, &
|
phase_Nsources, &
|
||||||
phaseAt, phasememberAt
|
phaseAt, phasememberAt
|
||||||
|
use mesh, only: &
|
||||||
|
mesh_element
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
|
@ -2281,6 +2277,8 @@ subroutine update_dotState(timeFraction)
|
||||||
sourceState, &
|
sourceState, &
|
||||||
phaseAt, phasememberAt, &
|
phaseAt, phasememberAt, &
|
||||||
phase_Nsources
|
phase_Nsources
|
||||||
|
use mesh, only: &
|
||||||
|
mesh_element
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_collectDotState
|
constitutive_collectDotState
|
||||||
|
|
||||||
|
@ -2334,6 +2332,8 @@ subroutine update_deltaState
|
||||||
IEEE_arithmetic
|
IEEE_arithmetic
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
dNeq0
|
dNeq0
|
||||||
|
use mesh, only: &
|
||||||
|
mesh_element
|
||||||
use material, only: &
|
use material, only: &
|
||||||
plasticState, &
|
plasticState, &
|
||||||
sourceState, &
|
sourceState, &
|
||||||
|
@ -2429,6 +2429,8 @@ logical function stateJump(ipc,ip,el)
|
||||||
sourceState, &
|
sourceState, &
|
||||||
phase_Nsources, &
|
phase_Nsources, &
|
||||||
phaseAt, phasememberAt
|
phaseAt, phasememberAt
|
||||||
|
use mesh, only: &
|
||||||
|
mesh_element
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_collectDeltaState
|
constitutive_collectDeltaState
|
||||||
use math, only: &
|
use math, only: &
|
||||||
|
|
Loading…
Reference in New Issue