drop support for heterogeneous meshes

heterogeneous meshes are neither advisable nor typically used
This commit is contained in:
Martin Diehl 2018-09-23 15:19:47 +02:00
parent 519cd840bd
commit db45b7615a
2 changed files with 23 additions and 12 deletions

View File

@ -1487,6 +1487,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
msg = 'no microstructure specified via State Variable 3' msg = 'no microstructure specified via State Variable 3'
case (190_pInt) case (190_pInt)
msg = 'unknown element type:' msg = 'unknown element type:'
case (191_pInt)
msg = 'mesh consists of more than one element type'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! plasticity error messages ! plasticity error messages

View File

@ -3,7 +3,6 @@
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH !> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
!> @author Christoph Koords, Max-Planck-Institut für Eisenforschung GmbH !> @author Christoph Koords, Max-Planck-Institut für Eisenforschung GmbH
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @author Krishna Komerla, Max-Planck-Institut für Eisenforschung GmbH
!> @brief Sets up the mesh for the solvers MSC.Marc, Abaqus and the spectral solver !> @brief Sets up the mesh for the solvers MSC.Marc, Abaqus and the spectral solver
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module mesh module mesh
@ -15,6 +14,7 @@ module mesh
integer(pInt), public, protected :: & integer(pInt), public, protected :: &
mesh_NcpElems, & !< total number of CP elements in local mesh mesh_NcpElems, & !< total number of CP elements in local mesh
mesh_NelemSets, & mesh_NelemSets, &
mesh_ElemType, & !< Element type of the mesh (only support homogeneous meshes)
mesh_maxNelemInSet, & mesh_maxNelemInSet, &
mesh_Nmaterials, & mesh_Nmaterials, &
mesh_Nnodes, & !< total number of nodes in mesh mesh_Nnodes, & !< total number of nodes in mesh
@ -2023,7 +2023,8 @@ subroutine mesh_marc_build_elements(fileUnit)
IO_skipChunks, & IO_skipChunks, &
IO_stringPos, & IO_stringPos, &
IO_intValue, & IO_intValue, &
IO_continuousIntValues IO_continuousIntValues, &
IO_error
implicit none implicit none
integer(pInt), intent(in) :: fileUnit integer(pInt), intent(in) :: fileUnit
@ -2034,7 +2035,8 @@ subroutine mesh_marc_build_elements(fileUnit)
integer(pInt), dimension(1_pInt+mesh_NcpElems) :: contInts integer(pInt), dimension(1_pInt+mesh_NcpElems) :: contInts
integer(pInt) :: i,j,t,sv,myVal,e,nNodesAlreadyRead integer(pInt) :: i,j,t,sv,myVal,e,nNodesAlreadyRead
allocate (mesh_element(4_pInt+mesh_maxNnodes,mesh_NcpElems)) ; mesh_element = 0_pInt allocate (mesh_element(4_pInt+mesh_maxNnodes,mesh_NcpElems), source=0_pInt)
mesh_elemType = -1_pInt
610 FORMAT(A300) 610 FORMAT(A300)
@ -2049,8 +2051,11 @@ subroutine mesh_marc_build_elements(fileUnit)
chunkPos = IO_stringPos(line) chunkPos = IO_stringPos(line)
e = mesh_FEasCP('elem',IO_intValue(line,chunkPos,1_pInt)) e = mesh_FEasCP('elem',IO_intValue(line,chunkPos,1_pInt))
if (e /= 0_pInt) then ! disregard non CP elems if (e /= 0_pInt) then ! disregard non CP elems
mesh_element(1,e) = IO_IntValue (line,chunkPos,1_pInt) ! FE id mesh_element(1,e) = IO_IntValue (line,chunkPos,1_pInt) ! FE id
t = FE_mapElemtype(IO_StringValue(line,chunkPos,2_pInt)) ! elem type t = FE_mapElemtype(IO_StringValue(line,chunkPos,2_pInt)) ! elem type
if (mesh_elemType /= t .and. mesh_elemType /= -1_pInt) &
call IO_error(191,el=t,ip=mesh_elemType)
mesh_elemType = t
mesh_element(2,e) = t mesh_element(2,e) = t
nNodesAlreadyRead = 0_pInt nNodesAlreadyRead = 0_pInt
do j = 1_pInt,chunkPos(1)-2_pInt do j = 1_pInt,chunkPos(1)-2_pInt
@ -2688,8 +2693,8 @@ subroutine mesh_abaqus_build_elements(fileUnit)
IO_intValue, & IO_intValue, &
IO_extractValue, & IO_extractValue, &
IO_floatValue, & IO_floatValue, &
IO_error, & IO_countDataLines, &
IO_countDataLines IO_error
implicit none implicit none
integer(pInt), intent(in) :: fileUnit integer(pInt), intent(in) :: fileUnit
@ -2701,7 +2706,8 @@ subroutine mesh_abaqus_build_elements(fileUnit)
character (len=64) :: materialName,elemSetName character (len=64) :: materialName,elemSetName
character(len=300) :: line character(len=300) :: line
allocate (mesh_element (4_pInt+mesh_maxNnodes,mesh_NcpElems)) ; mesh_element = 0_pInt allocate (mesh_element (4_pInt+mesh_maxNnodes,mesh_NcpElems), source=0_pInt)
mesh_elemType = -1_pInt
610 FORMAT(A300) 610 FORMAT(A300)
@ -2720,17 +2726,20 @@ subroutine mesh_abaqus_build_elements(fileUnit)
IO_lc(IO_stringValue(line,chunkPos,2_pInt)) /= 'matrix' .and. & IO_lc(IO_stringValue(line,chunkPos,2_pInt)) /= 'matrix' .and. &
IO_lc(IO_stringValue(line,chunkPos,2_pInt)) /= 'response' ) & IO_lc(IO_stringValue(line,chunkPos,2_pInt)) /= 'response' ) &
) then ) then
t = FE_mapElemtype(IO_extractValue(IO_lc(IO_stringValue(line,chunkPos,2_pInt)),'type')) ! remember elem type t = FE_mapElemtype(IO_extractValue(IO_lc(IO_stringValue(line,chunkPos,2_pInt)),'type')) ! remember elem type
c = IO_countDataLines(fileUnit) c = IO_countDataLines(fileUnit)
do i = 1_pInt,c do i = 1_pInt,c
backspace(fileUnit) backspace(fileUnit)
enddo enddo
do i = 1_pInt,c do i = 1_pInt,c
read (fileUnit,610,END=620) line read (fileUnit,610,END=620) line
chunkPos = IO_stringPos(line) ! limit to 64 nodes max chunkPos = IO_stringPos(line) ! limit to 64 nodes max
e = mesh_FEasCP('elem',IO_intValue(line,chunkPos,1_pInt)) e = mesh_FEasCP('elem',IO_intValue(line,chunkPos,1_pInt))
if (e /= 0_pInt) then ! disregard non CP elems if (e /= 0_pInt) then ! disregard non CP elems
mesh_element(1,e) = IO_intValue(line,chunkPos,1_pInt) ! FE id mesh_element(1,e) = IO_intValue(line,chunkPos,1_pInt) ! FE id
if (mesh_elemType /= t .and. mesh_elemType /= -1_pInt) &
call IO_error(191,el=t,ip=mesh_elemType)
mesh_elemType = t
mesh_element(2,e) = t ! elem type mesh_element(2,e) = t ! elem type
nNodesAlreadyRead = 0_pInt nNodesAlreadyRead = 0_pInt
do j = 1_pInt,chunkPos(1)-1_pInt do j = 1_pInt,chunkPos(1)-1_pInt