pointer assignment was done twice
pointer is re-assigned automatically, but I found it confusing. Also using automatic left hand side reallocation to simplify handling of outputID
This commit is contained in:
parent
8184d51a99
commit
c7c39922f0
|
@ -175,15 +175,11 @@ subroutine plastic_isotropic_init(fileUnit)
|
|||
endif
|
||||
if (IO_getTag(line,'[',']') /= '') then ! next section
|
||||
phase = phase + 1_pInt ! advance section counter
|
||||
if (phase_plasticity(phase) == PLASTICITY_ISOTROPIC_ID) then
|
||||
p => param(phase_plasticityInstance(phase)) ! shorthand pointer to parameter object of my constitutive law
|
||||
allocate(p%outputID(phase_Noutput(phase))) ! allocate space for IDs of every requested output
|
||||
endif
|
||||
cycle ! skip to next line
|
||||
endif
|
||||
if (phase > 0_pInt) then; if (phase_plasticity(phase) == PLASTICITY_ISOTROPIC_ID) then ! one of my phases. Do not short-circuit here (.and. between if-statements), it's not safe in Fortran
|
||||
instance = phase_plasticityInstance(phase) ! which instance of my plasticity is present phase
|
||||
p => param(instance)
|
||||
p => param(instance) ! shorthand pointer to parameter object of my constitutive law
|
||||
chunkPos = IO_stringPos(line)
|
||||
tag = IO_lc(IO_stringValue(line,chunkPos,1_pInt)) ! extract key
|
||||
|
||||
|
@ -193,12 +189,12 @@ subroutine plastic_isotropic_init(fileUnit)
|
|||
select case(outputtag)
|
||||
case ('flowstress')
|
||||
plastic_isotropic_Noutput(instance) = plastic_isotropic_Noutput(instance) + 1_pInt
|
||||
p%outputID (plastic_isotropic_Noutput(instance)) = flowstress_ID
|
||||
plastic_isotropic_output(plastic_isotropic_Noutput(instance),instance) = outputtag
|
||||
p%outputID = [p%outputID,flowstress_ID]
|
||||
case ('strainrate')
|
||||
plastic_isotropic_Noutput(instance) = plastic_isotropic_Noutput(instance) + 1_pInt
|
||||
p%outputID (plastic_isotropic_Noutput(instance)) = strainrate_ID
|
||||
plastic_isotropic_output(plastic_isotropic_Noutput(instance),instance) = outputtag
|
||||
p%outputID = [p%outputID,strainrate_ID]
|
||||
end select
|
||||
|
||||
case ('/dilatation/')
|
||||
|
|
Loading…
Reference in New Issue