DAMASK_EICMD/src/phase_mechanical_plastic_no...

54 lines
1.8 KiB
Fortran
Raw Normal View History

!--------------------------------------------------------------------------------------------------
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
2019-01-06 04:25:10 +05:30
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief Dummy plasticity for purely elastic material
!--------------------------------------------------------------------------------------------------
submodule(phase:plastic) none
contains
!--------------------------------------------------------------------------------------------------
!> @brief Perform module initialization.
!> @details reads in material parameters, allocates arrays, and does sanity checks
!--------------------------------------------------------------------------------------------------
module function plastic_none_init() result(myPlasticity)
2020-08-15 19:32:10 +05:30
logical, dimension(:), allocatable :: myPlasticity
integer :: &
Ninstances, &
p, &
Nconstituents
2020-08-15 19:32:10 +05:30
class(tNode), pointer :: &
phases, &
phase, &
2020-11-03 03:16:46 +05:30
mech, &
2020-08-15 19:32:10 +05:30
pl
2021-01-27 15:14:03 +05:30
print'(/,a)', ' <<<+- phase:mechanics:plastic:none init -+>>>'
2020-08-15 19:32:10 +05:30
phases => config_material%get('phase')
allocate(myPlasticity(phases%length), source = .false.)
2020-08-15 19:32:10 +05:30
do p = 1, phases%length
phase => phases%get(p)
2020-11-18 01:54:40 +05:30
mech => phase%get('mechanics')
2020-11-03 03:16:46 +05:30
pl => mech%get ('plasticity')
2020-08-15 19:32:10 +05:30
if(pl%get_asString('type') == 'none') myPlasticity(p) = .true.
enddo
Ninstances = count(myPlasticity)
print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT)
if(Ninstances == 0) return
2020-08-15 19:32:10 +05:30
do p = 1, phases%length
phase => phases%get(p)
if(.not. myPlasticity(p)) cycle
2021-01-26 12:24:24 +05:30
Nconstituents = count(material_phaseAt2 == p)
2021-02-09 03:51:53 +05:30
call phase_allocateState(plasticState(p),Nconstituents,0,0,0)
enddo
2020-08-15 19:32:10 +05:30
end function plastic_none_init
2021-01-26 05:41:32 +05:30
end submodule none