MAXNCHUNKS capitalized since it is a parameter

This commit is contained in:
Martin Diehl 2015-08-06 09:24:56 +00:00
parent 3d94ae4074
commit 563d9e64dd
8 changed files with 105 additions and 111 deletions

View File

@ -90,11 +90,11 @@ program DAMASK_spectral_Driver
! variables related to information from load case and geom file
real(pReal), dimension(9) :: temp_valueVector = 0.0_pReal !< temporarily from loadcase file when reading in tensors (initialize to 0.0)
logical, dimension(9) :: temp_maskVector = .false. !< temporarily from loadcase file when reading in tensors
integer(pInt), parameter :: maxNchunks = (1_pInt + 9_pInt)*3_pInt + & ! deformation, rotation, and stress
integer(pInt), parameter :: MAXNCHUNKS = (1_pInt + 9_pInt)*3_pInt + & ! deformation, rotation, and stress
(1_pInt + 1_pInt)*5_pInt + & ! time, (log)incs, temp, restartfrequency, and outputfrequency
1_pInt, & ! dropguessing
FILEUNIT = 234_pInt !< file unit, DAMASK IO does not support newunit feature
integer(pInt), dimension(1_pInt + maxNchunks*2_pInt) :: positions ! this is longer than needed for geometry parsing
integer(pInt), dimension(1_pInt + MAXNCHUNKS*2_pInt) :: positions ! this is longer than needed for geometry parsing
integer(pInt) :: &
N_t = 0_pInt, & !< # of time indicators found in load case file
@ -167,7 +167,7 @@ program DAMASK_spectral_Driver
line = IO_read(FILEUNIT)
if (trim(line) == IO_EOF) exit
if (IO_isBlank(line)) cycle ! skip empty lines
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
do i = 1_pInt, positions(1) ! reading compulsory parameters for loadcase
select case (IO_lc(IO_stringValue(line,positions,i)))
case('l','velocitygrad','velgrad','velocitygradient','fdot','dotf','f')
@ -207,7 +207,7 @@ program DAMASK_spectral_Driver
if (trim(line) == IO_EOF) exit
if (IO_isBlank(line)) cycle ! skip empty lines
currentLoadCase = currentLoadCase + 1_pInt
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
do i = 1_pInt, positions(1)
select case (IO_lc(IO_stringValue(line,positions,i)))
case('fdot','dotf','l','velocitygrad','velgrad','velocitygradient','f') ! assign values for the deformation BC matrix

View File

@ -67,8 +67,8 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
i, &
worldrank = 0
integer, parameter :: &
maxNchunks = 128 !< DAMASK_spectral + (l,g,w,r)*2 + h
integer, dimension(1+ 2* maxNchunks) :: &
MAXNCHUNKS = 128 !< DAMASK_spectral + (l,g,w,r)*2 + h
integer, dimension(1+ 2* MAXNCHUNKS) :: &
positions
integer, dimension(8) :: &
dateAndTime ! type default integer
@ -102,7 +102,7 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
commandLine = 'n/a'
else if ( .not.( present(loadcaseParameterIn) .and. present(geometryParameterIn))) then ! none parameters given in function call, trying to get them from command line
call get_command(commandLine)
positions = IIO_stringPos(commandLine,maxNchunks)
positions = IIO_stringPos(commandLine,MAXNCHUNKS)
do i = 1, positions(1)
tag = IIO_lc(IIO_stringValue(commandLine,positions,i)) ! extract key
select case(tag)
@ -540,16 +540,14 @@ end function IIO_lc
!--------------------------------------------------------------------------------------------------
!> @brief taken from IO, check IO_stringPos for documentation
!--------------------------------------------------------------------------------------------------
pure function IIO_stringPos(line,N)
pure function IIO_stringPos(string,N)
implicit none
integer(pInt), intent(in) :: N
integer(pInt) :: IIO_stringPos(1_pInt+N*2_pInt)
integer(pInt), intent(in) :: N !< maximum number of parts
integer(pInt), dimension(1_pInt+N*2_pInt) :: IIO_stringPos
character(len=*), intent(in) :: string !< string in which parts are searched for
character(len=*), intent(in) :: line
character(len=*), parameter :: sep=achar(44)//achar(32)//achar(9)//achar(10)//achar(13) ! comma and whitespaces
character(len=*), parameter :: SEP=achar(44)//achar(32)//achar(9)//achar(10)//achar(13) ! comma and whitespaces
integer :: left, right ! no pInt (verify and scan return default integer)
@ -557,12 +555,10 @@ pure function IIO_stringPos(line,N)
IIO_stringPos(1) = 0_pInt
right = 0
do while (verify(line(right+1:),sep)>0)
left = right + verify(line(right+1:),sep)
right = left + scan(line(left:),sep) - 2
if ( line(left:left) == '#' ) then
exit
endif
do while (verify(string(right+1:),SEP)>0)
left = right + verify(string(right+1:),SEP)
right = left + scan(string(left:),SEP) - 2
if ( string(left:left) == '#' ) exit
if ( IIO_stringPos(1)<N ) then
IIO_stringPos(1_pInt+IIO_stringPos(1)*2_pInt+1_pInt) = int(left, pInt)
IIO_stringPos(1_pInt+IIO_stringPos(1)*2_pInt+2_pInt) = int(right, pInt)

View File

@ -80,11 +80,11 @@ subroutine FE_init
#if defined(Marc4DAMASK) || defined(Abaqus)
integer(pInt), parameter :: &
FILEUNIT = 222_pInt, &
maxNchunks = 6_pInt
MAXNCHUNKS = 6_pInt
integer(pInt) :: j
character(len=64) :: tag
character(len=1024) :: line
integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions
integer(pInt), dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions
#endif
mainProcess: if (worldrank == 0) then
@ -114,16 +114,16 @@ subroutine FE_init
rewind(FILEUNIT)
do
read (FILEUNIT,'(a1024)',END=100) line
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
select case(tag)
case ('solver')
read (FILEUNIT,'(a1024)',END=100) line ! next line
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
symmetricSolver = (IO_intValue(line,positions,2_pInt) /= 1_pInt)
case ('restart')
read (FILEUNIT,'(a1024)',END=100) line ! next line
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
restartWrite = iand(IO_intValue(line,positions,1_pInt),1_pInt) > 0_pInt
restartRead = iand(IO_intValue(line,positions,1_pInt),2_pInt) > 0_pInt
case ('*restart')
@ -146,7 +146,7 @@ subroutine FE_init
rewind(FILEUNIT)
do
read (FILEUNIT,'(a1024)',END=200) line
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,positions,1_pInt)) == 'restart' .and. &
IO_lc(IO_stringValue(line,positions,2_pInt)) == 'file' .and. &
IO_lc(IO_stringValue(line,positions,3_pInt)) == 'job' .and. &
@ -158,10 +158,10 @@ subroutine FE_init
rewind(FILEUNIT)
do
read (FILEUNIT,'(a1024)',END=200) line
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,positions,1_pInt))=='*heading') then
read (FILEUNIT,'(a1024)',END=200) line
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
modelName = IO_StringValue(line,positions,1_pInt)
endif
enddo

View File

@ -1011,9 +1011,7 @@ pure function IO_stringPos(string,N)
do while (verify(string(right+1:),SEP)>0)
left = right + verify(string(right+1:),SEP)
right = left + scan(string(left:),SEP) - 2
if ( string(left:left) == '#' ) then
exit
endif
if ( string(left:left) == '#' ) exit
if ( IO_stringPos(1)<N ) then
IO_stringPos(1_pInt+IO_stringPos(1)*2_pInt+1_pInt) = int(left, pInt)
IO_stringPos(1_pInt+IO_stringPos(1)*2_pInt+2_pInt) = int(right, pInt)

View File

@ -299,7 +299,7 @@ subroutine crystallite_init
cycle ! skip to next line
endif
if (section > 0_pInt) then
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
select case(tag)
case ('(output)')

View File

@ -124,10 +124,10 @@ subroutine debug_init
implicit none
integer(pInt), parameter :: FILEUNIT = 300_pInt
integer(pInt), parameter :: maxNchunks = 7_pInt
integer(pInt), parameter :: MAXNCHUNKS = 7_pInt
integer(pInt) :: i, what
integer(pInt), dimension(1+2*maxNchunks) :: positions
integer(pInt), dimension(1+2*MAXNCHUNKS) :: positions
character(len=65536) :: tag
character(len=65536) :: line
@ -171,7 +171,7 @@ subroutine debug_init
do while (trim(line) /= IO_EOF) ! read thru sections of phase part
line = IO_read(FILEUNIT)
if (IO_isBlank(line)) cycle ! skip empty lines
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
select case(tag)
case ('element','e','el')

View File

@ -2367,8 +2367,8 @@ subroutine mesh_marc_get_tableStyles(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 6_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 6_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
character(len=300) line
initialcondTableStyle = 0_pInt
@ -2379,7 +2379,7 @@ subroutine mesh_marc_get_tableStyles(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == 'table' .and. myPos(1_pInt) > 5) then
initialcondTableStyle = IO_intValue(line,myPos,4_pInt)
@ -2405,8 +2405,8 @@ subroutine mesh_marc_count_nodesAndElements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 4_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 4_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
character(len=300) line
mesh_Nnodes = 0_pInt
@ -2417,13 +2417,13 @@ subroutine mesh_marc_count_nodesAndElements(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_StringValue(line,myPos,1_pInt)) == 'sizing') &
mesh_Nelems = IO_IntValue (line,myPos,3_pInt)
if ( IO_lc(IO_StringValue(line,myPos,1_pInt)) == 'coordinates') then
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
mesh_Nnodes = IO_IntValue (line,myPos,2_pInt)
exit ! assumes that "coordinates" comes later in file
endif
@ -2446,8 +2446,8 @@ subroutine mesh_marc_count_nodesAndElements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
character(len=300) line
mesh_NelemSets = 0_pInt
@ -2458,7 +2458,7 @@ subroutine mesh_marc_count_nodesAndElements(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_StringValue(line,myPos,1_pInt)) == 'define' .and. &
IO_lc(IO_StringValue(line,myPos,2_pInt)) == 'element' ) then
@ -2486,8 +2486,8 @@ subroutine mesh_marc_map_elementSets(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 4_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 4_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
character(len=300) :: line
integer(pInt) :: elemSet = 0_pInt
@ -2499,7 +2499,7 @@ subroutine mesh_marc_map_elementSets(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=640) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if( (IO_lc(IO_stringValue(line,myPos,1_pInt)) == 'define' ) .and. &
(IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'element' ) ) then
elemSet = elemSet+1_pInt
@ -2525,8 +2525,8 @@ subroutine mesh_marc_count_cpElements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 1_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 1_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
integer(pInt) :: i
character(len=300):: line
@ -2537,7 +2537,7 @@ subroutine mesh_marc_count_cpElements(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == 'hypoelastic') then
do i=1_pInt,3_pInt+hypoelasticTableStyle ! Skip 3 or 4 lines
@ -2566,8 +2566,8 @@ subroutine mesh_marc_map_elements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 1_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 1_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) line
integer(pInt), dimension (1_pInt+mesh_NcpElems) :: contInts
@ -2580,7 +2580,7 @@ subroutine mesh_marc_map_elements(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=660) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if( IO_lc(IO_stringValue(line,myPos,1_pInt)) == 'hypoelastic' ) then
do i=1_pInt,3_pInt+hypoelasticTableStyle ! skip three (or four if new table style!) lines
read (fileUnit,610,END=660) line
@ -2615,8 +2615,8 @@ subroutine mesh_marc_map_nodes(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 1_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 1_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) line
integer(pInt), dimension (mesh_Nnodes) :: node_count
@ -2631,7 +2631,7 @@ subroutine mesh_marc_map_nodes(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=650) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if( IO_lc(IO_stringValue(line,myPos,1_pInt)) == 'coordinates' ) then
read (fileUnit,610,END=650) line ! skip crap line
do i = 1_pInt,mesh_Nnodes
@ -2665,8 +2665,8 @@ subroutine mesh_marc_build_nodes(fileUnit)
integer(pInt), intent(in) :: fileUnit
integer(pInt), dimension(5), parameter :: node_ends = int([0,10,30,50,70],pInt)
integer(pInt), parameter :: maxNchunks = 1_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 1_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) :: line
integer(pInt) :: i,j,m
@ -2678,7 +2678,7 @@ subroutine mesh_marc_build_nodes(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=670) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if( IO_lc(IO_stringValue(line,myPos,1_pInt)) == 'coordinates' ) then
read (fileUnit,610,END=670) line ! skip crap line
do i=1_pInt,mesh_Nnodes
@ -2713,8 +2713,8 @@ subroutine mesh_marc_count_cpSizes(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) :: line
integer(pInt) :: i,t,g,e,c
@ -2727,12 +2727,12 @@ subroutine mesh_marc_count_cpSizes(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=630) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if( IO_lc(IO_stringValue(line,myPos,1_pInt)) == 'connectivity' ) then
read (fileUnit,610,END=630) line ! Garbage line
do i=1_pInt,mesh_Nelems ! read all elements
read (fileUnit,610,END=630) line
myPos = IO_stringPos(line,maxNchunks) ! limit to id and type
myPos = IO_stringPos(line,MAXNCHUNKS) ! limit to id and type
e = mesh_FEasCP('elem',IO_intValue(line,myPos,1_pInt))
if (e /= 0_pInt) then
t = FE_mapElemtype(IO_stringValue(line,myPos,2_pInt))
@ -2769,8 +2769,8 @@ subroutine mesh_marc_build_elements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 66_pInt ! limit to 64 nodes max (plus ID, type)
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 66_pInt ! limit to 64 nodes max (plus ID, type)
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) line
integer(pInt), dimension(1_pInt+mesh_NcpElems) :: contInts
@ -2788,7 +2788,7 @@ subroutine mesh_marc_build_elements(fileUnit)
read (fileUnit,610,END=620) line ! garbage line
do i = 1_pInt,mesh_Nelems
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
e = mesh_FEasCP('elem',IO_intValue(line,myPos,1_pInt))
if (e /= 0_pInt) then ! disregard non CP elems
mesh_element(1,e) = IO_IntValue (line,myPos,1_pInt) ! FE id
@ -2801,7 +2801,7 @@ subroutine mesh_marc_build_elements(fileUnit)
nNodesAlreadyRead = myPos(1) - 2_pInt
do while(nNodesAlreadyRead < FE_Nnodes(t)) ! read on if not all nodes in one line
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
do j = 1_pInt,myPos(1)
mesh_element(4_pInt+nNodesAlreadyRead+j,e) &
= mesh_FEasCP('node',IO_IntValue(line,myPos,j)) ! CP ids of nodes
@ -2869,8 +2869,8 @@ subroutine mesh_abaqus_count_nodesAndElements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
character(len=300) :: line
logical :: inPart
@ -2883,7 +2883,7 @@ subroutine mesh_abaqus_count_nodesAndElements(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*part' ) inPart = .true.
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*end' .and. &
IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'part' ) inPart = .false.
@ -2930,8 +2930,8 @@ subroutine mesh_abaqus_count_elementSets(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
character(len=300) :: line
logical :: inPart
@ -2944,7 +2944,7 @@ subroutine mesh_abaqus_count_elementSets(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*part' ) inPart = .true.
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*end' .and. &
IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'part' ) inPart = .false.
@ -2974,8 +2974,8 @@ subroutine mesh_abaqus_count_materials(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) :: line
logical inPart
@ -2987,7 +2987,7 @@ subroutine mesh_abaqus_count_materials(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*part' ) inPart = .true.
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*end' .and. &
IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'part' ) inPart = .false.
@ -3020,8 +3020,8 @@ subroutine mesh_abaqus_map_elementSets(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 4_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 4_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) :: line
integer(pInt) :: elemSet = 0_pInt,i
logical :: inPart = .false.
@ -3035,7 +3035,7 @@ subroutine mesh_abaqus_map_elementSets(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=640) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*part' ) inPart = .true.
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*end' .and. &
IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'part' ) inPart = .false.
@ -3071,8 +3071,8 @@ subroutine mesh_abaqus_map_materials(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 20_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 20_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) line
integer(pInt) :: i,c = 0_pInt
@ -3087,7 +3087,7 @@ subroutine mesh_abaqus_map_materials(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*part' ) inPart = .true.
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*end' .and. &
IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'part' ) inPart = .false.
@ -3136,8 +3136,8 @@ subroutine mesh_abaqus_count_cpElements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
character(len=300) line
integer(pInt) :: i,k
logical :: materialFound = .false.
@ -3150,7 +3150,7 @@ subroutine mesh_abaqus_count_cpElements(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
select case ( IO_lc(IO_stringValue(line,myPos,1_pInt)) )
case('*material')
materialName = trim(IO_extractValue(IO_lc(IO_stringValue(line,myPos,2_pInt)),'name')) ! extract name=value
@ -3192,8 +3192,8 @@ subroutine mesh_abaqus_map_elements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) :: line
integer(pInt) ::i,j,k,cpElem = 0_pInt
logical :: materialFound = .false.
@ -3206,7 +3206,7 @@ subroutine mesh_abaqus_map_elements(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=660) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
select case ( IO_lc(IO_stringValue(line,myPos,1_pInt)) )
case('*material')
materialName = trim(IO_extractValue(IO_lc(IO_stringValue(line,myPos,2_pInt)),'name')) ! extract name=value
@ -3256,8 +3256,8 @@ subroutine mesh_abaqus_map_nodes(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) line
integer(pInt) :: i,c,cpNode = 0_pInt
@ -3270,7 +3270,7 @@ subroutine mesh_abaqus_map_nodes(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=650) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*part' ) inPart = .true.
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*end' .and. &
IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'part' ) inPart = .false.
@ -3288,7 +3288,7 @@ subroutine mesh_abaqus_map_nodes(fileUnit)
enddo
do i = 1_pInt,c
read (fileUnit,610,END=650) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
cpNode = cpNode + 1_pInt
mesh_mapFEtoCPnode(1_pInt,cpNode) = IO_intValue(line,myPos,1_pInt)
mesh_mapFEtoCPnode(2_pInt,cpNode) = cpNode
@ -3320,8 +3320,8 @@ subroutine mesh_abaqus_build_nodes(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 4_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 4_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) :: line
integer(pInt) :: i,j,m,c
logical :: inPart
@ -3335,7 +3335,7 @@ subroutine mesh_abaqus_build_nodes(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=670) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*part' ) inPart = .true.
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*end' .and. &
IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'part' ) inPart = .false.
@ -3353,7 +3353,7 @@ subroutine mesh_abaqus_build_nodes(fileUnit)
enddo
do i = 1_pInt,c
read (fileUnit,610,END=670) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
m = mesh_FEasCP('node',IO_intValue(line,myPos,1_pInt))
do j=1_pInt, 3_pInt
mesh_node0(j,m) = mesh_unitlength * IO_floatValue(line,myPos,j+1_pInt)
@ -3386,8 +3386,8 @@ subroutine mesh_abaqus_count_cpSizes(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 2_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
character(len=300) :: line
integer(pInt) :: i,c,t,g
logical :: inPart
@ -3403,7 +3403,7 @@ subroutine mesh_abaqus_count_cpSizes(fileUnit)
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*part' ) inPart = .true.
if ( IO_lc(IO_stringValue(line,myPos,1_pInt)) == '*end' .and. &
IO_lc(IO_stringValue(line,myPos,2_pInt)) == 'part' ) inPart = .false.
@ -3446,8 +3446,8 @@ subroutine mesh_abaqus_build_elements(fileUnit)
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), parameter :: maxNchunks = 65_pInt
integer(pInt), dimension (1_pInt+2_pInt*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 65_pInt
integer(pInt), dimension (1_pInt+2_pInt*MAXNCHUNKS) :: myPos
integer(pInt) :: i,j,k,c,e,t,homog,micro, nNodesAlreadyRead
logical inPart,materialFound
@ -3480,7 +3480,7 @@ subroutine mesh_abaqus_build_elements(fileUnit)
enddo
do i = 1_pInt,c
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks) ! limit to 64 nodes max
myPos = IO_stringPos(line,MAXNCHUNKS) ! limit to 64 nodes max
e = mesh_FEasCP('elem',IO_intValue(line,myPos,1_pInt))
if (e /= 0_pInt) then ! disregard non CP elems
mesh_element(1,e) = IO_intValue(line,myPos,1_pInt) ! FE id
@ -3492,7 +3492,7 @@ subroutine mesh_abaqus_build_elements(fileUnit)
nNodesAlreadyRead = myPos(1) - 1_pInt
do while(nNodesAlreadyRead < FE_Nnodes(t)) ! read on if not all nodes in one line
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
do j = 1_pInt,myPos(1)
mesh_element(4_pInt+nNodesAlreadyRead+j,e) &
= mesh_FEasCP('node',IO_IntValue(line,myPos,j)) ! CP ids of nodes
@ -3510,7 +3510,7 @@ subroutine mesh_abaqus_build_elements(fileUnit)
materialFound = .false.
do
read (fileUnit,610,END=630) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
select case ( IO_lc(IO_StringValue(line,myPos,1_pInt)))
case('*material')
materialName = trim(IO_extractValue(IO_lc(IO_StringValue(line,myPos,2_pInt)),'name')) ! extract name=value
@ -3561,8 +3561,8 @@ use IO, only: &
integer(pInt), intent(in) :: fileUnit
#ifndef Spectral
integer(pInt), parameter :: maxNchunks = 5_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt), parameter :: MAXNCHUNKS = 5_pInt
integer(pInt), dimension (1+2*MAXNCHUNKS) :: myPos
integer(pInt) chunk, Nchunks
character(len=300) :: line, damaskOption, v
character(len=300) :: keyword
@ -3582,7 +3582,7 @@ use IO, only: &
rewind(fileUnit)
do
read (fileUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
myPos = IO_stringPos(line,MAXNCHUNKS)
Nchunks = myPos(1)
if (IO_lc(IO_stringValue(line,myPos,1_pInt)) == keyword .and. Nchunks > 1_pInt) then ! found keyword for damask option and there is at least one more chunk to read
damaskOption = IO_lc(IO_stringValue(line,myPos,2_pInt))

View File

@ -222,10 +222,10 @@ subroutine numerics_init
!$ include "omp_lib.h" ! use the not F90 standard conforming include file to prevent crashes with some versions of MSC.Marc
#endif
integer(pInt), parameter :: FILEUNIT = 300_pInt ,&
maxNchunks = 2_pInt
MAXNCHUNKS = 2_pInt
!$ integer :: gotDAMASK_NUM_THREADS = 1
integer :: i, ierr ! no pInt
integer(pInt), dimension(1+2*maxNchunks) :: positions
integer(pInt), dimension(1+2*MAXNCHUNKS) :: positions
character(len=65536) :: &
tag ,&
line
@ -273,7 +273,7 @@ subroutine numerics_init
if(line(i:i) == '=') line(i:i) = ' ' ! also allow keyword = value version
enddo
if (IO_isBlank(line)) cycle ! skip empty lines
positions = IO_stringPos(line,maxNchunks)
positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
select case(tag)
case ('relevantstrain')