consistent (and better understandable) names

This commit is contained in:
Martin Diehl 2018-10-04 06:03:48 +02:00
parent 97d2c2b353
commit df473302f4
3 changed files with 24 additions and 27 deletions

View File

@ -363,7 +363,7 @@ subroutine material_init()
phase_name, & phase_name, &
texture_name texture_name
use mesh, only: & use mesh, only: &
mesh_homogenization, & mesh_homogenizationAt, &
mesh_NipsPerElem, & mesh_NipsPerElem, &
mesh_maxNips, & mesh_maxNips, &
mesh_NcpElems, & mesh_NcpElems, &
@ -481,7 +481,7 @@ subroutine material_init()
allocate(CrystallitePosition (size(config_phase)), source=0_pInt) allocate(CrystallitePosition (size(config_phase)), source=0_pInt)
ElemLoop:do e = 1_pInt,mesh_NcpElems ElemLoop:do e = 1_pInt,mesh_NcpElems
myHomog = mesh_homogenization(e) myHomog = mesh_homogenizationAt(e)
IPloop:do i = 1_pInt, mesh_NipsPerElem IPloop:do i = 1_pInt, mesh_NipsPerElem
HomogenizationPosition(myHomog) = HomogenizationPosition(myHomog) + 1_pInt HomogenizationPosition(myHomog) = HomogenizationPosition(myHomog) + 1_pInt
mappingHomogenization(1:2,i,e) = [HomogenizationPosition(myHomog),myHomog] mappingHomogenization(1:2,i,e) = [HomogenizationPosition(myHomog),myHomog]
@ -521,7 +521,7 @@ subroutine material_parseHomogenization
use config, only : & use config, only : &
config_homogenization config_homogenization
use mesh, only: & use mesh, only: &
mesh_homogenization mesh_homogenizationAt
use IO, only: & use IO, only: &
IO_error IO_error
@ -551,7 +551,7 @@ subroutine material_parseHomogenization
allocate(hydrogenflux_initialCh(size(config_homogenization)), source=0.0_pReal) allocate(hydrogenflux_initialCh(size(config_homogenization)), source=0.0_pReal)
forall (h = 1_pInt:size(config_homogenization)) & forall (h = 1_pInt:size(config_homogenization)) &
homogenization_active(h) = any(mesh_homogenization == h) homogenization_active(h) = any(mesh_homogenizationAt == h)
do h=1_pInt, size(config_homogenization) do h=1_pInt, size(config_homogenization)
@ -687,7 +687,7 @@ subroutine material_parseMicrostructure
config_microstructure, & config_microstructure, &
microstructure_name microstructure_name
use mesh, only: & use mesh, only: &
mesh_microstructure, & mesh_microstructureAt, &
mesh_NcpElems mesh_NcpElems
implicit none implicit none
@ -703,11 +703,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_microstructure > size(config_microstructure))) & if(any(mesh_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:mesh_NcpElems) & forall (e = 1_pInt:mesh_NcpElems) &
microstructure_active(mesh_microstructure(e)) = .true. ! current microstructure used in model? Elementwise view, maximum N operations for N elements microstructure_active(mesh_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)')
@ -1087,8 +1087,8 @@ subroutine material_populateGrains
use mesh, only: & use mesh, only: &
mesh_NipsPerElem, & mesh_NipsPerElem, &
mesh_elemType, & mesh_elemType, &
mesh_homogenization, & mesh_homogenizationAt, &
mesh_microstructure, & mesh_microstructureAt, &
mesh_maxNips, & mesh_maxNips, &
mesh_NcpElems, & mesh_NcpElems, &
mesh_ipVolume, & mesh_ipVolume, &
@ -1141,14 +1141,14 @@ subroutine material_populateGrains
! populating homogenization schemes in each ! populating homogenization schemes in each
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
do e = 1_pInt, mesh_NcpElems do e = 1_pInt, mesh_NcpElems
material_homog(1_pInt:mesh_NipsPerElem,e) = mesh_homogenization(e) material_homog(1_pInt:mesh_NipsPerElem,e) = mesh_homogenizationAt(e)
enddo enddo
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! precounting of elements for each homog/micro pair ! precounting of elements for each homog/micro pair
do e = 1_pInt, mesh_NcpElems do e = 1_pInt, mesh_NcpElems
homog = mesh_homogenization(e) homog = mesh_homogenizationAt(e)
micro = mesh_microstructure(e) micro = mesh_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)))
@ -1166,8 +1166,8 @@ subroutine material_populateGrains
Nelems = 0_pInt ! reuse as counter Nelems = 0_pInt ! reuse as counter
elementLooping: do e = 1_pInt,mesh_NcpElems elementLooping: do e = 1_pInt,mesh_NcpElems
t = mesh_elemType t = mesh_elemType
homog = mesh_homogenization(e) homog = mesh_homogenizationAt(e)
micro = mesh_microstructure(e) micro = mesh_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

View File

@ -30,11 +30,11 @@ module mesh
!!!! BEGIN DEPRECATED !!!!! !!!! BEGIN DEPRECATED !!!!!
integer(pInt), dimension(:), allocatable, public, protected :: & integer(pInt), dimension(:), allocatable, public, protected :: &
mesh_homogenization, & !< homogenization ID of each element mesh_homogenizationAt, & !< homogenization ID of each element
mesh_microstructure !< 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_CPnodeID, & mesh_CPnodeID, & !< nodes forming an element
mesh_element, & !DEPRECATED mesh_element, & !DEPRECATED
mesh_sharedElem, & !< entryCount and list of elements containing node mesh_sharedElem, & !< entryCount and list of elements containing node
mesh_nodeTwins !< node twins are surface nodes that lie exactly on opposite sides of the mesh (surfaces nodes with equal coordinate values in two dimensions) mesh_nodeTwins !< node twins are surface nodes that lie exactly on opposite sides of the mesh (surfaces nodes with equal coordinate values in two dimensions)
@ -646,8 +646,8 @@ subroutine mesh_init(ip,el)
mesh_NipsPerElem = mesh_maxNips mesh_NipsPerElem = mesh_maxNips
mesh_NcellnodesPerElem = mesh_maxNcellnodes mesh_NcellnodesPerElem = mesh_maxNcellnodes
! better name ! better name
mesh_homogenization = mesh_element(3,:) mesh_homogenizationAt = mesh_element(3,:)
mesh_microstructure = mesh_element(4,:) mesh_microstructureAt = mesh_element(4,:)
mesh_CPnodeID = mesh_element(5:4+mesh_NipsPerElem,:) mesh_CPnodeID = mesh_element(5:4+mesh_NipsPerElem,:)
!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!

View File

@ -35,13 +35,10 @@ use PETScis
!!!! BEGIN DEPRECATED !!!!! !!!! BEGIN DEPRECATED !!!!!
integer(pInt), dimension(:), allocatable, public, protected :: & integer(pInt), dimension(:), allocatable, public, protected :: &
mesh_homogenization, & !< homogenization ID of each element mesh_homogenizationAt, & !< homogenization ID of each element
mesh_microstructure !< homogenization ID of each element mesh_microstructureAt !< microstructure ID of each element
real(pReal), public, protected :: charLength
integer(pInt), dimension(:,:), allocatable, public, protected :: & integer(pInt), dimension(:,:), allocatable, public, protected :: &
!mesh_CPnodeID, &
mesh_element !DEPRECATED mesh_element !DEPRECATED
real(pReal), dimension(:,:), allocatable, public :: & real(pReal), dimension(:,:), allocatable, public :: &
@ -243,8 +240,8 @@ subroutine mesh_init()
! hence, xxPerElem instead of maxXX ! hence, xxPerElem instead of maxXX
mesh_NipsPerElem = mesh_maxNips mesh_NipsPerElem = mesh_maxNips
! better name ! better name
mesh_homogenization = mesh_element(3,:) mesh_homogenizationAt = mesh_element(3,:)
mesh_microstructure = mesh_element(4,:) mesh_microstructureAt = mesh_element(4,:)
!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!
end subroutine mesh_init end subroutine mesh_init