some minor polishing on the way

This commit is contained in:
Martin Diehl 2014-04-04 14:40:30 +00:00
parent 1f89e9d592
commit e62bf8b1b7
3 changed files with 47 additions and 41 deletions

View File

@ -135,7 +135,7 @@ subroutine constitutive_init
character(len=64), dimension(:,:), pointer :: thisOutput character(len=64), dimension(:,:), pointer :: thisOutput
character(len=32) :: outputName !< name of output, intermediate fix until HDF5 output is ready character(len=32) :: outputName !< name of output, intermediate fix until HDF5 output is ready
logical :: knownPlasticity, nonlocalConstitutionPresent logical :: knownPlasticity, nonlocalConstitutionPresent
#ifdef HDF !< phase #ifdef HDF
integer(pInt), dimension(:,:,:), allocatable :: mappingConstitutive integer(pInt), dimension(:,:,:), allocatable :: mappingConstitutive
integer(pInt), dimension(:,:,:), allocatable :: mappingCrystallite integer(pInt), dimension(:,:,:), allocatable :: mappingCrystallite
integer(pInt), dimension(:), allocatable :: ConstitutivePosition integer(pInt), dimension(:), allocatable :: ConstitutivePosition
@ -245,10 +245,11 @@ subroutine constitutive_init
select case(phase_elasticity(material_phase(g,i,e))) select case(phase_elasticity(material_phase(g,i,e)))
case default ! so far no output for elasticity case default ! so far no output for elasticity
end select end select
instance = phase_plasticityInstance(material_phase(g,i,e)) phase = material_phase(g,i,e)
instance = phase_plasticityInstance(phase)
#ifdef HDF #ifdef HDF
ConstitutivePosition(instance) = ConstitutivePosition(instance)+1_pInt ConstitutivePosition(phase) = ConstitutivePosition(phase)+1_pInt
mappingConstitutive(g,e,1:2) = [ConstitutivePosition(instance),instance] mappingConstitutive(g,e,1:2) = [ConstitutivePosition(phase),phase]
#endif #endif
select case(phase_plasticity(material_phase(g,i,e))) select case(phase_plasticity(material_phase(g,i,e)))
case (PLASTICITY_NONE_ID) case (PLASTICITY_NONE_ID)

View File

@ -372,7 +372,7 @@ subroutine constitutive_dislotwin_init(fileUnit)
call IO_error(105_pInt,ext_msg=IO_stringValue(line,positions,2_pInt)//' ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(105_pInt,ext_msg=IO_stringValue(line,positions,2_pInt)//' ('//PLASTICITY_DISLOTWIN_label//')')
end select end select
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! parameters depending on slip number of slip system families ! parameters depending on number of slip system families
case ('nslip') case ('nslip')
if (positions(1) < Nchunks_SlipFamilies + 1_pInt) & if (positions(1) < Nchunks_SlipFamilies + 1_pInt) &
call IO_warning(50_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')') call IO_warning(50_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
@ -435,6 +435,34 @@ subroutine constitutive_dislotwin_init(fileUnit)
case ('r_twin') case ('r_twin')
constitutive_dislotwin_rPerTwinFamily(1:Nchunks_TwinFamilies,instance) = tempPerTwin(1:Nchunks_TwinFamilies) constitutive_dislotwin_rPerTwinFamily(1:Nchunks_TwinFamilies,instance) = tempPerTwin(1:Nchunks_TwinFamilies)
end select end select
!--------------------------------------------------------------------------------------------------
! parameters depending on number of interactions
case ('interaction_slipslip','interactionslipslip')
if (positions(1) < 1_pInt + Nchunks_SlipSlip) &
call IO_warning(52_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
do j = 1_pInt, Nchunks_SlipSlip
constitutive_dislotwin_interaction_SlipSlip(j,instance) = IO_floatValue(line,positions,1_pInt+j)
enddo
case ('interaction_sliptwin','interactionsliptwin')
if (positions(1) < 1_pInt + Nchunks_SlipTwin) &
call IO_warning(52_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
do j = 1_pInt, Nchunks_SlipTwin
constitutive_dislotwin_interaction_SlipTwin(j,instance) = IO_floatValue(line,positions,1_pInt+j)
enddo
case ('interaction_twinslip','interactiontwinslip')
if (positions(1) < 1_pInt + Nchunks_TwinSlip) &
call IO_warning(52_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
do j = 1_pInt, Nchunks_TwinSlip
constitutive_dislotwin_interaction_TwinSlip(j,instance) = IO_floatValue(line,positions,1_pInt+j)
enddo
case ('interaction_twintwin','interactiontwintwin')
if (positions(1) < 1_pInt + Nchunks_TwinTwin) &
call IO_warning(52_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
do j = 1_pInt, Nchunks_TwinTwin
constitutive_dislotwin_interaction_TwinTwin(j,instance) = IO_floatValue(line,positions,1_pInt+j)
enddo
!--------------------------------------------------------------------------------------------------
! parameters independent of number of slip/twin systems
case ('grainsize') case ('grainsize')
constitutive_dislotwin_GrainSize(instance) = IO_floatValue(line,positions,2_pInt) constitutive_dislotwin_GrainSize(instance) = IO_floatValue(line,positions,2_pInt)
case ('maxtwinfraction') case ('maxtwinfraction')
@ -467,30 +495,6 @@ subroutine constitutive_dislotwin_init(fileUnit)
constitutive_dislotwin_CEdgeDipMinDistance(instance) = IO_floatValue(line,positions,2_pInt) constitutive_dislotwin_CEdgeDipMinDistance(instance) = IO_floatValue(line,positions,2_pInt)
case ('catomicvolume') case ('catomicvolume')
constitutive_dislotwin_CAtomicVolume(instance) = IO_floatValue(line,positions,2_pInt) constitutive_dislotwin_CAtomicVolume(instance) = IO_floatValue(line,positions,2_pInt)
case ('interaction_slipslip','interactionslipslip')
if (positions(1) < 1_pInt + Nchunks_SlipSlip) &
call IO_warning(52_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
do j = 1_pInt, Nchunks_SlipSlip
constitutive_dislotwin_interaction_SlipSlip(j,instance) = IO_floatValue(line,positions,1_pInt+j)
enddo
case ('interaction_sliptwin','interactionsliptwin')
if (positions(1) < 1_pInt + Nchunks_SlipTwin) &
call IO_warning(52_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
do j = 1_pInt, Nchunks_SlipTwin
constitutive_dislotwin_interaction_SlipTwin(j,instance) = IO_floatValue(line,positions,1_pInt+j)
enddo
case ('interaction_twinslip','interactiontwinslip')
if (positions(1) < 1_pInt + Nchunks_TwinSlip) &
call IO_warning(52_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
do j = 1_pInt, Nchunks_TwinSlip
constitutive_dislotwin_interaction_TwinSlip(j,instance) = IO_floatValue(line,positions,1_pInt+j)
enddo
case ('interaction_twintwin','interactiontwintwin')
if (positions(1) < 1_pInt + Nchunks_TwinTwin) &
call IO_warning(52_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_DISLOTWIN_label//')')
do j = 1_pInt, Nchunks_TwinTwin
constitutive_dislotwin_interaction_TwinTwin(j,instance) = IO_floatValue(line,positions,1_pInt+j)
enddo
case ('sfe_0k') case ('sfe_0k')
constitutive_dislotwin_SFE_0K(instance) = IO_floatValue(line,positions,2_pInt) constitutive_dislotwin_SFE_0K(instance) = IO_floatValue(line,positions,2_pInt)
case ('dsfe_dt') case ('dsfe_dt')

View File

@ -8,7 +8,6 @@
!> @author Krishna Komerla, Max-Planck-Institut für Eisenforschung GmbH !> @author Krishna Komerla, Max-Planck-Institut für Eisenforschung GmbH
!> @brief Sets up the mesh for the solvers MSC.Marc, Abaqus and the spectral solver !> @brief Sets up the mesh for the solvers MSC.Marc, Abaqus and the spectral solver
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module mesh module mesh
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
use prec, only: pReal, pInt use prec, only: pReal, pInt
@ -619,6 +618,7 @@ subroutine mesh_init(ip,el)
end subroutine mesh_init end subroutine mesh_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Gives the FE to CP ID mapping by binary search through lookup array !> @brief Gives the FE to CP ID mapping by binary search through lookup array
!! valid questions (what) are 'elem', 'node' !! valid questions (what) are 'elem', 'node'
@ -2462,8 +2462,8 @@ subroutine mesh_marc_get_tableStyles(fileUnit)
!! 'mesh_Nelems' and 'mesh_Nnodes' !! 'mesh_Nelems' and 'mesh_Nnodes'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine mesh_marc_count_nodesAndElements(fileUnit) subroutine mesh_marc_count_nodesAndElements(fileUnit)
use IO, only: &
use IO, only: IO_lc, & IO_lc, &
IO_stringValue, & IO_stringValue, &
IO_stringPos, & IO_stringPos, &
IO_IntValue IO_IntValue
@ -2503,8 +2503,8 @@ subroutine mesh_marc_count_nodesAndElements(fileUnit)
!! 'mesh_maxNelemInSet' !! 'mesh_maxNelemInSet'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine mesh_marc_count_elementSets(fileUnit) subroutine mesh_marc_count_elementSets(fileUnit)
use IO, only: &
use IO, only: IO_lc, & IO_lc, &
IO_stringValue, & IO_stringValue, &
IO_stringPos, & IO_stringPos, &
IO_countContinuousIntValues IO_countContinuousIntValues
@ -5115,6 +5115,7 @@ subroutine mesh_write_cellGeom
#ifdef HDF #ifdef HDF
call HDF5_mappingCells(cellconnection(1:j)) call HDF5_mappingCells(cellconnection(1:j))
#endif #endif
error=VTK_ini(output_format = 'ASCII', & error=VTK_ini(output_format = 'ASCII', &
title=trim(getSolverJobName())//' cell mesh', & title=trim(getSolverJobName())//' cell mesh', &
filename = trim(getSolverWorkingDirectoryName())//trim(getSolverJobName())//'_ipbased.vtk', & filename = trim(getSolverWorkingDirectoryName())//trim(getSolverJobName())//'_ipbased.vtk', &