not needed
This commit is contained in:
parent
bf4c5741b9
commit
464a2e217e
|
@ -197,7 +197,6 @@ module material
|
|||
microstructure_fraction !< vol fraction of each constituent in microstructure
|
||||
|
||||
real(pReal), dimension(:,:,:), allocatable, private :: &
|
||||
material_volume, & !< volume of each grain,IP,element
|
||||
texture_Gauss, & !< data of each Gauss component
|
||||
texture_transformation !< transformation for each texture
|
||||
|
||||
|
@ -980,14 +979,11 @@ subroutine material_populateGrains
|
|||
math_mul33x33, &
|
||||
math_range
|
||||
use mesh, only: &
|
||||
theMesh, &
|
||||
mesh_ipVolume
|
||||
theMesh
|
||||
use config, only: &
|
||||
config_homogenization, &
|
||||
config_microstructure, &
|
||||
config_deallocate, &
|
||||
homogenization_name, &
|
||||
microstructure_name
|
||||
config_deallocate
|
||||
use IO, only: &
|
||||
IO_error
|
||||
use debug, only: &
|
||||
|
@ -1003,7 +999,6 @@ subroutine material_populateGrains
|
|||
randomOrder
|
||||
real(pReal), dimension (microstructure_maxNconstituents) :: &
|
||||
rndArray
|
||||
real(pReal), dimension (:), allocatable :: volumeOfGrain
|
||||
real(pReal), dimension (:,:), allocatable :: orientationOfGrain
|
||||
real(pReal), dimension (3) :: orientation
|
||||
integer(pInt), dimension (:), allocatable :: phaseOfGrain, textureOfGrain
|
||||
|
@ -1016,7 +1011,6 @@ subroutine material_populateGrains
|
|||
|
||||
myDebug = debug_level(debug_material)
|
||||
|
||||
allocate(material_volume(homogenization_maxNgrains,theMesh%elem%nIPs,theMesh%Nelems), source=0.0_pReal)
|
||||
allocate(material_phase(homogenization_maxNgrains,theMesh%elem%nIPs,theMesh%Nelems), source=0_pInt)
|
||||
allocate(material_texture(homogenization_maxNgrains,theMesh%elem%nIPs,theMesh%Nelems), source=0_pInt)
|
||||
allocate(material_EulerAngles(3,homogenization_maxNgrains,theMesh%elem%nIPs,theMesh%Nelems),source=0.0_pReal)
|
||||
|
@ -1062,7 +1056,6 @@ subroutine material_populateGrains
|
|||
elemsOfHomogMicro(homog,micro)%p(Nelems(homog,micro)) = e ! remember elements active in this homog/micro pair
|
||||
enddo elementLooping
|
||||
|
||||
allocate(volumeOfGrain(maxval(Ngrains)), source=0.0_pReal) ! reserve memory for maximum case
|
||||
allocate(phaseOfGrain(maxval(Ngrains)), source=0_pInt) ! reserve memory for maximum case
|
||||
allocate(textureOfGrain(maxval(Ngrains)), source=0_pInt) ! reserve memory for maximum case
|
||||
allocate(orientationOfGrain(3,maxval(Ngrains)),source=0.0_pReal) ! reserve memory for maximum case
|
||||
|
@ -1077,32 +1070,6 @@ subroutine material_populateGrains
|
|||
activePair: if (Ngrains(homog,micro) > 0_pInt) then
|
||||
myNgrains = Ngrains(homog,micro) ! assign short name for total number of grains to populate
|
||||
myNconstituents = microstructure_Nconstituents(micro) ! assign short name for number of constituents
|
||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) &
|
||||
write(6,'(/,a32,1x,a32,1x,i6)') homogenization_name(homog),microstructure_name(micro),myNgrains
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! calculate volume of each grain
|
||||
|
||||
volumeOfGrain = 0.0_pReal
|
||||
grain = 0_pInt
|
||||
|
||||
do hme = 1_pInt, Nelems(homog,micro)
|
||||
e = elemsOfHomogMicro(homog,micro)%p(hme) ! my combination of homog and micro, only perform calculations for elements with homog, micro combinations which is indexed in cpElemsindex
|
||||
if (microstructure_elemhomo(micro)) then ! homogeneous distribution of grains over each element's IPs
|
||||
volumeOfGrain(grain+1_pInt:grain+dGrains) = sum(mesh_ipVolume(1:theMesh%elem%nIPs,e))/&
|
||||
real(dGrains,pReal) ! each grain combines size of all IPs in that element
|
||||
grain = grain + dGrains ! wind forward by Ngrains@IP
|
||||
else
|
||||
forall (i = 1_pInt:theMesh%elem%nIPs) & ! loop over IPs
|
||||
volumeOfGrain(grain+(i-1)*dGrains+1_pInt:grain+i*dGrains) = &
|
||||
mesh_ipVolume(i,e)/real(dGrains,pReal) ! assign IPvolume/Ngrains@IP to all grains of IP
|
||||
grain = grain + theMesh%elem%nIPs * dGrains ! wind forward by Nips*Ngrains@IP
|
||||
endif
|
||||
enddo
|
||||
|
||||
if (grain /= myNgrains) &
|
||||
call IO_error(0,el = homog,ip = micro,ext_msg = 'inconsistent grain count after volume calc')
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! divide myNgrains as best over constituents
|
||||
|
@ -1230,7 +1197,6 @@ subroutine material_populateGrains
|
|||
currentGrainOfConstituent(c)))
|
||||
ipGrain = ipGrain + 1_pInt ! advance IP grain counter
|
||||
currentGrainOfConstituent(c) = currentGrainOfConstituent(c) + 1_pInt ! advance index of grain population for constituent c
|
||||
material_volume(ipGrain,i,e) = volumeOfGrain(grain+currentGrainOfConstituent(c)) ! assign properties
|
||||
material_phase(ipGrain,i,e) = phaseOfGrain(grain+currentGrainOfConstituent(c))
|
||||
material_texture(ipGrain,i,e) = textureOfGrain(grain+currentGrainOfConstituent(c))
|
||||
material_EulerAngles(1:3,ipGrain,i,e) = orientationOfGrain(1:3,grain+currentGrainOfConstituent(c))
|
||||
|
@ -1240,7 +1206,6 @@ subroutine material_populateGrains
|
|||
grain = sum(NgrainsOfConstituent(1:c-1_pInt)) ! figure out actual starting index in overall/consecutive grain population
|
||||
do ipGrain = ipGrain + 1_pInt, dGrains ! ensure last constituent fills up to dGrains
|
||||
currentGrainOfConstituent(c) = currentGrainOfConstituent(c) + 1_pInt
|
||||
material_volume(ipGrain,i,e) = volumeOfGrain(grain+currentGrainOfConstituent(c))
|
||||
material_phase(ipGrain,i,e) = phaseOfGrain(grain+currentGrainOfConstituent(c))
|
||||
material_texture(ipGrain,i,e) = textureOfGrain(grain+currentGrainOfConstituent(c))
|
||||
material_EulerAngles(1:3,ipGrain,i,e) = orientationOfGrain(1:3,grain+currentGrainOfConstituent(c))
|
||||
|
@ -1249,7 +1214,6 @@ subroutine material_populateGrains
|
|||
enddo
|
||||
|
||||
do i = i, theMesh%elem%nIPs ! loop over IPs to (possibly) distribute copies from first IP
|
||||
material_volume (1_pInt:dGrains,i,e) = material_volume (1_pInt:dGrains,1,e)
|
||||
material_phase (1_pInt:dGrains,i,e) = material_phase (1_pInt:dGrains,1,e)
|
||||
material_texture(1_pInt:dGrains,i,e) = material_texture(1_pInt:dGrains,1,e)
|
||||
material_EulerAngles(1:3,1_pInt:dGrains,i,e) = material_EulerAngles(1:3,1_pInt:dGrains,1,e)
|
||||
|
|
Loading…
Reference in New Issue