renaming of "maxNinstance" to be consistent with naming scheme introduced in rev2662

This commit is contained in:
Christoph Kords 2013-11-21 13:40:14 +00:00
parent 3cc6781eaf
commit e8de8f69a8
1 changed files with 85 additions and 85 deletions

View File

@ -260,7 +260,7 @@ integer(pInt), &
dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions
integer(pInt), dimension(7) :: configNchunks integer(pInt), dimension(7) :: configNchunks
integer(pInt) :: section = 0_pInt, & integer(pInt) :: section = 0_pInt, &
maxNinstance, & maxNmatIDs, &
maxTotalNslip, & maxTotalNslip, &
structID, & structID, &
f, & ! index of my slip family f, & ! index of my slip family
@ -286,21 +286,21 @@ character(len=65536) :: line = ''
write(6,'(a15,a)') ' Current time: ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
maxNinstance = int(count(phase_plasticity == CONSTITUTIVE_NONLOCAL_LABEL),pInt) maxNmatIDs = int(count(phase_plasticity == CONSTITUTIVE_NONLOCAL_LABEL),pInt)
if (maxNinstance == 0) return ! we don't have to do anything if there's no instance for this constitutive law if (maxNmatIDs == 0) return ! we don't have to do anything if there's no instance for this constitutive law
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) & if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance write(6,'(a16,1x,i5,/)') '# instances:',maxNmatIDs
!*** memory allocation for global variables !*** memory allocation for global variables
allocate(constitutive_nonlocal_sizeDotState(maxNinstance)) allocate(constitutive_nonlocal_sizeDotState(maxNmatIDs))
allocate(constitutive_nonlocal_sizeDependentState(maxNinstance)) allocate(constitutive_nonlocal_sizeDependentState(maxNmatIDs))
allocate(constitutive_nonlocal_sizeState(maxNinstance)) allocate(constitutive_nonlocal_sizeState(maxNmatIDs))
allocate(constitutive_nonlocal_sizePostResults(maxNinstance)) allocate(constitutive_nonlocal_sizePostResults(maxNmatIDs))
allocate(constitutive_nonlocal_sizePostResult(maxval(phase_Noutput), maxNinstance)) allocate(constitutive_nonlocal_sizePostResult(maxval(phase_Noutput), maxNmatIDs))
allocate(constitutive_nonlocal_output(maxval(phase_Noutput), maxNinstance)) allocate(constitutive_nonlocal_output(maxval(phase_Noutput), maxNmatIDs))
allocate(Noutput(maxNinstance)) allocate(Noutput(maxNmatIDs))
constitutive_nonlocal_sizeDotState = 0_pInt constitutive_nonlocal_sizeDotState = 0_pInt
constitutive_nonlocal_sizeDependentState = 0_pInt constitutive_nonlocal_sizeDependentState = 0_pInt
constitutive_nonlocal_sizeState = 0_pInt constitutive_nonlocal_sizeState = 0_pInt
@ -309,12 +309,12 @@ constitutive_nonlocal_sizePostResult = 0_pInt
constitutive_nonlocal_output = '' constitutive_nonlocal_output = ''
Noutput = 0_pInt Noutput = 0_pInt
allocate(constitutive_nonlocal_structureName(maxNinstance)) allocate(constitutive_nonlocal_structureName(maxNmatIDs))
allocate(constitutive_nonlocal_structure(maxNinstance)) allocate(constitutive_nonlocal_structure(maxNmatIDs))
allocate(Nslip(lattice_maxNslipFamily, maxNinstance)) allocate(Nslip(lattice_maxNslipFamily, maxNmatIDs))
allocate(slipFamily(lattice_maxNslip, maxNinstance)) allocate(slipFamily(lattice_maxNslip, maxNmatIDs))
allocate(slipSystemLattice(lattice_maxNslip, maxNinstance)) allocate(slipSystemLattice(lattice_maxNslip, maxNmatIDs))
allocate(totalNslip(maxNinstance)) allocate(totalNslip(maxNmatIDs))
constitutive_nonlocal_structureName = '' constitutive_nonlocal_structureName = ''
constitutive_nonlocal_structure = 0_pInt constitutive_nonlocal_structure = 0_pInt
Nslip = 0_pInt Nslip = 0_pInt
@ -322,38 +322,38 @@ slipFamily = 0_pInt
slipSystemLattice = 0_pInt slipSystemLattice = 0_pInt
totalNslip = 0_pInt totalNslip = 0_pInt
allocate(CoverA(maxNinstance)) allocate(CoverA(maxNmatIDs))
allocate(mu(maxNinstance)) allocate(mu(maxNmatIDs))
allocate(nu(maxNinstance)) allocate(nu(maxNmatIDs))
allocate(atomicVolume(maxNinstance)) allocate(atomicVolume(maxNmatIDs))
allocate(Dsd0(maxNinstance)) allocate(Dsd0(maxNmatIDs))
allocate(selfDiffusionEnergy(maxNinstance)) allocate(selfDiffusionEnergy(maxNmatIDs))
allocate(aTolRho(maxNinstance)) allocate(aTolRho(maxNmatIDs))
allocate(aTolShear(maxNinstance)) allocate(aTolShear(maxNmatIDs))
allocate(significantRho(maxNinstance)) allocate(significantRho(maxNmatIDs))
allocate(significantN(maxNinstance)) allocate(significantN(maxNmatIDs))
allocate(Cslip66(6,6,maxNinstance)) allocate(Cslip66(6,6,maxNmatIDs))
allocate(Cslip3333(3,3,3,3,maxNinstance)) allocate(Cslip3333(3,3,3,3,maxNmatIDs))
allocate(cutoffRadius(maxNinstance)) allocate(cutoffRadius(maxNmatIDs))
allocate(doublekinkwidth(maxNinstance)) allocate(doublekinkwidth(maxNmatIDs))
allocate(solidSolutionEnergy(maxNinstance)) allocate(solidSolutionEnergy(maxNmatIDs))
allocate(solidSolutionSize(maxNinstance)) allocate(solidSolutionSize(maxNmatIDs))
allocate(solidSolutionConcentration(maxNinstance)) allocate(solidSolutionConcentration(maxNmatIDs))
allocate(pParam(maxNinstance)) allocate(pParam(maxNmatIDs))
allocate(qParam(maxNinstance)) allocate(qParam(maxNmatIDs))
allocate(viscosity(maxNinstance)) allocate(viscosity(maxNmatIDs))
allocate(fattack(maxNinstance)) allocate(fattack(maxNmatIDs))
allocate(rhoSglScatter(maxNinstance)) allocate(rhoSglScatter(maxNmatIDs))
allocate(rhoSglRandom(maxNinstance)) allocate(rhoSglRandom(maxNmatIDs))
allocate(rhoSglRandomBinning(maxNinstance)) allocate(rhoSglRandomBinning(maxNmatIDs))
allocate(surfaceTransmissivity(maxNinstance)) allocate(surfaceTransmissivity(maxNmatIDs))
allocate(grainboundaryTransmissivity(maxNinstance)) allocate(grainboundaryTransmissivity(maxNmatIDs))
allocate(shortRangeStressCorrection(maxNinstance)) allocate(shortRangeStressCorrection(maxNmatIDs))
allocate(probabilisticMultiplication(maxNinstance)) allocate(probabilisticMultiplication(maxNmatIDs))
allocate(CFLfactor(maxNinstance)) allocate(CFLfactor(maxNmatIDs))
allocate(fEdgeMultiplication(maxNinstance)) allocate(fEdgeMultiplication(maxNmatIDs))
allocate(linetensionEffect(maxNinstance)) allocate(linetensionEffect(maxNmatIDs))
allocate(edgeJogFactor(maxNinstance)) allocate(edgeJogFactor(maxNmatIDs))
CoverA = 0.0_pReal CoverA = 0.0_pReal
mu = 0.0_pReal mu = 0.0_pReal
atomicVolume = 0.0_pReal atomicVolume = 0.0_pReal
@ -387,15 +387,15 @@ edgeJogFactor = 1.0_pReal
shortRangeStressCorrection = .false. shortRangeStressCorrection = .false.
probabilisticMultiplication = .false. probabilisticMultiplication = .false.
allocate(rhoSglEdgePos0(lattice_maxNslipFamily,maxNinstance)) allocate(rhoSglEdgePos0(lattice_maxNslipFamily,maxNmatIDs))
allocate(rhoSglEdgeNeg0(lattice_maxNslipFamily,maxNinstance)) allocate(rhoSglEdgeNeg0(lattice_maxNslipFamily,maxNmatIDs))
allocate(rhoSglScrewPos0(lattice_maxNslipFamily,maxNinstance)) allocate(rhoSglScrewPos0(lattice_maxNslipFamily,maxNmatIDs))
allocate(rhoSglScrewNeg0(lattice_maxNslipFamily,maxNinstance)) allocate(rhoSglScrewNeg0(lattice_maxNslipFamily,maxNmatIDs))
allocate(rhoDipEdge0(lattice_maxNslipFamily,maxNinstance)) allocate(rhoDipEdge0(lattice_maxNslipFamily,maxNmatIDs))
allocate(rhoDipScrew0(lattice_maxNslipFamily,maxNinstance)) allocate(rhoDipScrew0(lattice_maxNslipFamily,maxNmatIDs))
allocate(burgersPerSlipFamily(lattice_maxNslipFamily,maxNinstance)) allocate(burgersPerSlipFamily(lattice_maxNslipFamily,maxNmatIDs))
allocate(lambda0PerSlipFamily(lattice_maxNslipFamily,maxNinstance)) allocate(lambda0PerSlipFamily(lattice_maxNslipFamily,maxNmatIDs))
allocate(interactionSlipSlip(lattice_maxNinteraction,maxNinstance)) allocate(interactionSlipSlip(lattice_maxNinteraction,maxNmatIDs))
rhoSglEdgePos0 = -1.0_pReal rhoSglEdgePos0 = -1.0_pReal
rhoSglEdgeNeg0 = -1.0_pReal rhoSglEdgeNeg0 = -1.0_pReal
rhoSglScrewPos0 = -1.0_pReal rhoSglScrewPos0 = -1.0_pReal
@ -406,12 +406,12 @@ burgersPerSlipFamily = 0.0_pReal
lambda0PerSlipFamily = 0.0_pReal lambda0PerSlipFamily = 0.0_pReal
interactionSlipSlip = 0.0_pReal interactionSlipSlip = 0.0_pReal
allocate(minDipoleHeightPerSlipFamily(lattice_maxNslipFamily,2,maxNinstance)) allocate(minDipoleHeightPerSlipFamily(lattice_maxNslipFamily,2,maxNmatIDs))
allocate(peierlsStressPerSlipFamily(lattice_maxNslipFamily,2,maxNinstance)) allocate(peierlsStressPerSlipFamily(lattice_maxNslipFamily,2,maxNmatIDs))
minDipoleHeightPerSlipFamily = -1.0_pReal minDipoleHeightPerSlipFamily = -1.0_pReal
peierlsStressPerSlipFamily = 0.0_pReal peierlsStressPerSlipFamily = 0.0_pReal
allocate(nonSchmidCoeff(lattice_maxNnonSchmid,maxNinstance)) allocate(nonSchmidCoeff(lattice_maxNnonSchmid,maxNmatIDs))
nonSchmidCoeff = 0.0_pReal nonSchmidCoeff = 0.0_pReal
!*** readout data from material.config file !*** readout data from material.config file
@ -595,7 +595,7 @@ do while (trim(line) /= '#EOF#')
enddo enddo
do i = 1_pInt,maxNinstance do i = 1_pInt,maxNmatIDs
constitutive_nonlocal_structure(i) = & constitutive_nonlocal_structure(i) = &
lattice_initializeStructure(constitutive_nonlocal_structureName(i), CoverA(i)) ! our lattice structure is defined in the material.config file by the structureName (and the c/a ratio) lattice_initializeStructure(constitutive_nonlocal_structureName(i), CoverA(i)) ! our lattice structure is defined in the material.config file by the structureName (and the c/a ratio)
@ -707,15 +707,15 @@ enddo
maxTotalNslip = maxval(totalNslip) maxTotalNslip = maxval(totalNslip)
allocate(iRhoU(maxTotalNslip,4,maxNinstance)) allocate(iRhoU(maxTotalNslip,4,maxNmatIDs))
allocate(iRhoB(maxTotalNslip,4,maxNinstance)) allocate(iRhoB(maxTotalNslip,4,maxNmatIDs))
allocate(iRhoD(maxTotalNslip,2,maxNinstance)) allocate(iRhoD(maxTotalNslip,2,maxNmatIDs))
allocate(iV(maxTotalNslip,4,maxNinstance)) allocate(iV(maxTotalNslip,4,maxNmatIDs))
allocate(iD(maxTotalNslip,2,maxNinstance)) allocate(iD(maxTotalNslip,2,maxNmatIDs))
allocate(iGamma(maxTotalNslip,maxNinstance)) allocate(iGamma(maxTotalNslip,maxNmatIDs))
allocate(iRhoF(maxTotalNslip,maxNinstance)) allocate(iRhoF(maxTotalNslip,maxNmatIDs))
allocate(iTauF(maxTotalNslip,maxNinstance)) allocate(iTauF(maxTotalNslip,maxNmatIDs))
allocate(iTauB(maxTotalNslip,maxNinstance)) allocate(iTauB(maxTotalNslip,maxNmatIDs))
iRhoU = 0_pInt iRhoU = 0_pInt
iRhoB = 0_pInt iRhoB = 0_pInt
iRhoD = 0_pInt iRhoD = 0_pInt
@ -726,25 +726,25 @@ iRhoF = 0_pInt
iTauF = 0_pInt iTauF = 0_pInt
iTauB = 0_pInt iTauB = 0_pInt
allocate(burgers(maxTotalNslip, maxNinstance)) allocate(burgers(maxTotalNslip,maxNmatIDs))
burgers = 0.0_pReal burgers = 0.0_pReal
allocate(lambda0(maxTotalNslip, maxNinstance)) allocate(lambda0(maxTotalNslip,maxNmatIDs))
lambda0 = 0.0_pReal lambda0 = 0.0_pReal
allocate(minDipoleHeight(maxTotalNslip,2,maxNinstance)) allocate(minDipoleHeight(maxTotalNslip,2,maxNmatIDs))
minDipoleHeight = -1.0_pReal minDipoleHeight = -1.0_pReal
allocate(forestProjectionEdge(maxTotalNslip, maxTotalNslip, maxNinstance)) allocate(forestProjectionEdge(maxTotalNslip,maxTotalNslip,maxNmatIDs))
forestProjectionEdge = 0.0_pReal forestProjectionEdge = 0.0_pReal
allocate(forestProjectionScrew(maxTotalNslip, maxTotalNslip, maxNinstance)) allocate(forestProjectionScrew(maxTotalNslip,maxTotalNslip,maxNmatIDs))
forestProjectionScrew = 0.0_pReal forestProjectionScrew = 0.0_pReal
allocate(interactionMatrixSlipSlip(maxTotalNslip, maxTotalNslip, maxNinstance)) allocate(interactionMatrixSlipSlip(maxTotalNslip,maxTotalNslip,maxNmatIDs))
interactionMatrixSlipSlip = 0.0_pReal interactionMatrixSlipSlip = 0.0_pReal
allocate(lattice2slip(1:3, 1:3, maxTotalNslip, maxNinstance)) allocate(lattice2slip(1:3, 1:3, maxTotalNslip, maxNmatIDs))
lattice2slip = 0.0_pReal lattice2slip = 0.0_pReal
allocate(sourceProbability(maxTotalNslip, homogenization_maxNgrains, mesh_maxNips, mesh_NcpElems)) allocate(sourceProbability(maxTotalNslip, homogenization_maxNgrains, mesh_maxNips, mesh_NcpElems))
@ -766,17 +766,17 @@ rhoDotEdgeJogsOutput = 0.0_pReal
allocate(compatibility(2,maxTotalNslip, maxTotalNslip, mesh_maxNipNeighbors, mesh_maxNips, mesh_NcpElems)) allocate(compatibility(2,maxTotalNslip, maxTotalNslip, mesh_maxNipNeighbors, mesh_maxNips, mesh_NcpElems))
compatibility = 0.0_pReal compatibility = 0.0_pReal
allocate(peierlsStress(maxTotalNslip,2,maxNinstance)) allocate(peierlsStress(maxTotalNslip,2,maxNmatIDs))
peierlsStress = 0.0_pReal peierlsStress = 0.0_pReal
allocate(colinearSystem(maxTotalNslip,maxNinstance)) allocate(colinearSystem(maxTotalNslip,maxNmatIDs))
colinearSystem = 0_pInt colinearSystem = 0_pInt
allocate(nonSchmidProjection(3,3,4,maxTotalNslip,maxNinstance)) allocate(nonSchmidProjection(3,3,4,maxTotalNslip,maxNmatIDs))
nonSchmidProjection = 0.0_pReal nonSchmidProjection = 0.0_pReal
do i = 1,maxNinstance do i = 1,maxNmatIDs
structID = constitutive_nonlocal_structure(i) ! lattice structure of this instance structID = constitutive_nonlocal_structure(i) ! lattice structure of this instance
@ -1076,7 +1076,7 @@ integer(pInt) el, &
t, & t, &
j, & j, &
matID, & matID, &
maxNinstance maxNmatIDs
real(pReal), dimension(2) :: noise real(pReal), dimension(2) :: noise
real(pReal), dimension(4) :: rnd real(pReal), dimension(4) :: rnd
real(pReal) meanDensity, & real(pReal) meanDensity, &
@ -1085,7 +1085,7 @@ real(pReal) meanDensity, &
minimumIpVolume minimumIpVolume
maxNinstance = int(count(phase_plasticity == CONSTITUTIVE_NONLOCAL_LABEL),pInt) maxNmatIDs = int(count(phase_plasticity == CONSTITUTIVE_NONLOCAL_LABEL),pInt)
! ititalize all states to zero ! ititalize all states to zero
@ -1098,7 +1098,7 @@ do e = 1_pInt,mesh_NcpElems
enddo enddo
do matID = 1_pInt,maxNinstance do matID = 1_pInt,maxNmatIDs
ns = totalNslip(matID) ns = totalNslip(matID)
! randomly distribute dislocation segments on random slip system and of random type in the volume ! randomly distribute dislocation segments on random slip system and of random type in the volume