use variables from mesh object
This commit is contained in:
parent
927f947c2a
commit
c8f426a875
|
@ -298,7 +298,6 @@ subroutine material_init()
|
||||||
phase_name, &
|
phase_name, &
|
||||||
texture_name
|
texture_name
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_homogenizationAt, &
|
|
||||||
theMesh
|
theMesh
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -395,13 +394,13 @@ subroutine material_init()
|
||||||
allocate(mappingHomogenizationConst( theMesh%elem%nIPs,theMesh%Nelems),source=1_pInt)
|
allocate(mappingHomogenizationConst( theMesh%elem%nIPs,theMesh%Nelems),source=1_pInt)
|
||||||
! END DEPRECATED
|
! END DEPRECATED
|
||||||
|
|
||||||
allocate(material_homogenizationAt,source=mesh_homogenizationAt)
|
allocate(material_homogenizationAt,source=theMesh%homogenizationAt)
|
||||||
allocate(CounterPhase (size(config_phase)), source=0_pInt)
|
allocate(CounterPhase (size(config_phase)), source=0_pInt)
|
||||||
allocate(CounterHomogenization(size(config_homogenization)),source=0_pInt)
|
allocate(CounterHomogenization(size(config_homogenization)),source=0_pInt)
|
||||||
|
|
||||||
! BEGIN DEPRECATED
|
! BEGIN DEPRECATED
|
||||||
do e = 1_pInt,theMesh%Nelems
|
do e = 1_pInt,theMesh%Nelems
|
||||||
myHomog = mesh_homogenizationAt(e)
|
myHomog = theMesh%homogenizationAt(e)
|
||||||
do i = 1_pInt, theMesh%elem%nIPs
|
do i = 1_pInt, theMesh%elem%nIPs
|
||||||
CounterHomogenization(myHomog) = CounterHomogenization(myHomog) + 1_pInt
|
CounterHomogenization(myHomog) = CounterHomogenization(myHomog) + 1_pInt
|
||||||
mappingHomogenization(1:2,i,e) = [CounterHomogenization(myHomog),myHomog]
|
mappingHomogenization(1:2,i,e) = [CounterHomogenization(myHomog),myHomog]
|
||||||
|
@ -435,7 +434,7 @@ subroutine material_parseHomogenization
|
||||||
use config, only : &
|
use config, only : &
|
||||||
config_homogenization
|
config_homogenization
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_homogenizationAt
|
theMesh
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_error
|
IO_error
|
||||||
|
|
||||||
|
@ -456,7 +455,7 @@ subroutine material_parseHomogenization
|
||||||
allocate(damage_initialPhi(size(config_homogenization)), source=1.0_pReal)
|
allocate(damage_initialPhi(size(config_homogenization)), source=1.0_pReal)
|
||||||
|
|
||||||
forall (h = 1_pInt:size(config_homogenization)) &
|
forall (h = 1_pInt:size(config_homogenization)) &
|
||||||
homogenization_active(h) = any(mesh_homogenizationAt == h)
|
homogenization_active(h) = any(theMesh%homogenizationAt == h)
|
||||||
|
|
||||||
|
|
||||||
do h=1_pInt, size(config_homogenization)
|
do h=1_pInt, size(config_homogenization)
|
||||||
|
@ -542,7 +541,6 @@ subroutine material_parseMicrostructure
|
||||||
config_microstructure, &
|
config_microstructure, &
|
||||||
microstructure_name
|
microstructure_name
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_microstructureAt, &
|
|
||||||
theMesh
|
theMesh
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -558,11 +556,11 @@ subroutine material_parseMicrostructure
|
||||||
allocate(microstructure_active(size(config_microstructure)), source=.false.)
|
allocate(microstructure_active(size(config_microstructure)), source=.false.)
|
||||||
allocate(microstructure_elemhomo(size(config_microstructure)), source=.false.)
|
allocate(microstructure_elemhomo(size(config_microstructure)), source=.false.)
|
||||||
|
|
||||||
if(any(mesh_microstructureAt > size(config_microstructure))) &
|
if(any(theMesh%microstructureAt > size(config_microstructure))) &
|
||||||
call IO_error(155_pInt,ext_msg='More microstructures in geometry than sections in material.config')
|
call IO_error(155_pInt,ext_msg='More microstructures in geometry than sections in material.config')
|
||||||
|
|
||||||
forall (e = 1_pInt:theMesh%Nelems) &
|
forall (e = 1_pInt:theMesh%Nelems) &
|
||||||
microstructure_active(mesh_microstructureAt(e)) = .true. ! current microstructure used in model? Elementwise view, maximum N operations for N elements
|
microstructure_active(theMesh%microstructureAt(e)) = .true. ! current microstructure used in model? Elementwise view, maximum N operations for N elements
|
||||||
|
|
||||||
do m=1_pInt, size(config_microstructure)
|
do m=1_pInt, size(config_microstructure)
|
||||||
microstructure_Nconstituents(m) = config_microstructure(m)%countKeys('(constituent)')
|
microstructure_Nconstituents(m) = config_microstructure(m)%countKeys('(constituent)')
|
||||||
|
@ -1013,8 +1011,6 @@ subroutine material_populateGrains
|
||||||
math_sampleFiberOri, &
|
math_sampleFiberOri, &
|
||||||
math_symmetricEulers
|
math_symmetricEulers
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_homogenizationAt, &
|
|
||||||
mesh_microstructureAt, &
|
|
||||||
theMesh, &
|
theMesh, &
|
||||||
mesh_ipVolume
|
mesh_ipVolume
|
||||||
use config, only: &
|
use config, only: &
|
||||||
|
@ -1064,14 +1060,14 @@ subroutine material_populateGrains
|
||||||
! populating homogenization schemes in each
|
! populating homogenization schemes in each
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
do e = 1_pInt, theMesh%Nelems
|
do e = 1_pInt, theMesh%Nelems
|
||||||
material_homog(1_pInt:theMesh%elem%nIPs,e) = mesh_homogenizationAt(e)
|
material_homog(1_pInt:theMesh%elem%nIPs,e) = theMesh%homogenizationAt(e)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! precounting of elements for each homog/micro pair
|
! precounting of elements for each homog/micro pair
|
||||||
do e = 1_pInt, theMesh%Nelems
|
do e = 1_pInt, theMesh%Nelems
|
||||||
homog = mesh_homogenizationAt(e)
|
homog = theMesh%homogenizationAt(e)
|
||||||
micro = mesh_microstructureAt(e)
|
micro = theMesh%microstructureAt(e)
|
||||||
Nelems(homog,micro) = Nelems(homog,micro) + 1_pInt
|
Nelems(homog,micro) = Nelems(homog,micro) + 1_pInt
|
||||||
enddo
|
enddo
|
||||||
allocate(elemsOfHomogMicro(size(config_homogenization),size(config_microstructure)))
|
allocate(elemsOfHomogMicro(size(config_homogenization),size(config_microstructure)))
|
||||||
|
@ -1088,8 +1084,8 @@ subroutine material_populateGrains
|
||||||
! identify maximum grain count per IP (from element) and find grains per homog/micro pair
|
! identify maximum grain count per IP (from element) and find grains per homog/micro pair
|
||||||
Nelems = 0_pInt ! reuse as counter
|
Nelems = 0_pInt ! reuse as counter
|
||||||
elementLooping: do e = 1_pInt,theMesh%Nelems
|
elementLooping: do e = 1_pInt,theMesh%Nelems
|
||||||
homog = mesh_homogenizationAt(e)
|
homog = theMesh%homogenizationAt(e)
|
||||||
micro = mesh_microstructureAt(e)
|
micro = theMesh%microstructureAt(e)
|
||||||
if (homog < 1_pInt .or. homog > size(config_homogenization)) & ! out of bounds
|
if (homog < 1_pInt .or. homog > size(config_homogenization)) & ! out of bounds
|
||||||
call IO_error(154_pInt,e,0_pInt,0_pInt)
|
call IO_error(154_pInt,e,0_pInt,0_pInt)
|
||||||
if (micro < 1_pInt .or. micro > size(config_microstructure)) & ! out of bounds
|
if (micro < 1_pInt .or. micro > size(config_microstructure)) & ! out of bounds
|
||||||
|
|
|
@ -33,10 +33,6 @@ use PETScis
|
||||||
mesh_maxNips !< max number of IPs in any CP element
|
mesh_maxNips !< max number of IPs in any CP element
|
||||||
!!!! BEGIN DEPRECATED !!!!!
|
!!!! BEGIN DEPRECATED !!!!!
|
||||||
|
|
||||||
integer(pInt), dimension(:), allocatable, public, protected :: &
|
|
||||||
mesh_homogenizationAt, & !< homogenization ID of each element
|
|
||||||
mesh_microstructureAt !< microstructure ID of each element
|
|
||||||
|
|
||||||
integer(pInt), dimension(:,:), allocatable, public, protected :: &
|
integer(pInt), dimension(:,:), allocatable, public, protected :: &
|
||||||
mesh_element !DEPRECATED
|
mesh_element !DEPRECATED
|
||||||
|
|
||||||
|
@ -264,16 +260,12 @@ subroutine mesh_init()
|
||||||
allocate(FEsolving_execIP(2_pInt,mesh_NcpElems)); FEsolving_execIP = 1_pInt ! parallel loop bounds set to comprise from first IP...
|
allocate(FEsolving_execIP(2_pInt,mesh_NcpElems)); FEsolving_execIP = 1_pInt ! parallel loop bounds set to comprise from first IP...
|
||||||
forall (j = 1_pInt:mesh_NcpElems) FEsolving_execIP(2,j) = FE_Nips(FE_geomtype(mesh_element(2,j))) ! ...up to own IP count for each element
|
forall (j = 1_pInt:mesh_NcpElems) FEsolving_execIP(2,j) = FE_Nips(FE_geomtype(mesh_element(2,j))) ! ...up to own IP count for each element
|
||||||
|
|
||||||
!!!! COMPATIBILITY HACK !!!!
|
|
||||||
! for a homogeneous mesh, all elements have the same number of IPs and and cell nodes.
|
|
||||||
! hence, xxPerElem instead of maxXX
|
|
||||||
! better name
|
|
||||||
mesh_homogenizationAt = mesh_element(3,:)
|
|
||||||
mesh_microstructureAt = mesh_element(4,:)
|
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!
|
|
||||||
allocate(mesh_node0(3,mesh_Nnodes),source=0.0_pReal)
|
allocate(mesh_node0(3,mesh_Nnodes),source=0.0_pReal)
|
||||||
call theMesh%init(dimplex,integrationOrder,mesh_node0)
|
call theMesh%init(dimplex,integrationOrder,mesh_node0)
|
||||||
call theMesh%setNelems(mesh_NcpElems)
|
call theMesh%setNelems(mesh_NcpElems)
|
||||||
|
|
||||||
|
theMesh%homogenizationAt = mesh_element(3,:)
|
||||||
|
theMesh%microstructureAt = mesh_element(4,:)
|
||||||
|
|
||||||
end subroutine mesh_init
|
end subroutine mesh_init
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,6 @@ module mesh
|
||||||
mesh_maxNcellnodes !< max number of cell nodes in any CP element
|
mesh_maxNcellnodes !< max number of cell nodes in any CP element
|
||||||
!!!! BEGIN DEPRECATED !!!!!
|
!!!! BEGIN DEPRECATED !!!!!
|
||||||
|
|
||||||
integer(pInt), dimension(:), allocatable, public, protected :: &
|
|
||||||
mesh_homogenizationAt, & !< homogenization ID of each element
|
|
||||||
mesh_microstructureAt !< microstructure ID of each element
|
|
||||||
|
|
||||||
integer(pInt), dimension(:,:), allocatable, public, protected :: &
|
integer(pInt), dimension(:,:), allocatable, public, protected :: &
|
||||||
mesh_element, & !DEPRECATED
|
mesh_element, & !DEPRECATED
|
||||||
mesh_sharedElem, & !< entryCount and list of elements containing node
|
mesh_sharedElem, & !< entryCount and list of elements containing node
|
||||||
|
@ -520,9 +516,8 @@ subroutine mesh_init(ip,el)
|
||||||
|
|
||||||
|
|
||||||
! better name
|
! better name
|
||||||
mesh_homogenizationAt = mesh_element(3,:)
|
theMesh%homogenizationAt = mesh_element(3,:)
|
||||||
mesh_microstructureAt = mesh_element(4,:)
|
theMesh%microstructureAt = mesh_element(4,:)
|
||||||
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,8 @@ module mesh
|
||||||
|
|
||||||
integer(pInt), dimension(:), allocatable, private :: &
|
integer(pInt), dimension(:), allocatable, private :: &
|
||||||
microGlobal
|
microGlobal
|
||||||
integer(pInt), dimension(:), allocatable, public, protected :: &
|
integer(pInt), dimension(:), allocatable, private :: &
|
||||||
mesh_homogenizationAt, & !< homogenization ID of each element
|
mesh_homogenizationAt
|
||||||
mesh_microstructureAt !< microstructure ID of each element
|
|
||||||
|
|
||||||
integer(pInt), dimension(:,:), allocatable, public, protected :: &
|
integer(pInt), dimension(:,:), allocatable, public, protected :: &
|
||||||
mesh_element !< entryCount and list of elements containing node
|
mesh_element !< entryCount and list of elements containing node
|
||||||
|
@ -268,7 +267,8 @@ subroutine mesh_init(ip,el)
|
||||||
! for a homogeneous mesh, all elements have the same number of IPs and and cell nodes.
|
! for a homogeneous mesh, all elements have the same number of IPs and and cell nodes.
|
||||||
! hence, xxPerElem instead of maxXX
|
! hence, xxPerElem instead of maxXX
|
||||||
! better name
|
! better name
|
||||||
mesh_microstructureAt = mesh_element(4,:)
|
theMesh%homogenizationAt = mesh_element(3,:)
|
||||||
|
theMesh%microstructureAt = mesh_element(4,:)
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
deallocate(mesh_cell)
|
deallocate(mesh_cell)
|
||||||
end subroutine mesh_init
|
end subroutine mesh_init
|
||||||
|
|
|
@ -18,10 +18,6 @@ module mesh
|
||||||
mesh_Ncells, & !< total number of cells in mesh
|
mesh_Ncells, & !< total number of cells in mesh
|
||||||
mesh_maxNsharedElems !< max number of CP elements sharing a node
|
mesh_maxNsharedElems !< max number of CP elements sharing a node
|
||||||
|
|
||||||
integer(pInt), dimension(:), allocatable, public, protected :: &
|
|
||||||
mesh_homogenizationAt, & !< homogenization ID of each element
|
|
||||||
mesh_microstructureAt !< microstructure ID of each element
|
|
||||||
|
|
||||||
integer(pInt), dimension(:,:), allocatable, public, protected :: &
|
integer(pInt), dimension(:,:), allocatable, public, protected :: &
|
||||||
mesh_element, & !DEPRECATED
|
mesh_element, & !DEPRECATED
|
||||||
mesh_sharedElem, & !< entryCount and list of elements containing node
|
mesh_sharedElem, & !< entryCount and list of elements containing node
|
||||||
|
@ -408,11 +404,8 @@ subroutine mesh_init(ip,el)
|
||||||
calcMode = .false. ! pretend to have collected what first call is asking (F = I)
|
calcMode = .false. ! pretend to have collected what first call is asking (F = I)
|
||||||
calcMode(ip,mesh_FEasCP('elem',el)) = .true. ! first ip,el needs to be already pingponged to "calc"
|
calcMode(ip,mesh_FEasCP('elem',el)) = .true. ! first ip,el needs to be already pingponged to "calc"
|
||||||
|
|
||||||
!!!! COMPATIBILITY HACK !!!!
|
theMesh%homogenizationAt = mesh_element(3,:)
|
||||||
! better name
|
theMesh%microstructureAt = mesh_element(4,:)
|
||||||
mesh_homogenizationAt = mesh_element(3,:)
|
|
||||||
mesh_microstructureAt = mesh_element(4,:)
|
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
end subroutine mesh_init
|
end subroutine mesh_init
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue