In mesh_marc_build_elements use mesh_NcpElems instead of mesh_Nelems (line 2906).

Fixes error when not all elements are CP elements.

Some formating and comment improvements.
This commit is contained in:
Franz Roters 2014-12-15 11:51:32 +00:00
parent b24b954f35
commit e6e72ab3a7
1 changed files with 25 additions and 25 deletions

View File

@ -1171,8 +1171,8 @@ end subroutine mesh_spectral_mapNodesAndElems
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Gets maximum count of nodes, IPs, IP neighbors, and subNodes among cpElements. !> @brief Gets maximum count of nodes, IPs, IP neighbors, and subNodes among cpElements.
!! Allocates global arrays 'mesh_maxNnodes', 'mesh_maxNips', mesh_maxNipNeighbors', !! Sets global values 'mesh_maxNnodes', 'mesh_maxNips', mesh_maxNipNeighbors',
!! and mesh_maxNcellnodes !! and 'mesh_maxNcellnodes'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine mesh_spectral_count_cpSizes subroutine mesh_spectral_count_cpSizes
@ -2611,7 +2611,7 @@ subroutine mesh_marc_count_cpElements(fileUnit)
do i=1_pInt,3_pInt+hypoelasticTableStyle ! Skip 3 or 4 lines do i=1_pInt,3_pInt+hypoelasticTableStyle ! Skip 3 or 4 lines
read (fileUnit,610,END=620) line read (fileUnit,610,END=620) line
enddo enddo
mesh_NcpElems = mesh_NcpElems + IO_countContinuousIntValues(fileUnit) mesh_NcpElems = mesh_NcpElems + IO_countContinuousIntValues(fileUnit) ! why not simply mesh_NcpElems = IO_countContinuousIntValues(fileUnit)?
exit exit
endif endif
enddo enddo
@ -2767,8 +2767,8 @@ end subroutine mesh_marc_build_nodes
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Gets maximum count of nodes, IPs, IP neighbors, and cellnodes among cpElements. !> @brief Gets maximum count of nodes, IPs, IP neighbors, and cellnodes among cpElements.
!! Allocates global arrays 'mesh_maxNnodes', 'mesh_maxNips', mesh_maxNipNeighbors', !! Sets global values 'mesh_maxNnodes', 'mesh_maxNips', mesh_maxNipNeighbors',
!! and mesh_maxNcellnodes !! and 'mesh_maxNcellnodes'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine mesh_marc_count_cpSizes(fileUnit) subroutine mesh_marc_count_cpSizes(fileUnit)
@ -2821,7 +2821,7 @@ subroutine mesh_marc_count_cpSizes(fileUnit)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Store FEid, type, mat, tex, and node list per elemen. !> @brief Store FEid, type, mat, tex, and node list per element.
!! Allocates global array 'mesh_element' !! Allocates global array 'mesh_element'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine mesh_marc_build_elements(fileUnit) subroutine mesh_marc_build_elements(fileUnit)
@ -2882,7 +2882,7 @@ subroutine mesh_marc_build_elements(fileUnit)
endif endif
enddo enddo
620 rewind(fileUnit) ! just in case "initial state" apears before "connectivity" 620 rewind(fileUnit) ! just in case "initial state" appears before "connectivity"
read (fileUnit,610,END=620) line read (fileUnit,610,END=620) line
do do
myPos(1:1+2*2) = IO_stringPos(line,2_pInt) myPos(1:1+2*2) = IO_stringPos(line,2_pInt)
@ -2903,7 +2903,7 @@ subroutine mesh_marc_build_elements(fileUnit)
read (fileUnit,610,END=630) line ! read extra line read (fileUnit,610,END=630) line ! read extra line
endif endif
contInts = IO_continuousIntValues& ! get affected elements contInts = IO_continuousIntValues& ! get affected elements
(fileUnit,mesh_Nelems,mesh_nameElemSet,mesh_mapElemSet,mesh_NelemSets) (fileUnit,mesh_NcpElems,mesh_nameElemSet,mesh_mapElemSet,mesh_NelemSets)
do i = 1_pInt,contInts(1) do i = 1_pInt,contInts(1)
e = mesh_FEasCP('elem',contInts(1_pInt+i)) e = mesh_FEasCP('elem',contInts(1_pInt+i))
mesh_element(1_pInt+sv,e) = myVal mesh_element(1_pInt+sv,e) = myVal
@ -3438,8 +3438,8 @@ end subroutine mesh_abaqus_build_nodes
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Gets maximum count of nodes, IPs, IP neighbors, and subNodes among cpElements. !> @brief Gets maximum count of nodes, IPs, IP neighbors, and subNodes among cpElements.
!! Allocates global arrays 'mesh_maxNnodes', 'mesh_maxNips', mesh_maxNipNeighbors', !! Sets global values 'mesh_maxNnodes', 'mesh_maxNips', mesh_maxNipNeighbors',
!! and mesh_maxNcellnodes !! and 'mesh_maxNcellnodes'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine mesh_abaqus_count_cpSizes(fileUnit) subroutine mesh_abaqus_count_cpSizes(fileUnit)