not needed to parse in nElem
This commit is contained in:
parent
f044b8c42f
commit
d2a3fd3ac8
|
@ -36,9 +36,9 @@ module mesh
|
||||||
mesh_mapFEtoCPelem, & !< [sorted FEid, corresponding CPid]
|
mesh_mapFEtoCPelem, & !< [sorted FEid, corresponding CPid]
|
||||||
mesh_mapFEtoCPnode !< [sorted FEid, corresponding CPid]
|
mesh_mapFEtoCPnode !< [sorted FEid, corresponding CPid]
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
mesh_init, &
|
mesh_init, &
|
||||||
mesh_FEasCP
|
mesh_FEasCP
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ subroutine mesh_init(ip,el)
|
||||||
Nnodes !< total number of nodes in mesh
|
Nnodes !< total number of nodes in mesh
|
||||||
|
|
||||||
real(pReal), dimension(:,:), allocatable :: &
|
real(pReal), dimension(:,:), allocatable :: &
|
||||||
ip_reshaped
|
IP_reshaped
|
||||||
integer,dimension(:,:,:), allocatable :: &
|
integer,dimension(:,:,:), allocatable :: &
|
||||||
connectivity_cell !< cell connectivity for each element,ip/cell
|
connectivity_cell !< cell connectivity for each element,ip/cell
|
||||||
integer, dimension(:,:), allocatable :: &
|
integer, dimension(:,:), allocatable :: &
|
||||||
|
@ -95,17 +95,17 @@ subroutine mesh_init(ip,el)
|
||||||
allocate(node0_cell(3,maxval(connectivity_cell)))
|
allocate(node0_cell(3,maxval(connectivity_cell)))
|
||||||
call buildCellNodes(node0_cell,&
|
call buildCellNodes(node0_cell,&
|
||||||
cellNodeDefinition,node0_elem)
|
cellNodeDefinition,node0_elem)
|
||||||
allocate(ip_reshaped(3,elem%nIPs*nElems),source=0.0_pReal)
|
allocate(IP_reshaped(3,elem%nIPs*nElems),source=0.0_pReal)
|
||||||
call buildIPcoordinates(ip_reshaped,reshape(connectivity_cell,[elem%NcellNodesPerCell,&
|
call buildIPcoordinates(IP_reshaped,reshape(connectivity_cell,[elem%NcellNodesPerCell,&
|
||||||
elem%nIPs*nElems]),node0_cell)
|
elem%nIPs*nElems]),node0_cell)
|
||||||
|
|
||||||
call discretization_init(microstructureAt,homogenizationAt,&
|
call discretization_init(microstructureAt,homogenizationAt,&
|
||||||
ip_reshaped,&
|
IP_reshaped,&
|
||||||
node0_cell)
|
node0_cell)
|
||||||
|
|
||||||
call writeGeometry(elem,connectivity_elem,&
|
call writeGeometry(elem,connectivity_elem,&
|
||||||
reshape(connectivity_cell,[elem%NcellNodesPerCell,elem%nIPs*nElems]),&
|
reshape(connectivity_cell,[elem%NcellNodesPerCell,elem%nIPs*nElems]),&
|
||||||
node0_cell,ip_reshaped)
|
node0_cell,IP_reshaped)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! geometry information required by the nonlocal CP model
|
! geometry information required by the nonlocal CP model
|
||||||
|
@ -212,7 +212,7 @@ subroutine inputRead(elem,node0_elem,connectivity_elem,microstructureAt,homogeni
|
||||||
nElems,inputFile)
|
nElems,inputFile)
|
||||||
|
|
||||||
allocate (mesh_mapFEtoCPelem(2,nElems), source=0)
|
allocate (mesh_mapFEtoCPelem(2,nElems), source=0)
|
||||||
call inputRead_mapElems(elem%nNodes,nElems,&
|
call inputRead_mapElems(elem%nNodes,&
|
||||||
inputFile)
|
inputFile)
|
||||||
|
|
||||||
allocate (mesh_mapFEtoCPnode(2,Nnodes), source=0)
|
allocate (mesh_mapFEtoCPnode(2,Nnodes), source=0)
|
||||||
|
@ -421,11 +421,9 @@ end subroutine inputRead_mapElemSets
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Maps elements from FE ID to internal (consecutive) representation.
|
!> @brief Maps elements from FE ID to internal (consecutive) representation.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine inputRead_mapElems(nNodes,nElem,fileContent)
|
subroutine inputRead_mapElems(nNodes,fileContent)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: nNodes !< number of nodes per element
|
||||||
nElem, &
|
|
||||||
nNodes !< number of nodes per element
|
|
||||||
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
|
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
|
||||||
|
|
||||||
integer, allocatable, dimension(:) :: chunkPos
|
integer, allocatable, dimension(:) :: chunkPos
|
||||||
|
@ -435,7 +433,7 @@ subroutine inputRead_mapElems(nNodes,nElem,fileContent)
|
||||||
chunkPos = IO_stringPos(fileContent(l))
|
chunkPos = IO_stringPos(fileContent(l))
|
||||||
if( IO_lc(IO_stringValue(fileContent(l),chunkPos,1)) == 'connectivity' ) then
|
if( IO_lc(IO_stringValue(fileContent(l),chunkPos,1)) == 'connectivity' ) then
|
||||||
j = 0
|
j = 0
|
||||||
do i = 1,nElem
|
do i = 1,size(mesh_mapFEtoCPelem,2)
|
||||||
chunkPos = IO_stringPos(fileContent(l+1+i+j))
|
chunkPos = IO_stringPos(fileContent(l+1+i+j))
|
||||||
mesh_mapFEtoCPelem(:,i) = [IO_intValue(fileContent(l+1+i+j),chunkPos,1),i]
|
mesh_mapFEtoCPelem(:,i) = [IO_intValue(fileContent(l+1+i+j),chunkPos,1),i]
|
||||||
nNodesAlreadyRead = chunkPos(1) - 2
|
nNodesAlreadyRead = chunkPos(1) - 2
|
||||||
|
|
Loading…
Reference in New Issue