mpie_cpfem_abaqus_std.f: first call is with kinc==1
mesh: allow multiple element sets with identical material
This commit is contained in:
parent
8467c91dab
commit
78d4e7d1dc
103
code/mesh.f90
103
code/mesh.f90
|
@ -1698,7 +1698,7 @@ endsubroutine
|
||||||
integer(pInt), dimension (1+2*maxNchunks) :: pos
|
integer(pInt), dimension (1+2*maxNchunks) :: pos
|
||||||
character(len=300) line
|
character(len=300) line
|
||||||
|
|
||||||
integer(pInt) unit,i
|
integer(pInt) unit,i,k
|
||||||
logical materialFound
|
logical materialFound
|
||||||
character (len=64) materialName,elemSetName
|
character (len=64) materialName,elemSetName
|
||||||
|
|
||||||
|
@ -1712,25 +1712,24 @@ endsubroutine
|
||||||
pos = IO_stringPos(line,maxNchunks)
|
pos = IO_stringPos(line,maxNchunks)
|
||||||
select case ( IO_lc(IO_stringValue(line,pos,1)) )
|
select case ( IO_lc(IO_stringValue(line,pos,1)) )
|
||||||
case('*material')
|
case('*material')
|
||||||
materialName = IO_extractValue(IO_lc(IO_stringValue(line,pos,2)),'name') ! extract name=value
|
materialName = IO_extractValue(IO_lc(IO_stringValue(line,pos,2)),'name') ! extract name=value
|
||||||
materialFound = materialName /= '' ! valid name?
|
materialFound = materialName /= '' ! valid name?
|
||||||
case('*user')
|
case('*user')
|
||||||
if (IO_lc(IO_StringValue(line,pos,2)) == 'material' .and. materialFound) then
|
if (IO_lc(IO_StringValue(line,pos,2)) == 'material' .and. materialFound) then
|
||||||
do i = 1,mesh_Nmaterials ! look thru material names
|
do i = 1,mesh_Nmaterials ! look thru material names
|
||||||
if (materialName == mesh_nameMaterial(i)) exit ! found one
|
if (materialName == mesh_nameMaterial(i)) then ! found one
|
||||||
|
elemSetName = mesh_mapMaterial(i) ! take corresponding elemSet
|
||||||
|
do k = 1,mesh_NelemSets ! look thru all elemSet definitions
|
||||||
|
if (elemSetName == mesh_nameElemSet(k)) & ! matched?
|
||||||
|
mesh_NcpElems = mesh_NcpElems + mesh_mapElemSet(1,k) ! add those elem count
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
enddo
|
enddo
|
||||||
if (i <= mesh_Nmaterials) then ! found one?
|
|
||||||
elemSetName = mesh_mapMaterial(i) ! take corresponding elemSet
|
|
||||||
do i = 1,mesh_NelemSets ! look thru all elemSet definitions
|
|
||||||
if (elemSetName == mesh_nameElemSet(i)) & ! matched?
|
|
||||||
mesh_NcpElems = mesh_NcpElems + mesh_mapElemSet(1,i) ! add those elem count
|
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
materialFound = .false.
|
materialFound = .false.
|
||||||
endif
|
endif
|
||||||
endselect
|
endselect
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
620 if (mesh_NcpElems == 0) call IO_error(906)
|
620 if (mesh_NcpElems == 0) call IO_error(906)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -2120,7 +2119,7 @@ endsubroutine
|
||||||
integer(pInt), dimension (1+2*maxNchunks) :: pos
|
integer(pInt), dimension (1+2*maxNchunks) :: pos
|
||||||
character(len=300) line
|
character(len=300) line
|
||||||
|
|
||||||
integer(pInt) unit,i,j,cpElem
|
integer(pInt) unit,i,j,k,cpElem
|
||||||
logical materialFound
|
logical materialFound
|
||||||
character (len=64) materialName,elemSetName
|
character (len=64) materialName,elemSetName
|
||||||
|
|
||||||
|
@ -2135,25 +2134,24 @@ endsubroutine
|
||||||
pos = IO_stringPos(line,maxNchunks)
|
pos = IO_stringPos(line,maxNchunks)
|
||||||
select case ( IO_lc(IO_stringValue(line,pos,1)) )
|
select case ( IO_lc(IO_stringValue(line,pos,1)) )
|
||||||
case('*material')
|
case('*material')
|
||||||
materialName = IO_extractValue(IO_lc(IO_stringValue(line,pos,2)),'name') ! extract name=value
|
materialName = IO_extractValue(IO_lc(IO_stringValue(line,pos,2)),'name') ! extract name=value
|
||||||
materialFound = materialName /= '' ! valid name?
|
materialFound = materialName /= '' ! valid name?
|
||||||
case('*user')
|
case('*user')
|
||||||
if (IO_lc(IO_stringValue(line,pos,2)) == 'material' .and. materialFound) then
|
if (IO_lc(IO_stringValue(line,pos,2)) == 'material' .and. materialFound) then
|
||||||
do i = 1,mesh_Nmaterials ! look thru material names
|
do i = 1,mesh_Nmaterials ! look thru material names
|
||||||
if (materialName == mesh_nameMaterial(i)) exit ! found one
|
if (materialName == mesh_nameMaterial(i)) then ! found one
|
||||||
|
elemSetName = mesh_mapMaterial(i) ! take corresponding elemSet
|
||||||
|
do k = 1,mesh_NelemSets ! look thru all elemSet definitions
|
||||||
|
if (elemSetName == mesh_nameElemSet(k)) then ! matched?
|
||||||
|
do j = 1,mesh_mapElemSet(1,k)
|
||||||
|
cpElem = cpElem + 1_pInt
|
||||||
|
mesh_mapFEtoCPelem(1,cpElem) = mesh_mapElemSet(1+j,k) ! store FE id
|
||||||
|
mesh_mapFEtoCPelem(2,cpElem) = cpElem ! store our id
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
enddo
|
enddo
|
||||||
if (i <= mesh_Nmaterials) then ! found one?
|
|
||||||
elemSetName = mesh_mapMaterial(i) ! take corresponding elemSet
|
|
||||||
do i = 1,mesh_NelemSets ! look thru all elemSet definitions
|
|
||||||
if (elemSetName == mesh_nameElemSet(i)) then ! matched?
|
|
||||||
do j = 1,mesh_mapElemSet(1,i)
|
|
||||||
cpElem = cpElem + 1_pInt
|
|
||||||
mesh_mapFEtoCPelem(1,cpElem) = mesh_mapElemSet(1+j,i) ! store FE id
|
|
||||||
mesh_mapFEtoCPelem(2,cpElem) = cpElem ! store our id
|
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
materialFound = .false.
|
materialFound = .false.
|
||||||
endif
|
endif
|
||||||
endselect
|
endselect
|
||||||
|
@ -2685,7 +2683,7 @@ subroutine mesh_marc_count_cpSizes (unit)
|
||||||
integer(pInt), parameter :: maxNchunks = 65
|
integer(pInt), parameter :: maxNchunks = 65
|
||||||
integer(pInt), dimension (1+2*maxNchunks) :: pos
|
integer(pInt), dimension (1+2*maxNchunks) :: pos
|
||||||
|
|
||||||
integer(pInt) unit,i,j,count,e,t,homog,micro
|
integer(pInt) unit,i,j,k,count,e,t,homog,micro
|
||||||
logical inPart,materialFound
|
logical inPart,materialFound
|
||||||
character (len=64) materialName,elemSetName
|
character (len=64) materialName,elemSetName
|
||||||
character(len=300) line
|
character(len=300) line
|
||||||
|
@ -2740,31 +2738,30 @@ subroutine mesh_marc_count_cpSizes (unit)
|
||||||
select case ( IO_lc(IO_StringValue(line,pos,1)))
|
select case ( IO_lc(IO_StringValue(line,pos,1)))
|
||||||
case('*material')
|
case('*material')
|
||||||
materialName = IO_extractValue(IO_lc(IO_StringValue(line,pos,2)),'name') ! extract name=value
|
materialName = IO_extractValue(IO_lc(IO_StringValue(line,pos,2)),'name') ! extract name=value
|
||||||
materialFound = materialName /= '' ! valid name?
|
materialFound = materialName /= '' ! valid name?
|
||||||
case('*user')
|
case('*user')
|
||||||
if ( IO_lc(IO_StringValue(line,pos,2)) == 'material' .and. &
|
if ( IO_lc(IO_StringValue(line,pos,2)) == 'material' .and. &
|
||||||
materialFound ) then
|
materialFound ) then
|
||||||
do i = 1,mesh_Nmaterials ! look thru material names
|
read (unit,610,END=630) line ! read homogenization and microstructure
|
||||||
if (materialName == mesh_nameMaterial(i)) exit ! found one
|
pos(1:1+2*2) = IO_stringPos(line,2)
|
||||||
|
homog = NINT(IO_floatValue(line,pos,1))
|
||||||
|
micro = NINT(IO_floatValue(line,pos,2))
|
||||||
|
do i = 1,mesh_Nmaterials ! look thru material names
|
||||||
|
if (materialName == mesh_nameMaterial(i)) then ! found one
|
||||||
|
elemSetName = mesh_mapMaterial(i) ! take corresponding elemSet
|
||||||
|
do k = 1,mesh_NelemSets ! look thru all elemSet definitions
|
||||||
|
if (elemSetName == mesh_nameElemSet(k)) then ! matched?
|
||||||
|
do j = 1,mesh_mapElemSet(1,k)
|
||||||
|
e = mesh_FEasCP('elem',mesh_mapElemSet(1+j,k))
|
||||||
|
mesh_element(3,e) = homog ! store homogenization
|
||||||
|
mesh_element(4,e) = micro ! store microstructure
|
||||||
|
mesh_maxValStateVar(1) = max(mesh_maxValStateVar(1),homog)
|
||||||
|
mesh_maxValStateVar(2) = max(mesh_maxValStateVar(2),micro)
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
enddo
|
enddo
|
||||||
if (i <= mesh_Nmaterials) then ! found one?
|
|
||||||
elemSetName = mesh_mapMaterial(i) ! take corresponding elemSet
|
|
||||||
read (unit,610,END=630) line ! read homogenization and microstructure
|
|
||||||
pos(1:1+2*2) = IO_stringPos(line,2)
|
|
||||||
homog = NINT(IO_floatValue(line,pos,1))
|
|
||||||
micro = NINT(IO_floatValue(line,pos,2))
|
|
||||||
do i = 1,mesh_NelemSets ! look thru all elemSet definitions
|
|
||||||
if (elemSetName == mesh_nameElemSet(i)) then ! matched?
|
|
||||||
do j = 1,mesh_mapElemSet(1,i)
|
|
||||||
e = mesh_FEasCP('elem',mesh_mapElemSet(1+j,i))
|
|
||||||
mesh_element(3,e) = homog ! store homogenization
|
|
||||||
mesh_element(4,e) = micro ! store microstructure
|
|
||||||
mesh_maxValStateVar(1) = max(mesh_maxValStateVar(1),homog)
|
|
||||||
mesh_maxValStateVar(2) = max(mesh_maxValStateVar(2),micro)
|
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
materialFound = .false.
|
materialFound = .false.
|
||||||
endif
|
endif
|
||||||
endselect
|
endselect
|
||||||
|
@ -2798,6 +2795,7 @@ integer(pInt), dimension (:), allocatable :: node_seen
|
||||||
|
|
||||||
allocate(node_seen(maxval(FE_Nnodes)))
|
allocate(node_seen(maxval(FE_Nnodes)))
|
||||||
|
|
||||||
|
|
||||||
node_count = 0_pInt
|
node_count = 0_pInt
|
||||||
|
|
||||||
do e = 1,mesh_NcpElems
|
do e = 1,mesh_NcpElems
|
||||||
|
@ -2848,7 +2846,6 @@ deallocate(node_seen)
|
||||||
endsubroutine
|
endsubroutine
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
!***********************************************************
|
!***********************************************************
|
||||||
! build up of IP neighborhood
|
! build up of IP neighborhood
|
||||||
!
|
!
|
||||||
|
|
|
@ -159,7 +159,7 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
|
||||||
if (time(2) > theTime .or. kinc /= theInc) then ! reached convergence
|
if (time(2) > theTime .or. kinc /= theInc) then ! reached convergence
|
||||||
terminallyIll = .false.
|
terminallyIll = .false.
|
||||||
cycleCounter = -1 ! first calc step increments this to cycle = 0
|
cycleCounter = -1 ! first calc step increments this to cycle = 0
|
||||||
if (kinc == 0) then ! >> start of analysis <<
|
if (kinc == 1) then ! >> start of analysis <<
|
||||||
lastIncConverged = .false. ! no Jacobian backup
|
lastIncConverged = .false. ! no Jacobian backup
|
||||||
outdatedByNewInc = .false. ! no aging of state
|
outdatedByNewInc = .false. ! no aging of state
|
||||||
lastMode = .false. ! pretend last step was collection
|
lastMode = .false. ! pretend last step was collection
|
||||||
|
|
Loading…
Reference in New Issue