diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index b43fd9655..ae7a480c7 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -182,7 +182,7 @@ program DAMASK_grid if ((N_def /= N_n) .or. (N_n /= N_t) .or. N_n < 1) & ! sanity check call IO_error(error_ID=837,el=currentLoadCase,ext_msg = trim(interface_loadFile)) ! error message for incomplete loadcase - newLoadCase%stress%myType='p' + newLoadCase%stress%myType='P' field = 1 newLoadCase%ID(field) = FIELD_MECH_ID ! mechanical active by default thermalActive: if (any(thermal_type == THERMAL_conduction_ID)) then @@ -198,12 +198,12 @@ program DAMASK_grid select case (step_mech%getKey(m)) case('dotF','L','F') ! assign values for the deformation BC matrix temp_valueVector = 0.0_pReal - if (step_mech%getKey(m) == 'dotF') then ! in case of dotF, set type to dotf - newLoadCase%deformation%myType = 'dotf' + if (step_mech%getKey(m) == 'dotF') then ! in case of dotF, set type to dotF + newLoadCase%deformation%myType = 'dotF' else if (step_mech%getKey(m) == 'F') then - newLoadCase%deformation%myType = 'f' + newLoadCase%deformation%myType = 'F' else - newLoadCase%deformation%myType = 'l' + newLoadCase%deformation%myType = 'L' endif step_deformation => step_mech%get(m) do j = 1, 9 @@ -244,13 +244,13 @@ program DAMASK_grid print'(/,a,i0)', ' load case: ', currentLoadCase if (.not. newLoadCase%followFormerTrajectory) & print*, ' drop guessing along trajectory' - if (newLoadCase%deformation%myType == 'l') then + if (newLoadCase%deformation%myType == 'L') then do j = 1, 3 if (any(newLoadCase%deformation%mask(j,1:3) .eqv. .true.) .and. & any(newLoadCase%deformation%mask(j,1:3) .eqv. .false.)) errorID = 832 ! each row should be either fully or not at all defined enddo print*, ' velocity gradient:' - else if (newLoadCase%deformation%myType == 'f') then + else if (newLoadCase%deformation%myType == 'F') then print*, ' deformation gradient at end of load case:' else print*, ' deformation gradient rate:' diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 876c465f9..d7ee82427 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -342,13 +342,13 @@ subroutine grid_mech_FEM_forward(cutBack,guess,timeinc,timeinc_old,loadCaseTime, !----------------------------------------------------------------------------------------------- ! calculate rate for aim - if (deformation_BC%myType=='l') then ! calculate F_aimDot from given L and current F + if (deformation_BC%myType=='L') then ! calculate F_aimDot from given L and current F F_aimDot = F_aimDot & + merge(matmul(deformation_BC%values, F_aim_lastInc),.0_pReal,deformation_BC%mask) - elseif(deformation_BC%myType=='dotf') then ! F_aimDot is prescribed + elseif(deformation_BC%myType=='dotF') then ! F_aimDot is prescribed F_aimDot = F_aimDot & + merge(deformation_BC%values,.0_pReal,deformation_BC%mask) - elseif (deformation_BC%myType=='f') then ! aim at end of load case is prescribed + elseif (deformation_BC%myType=='F') then ! aim at end of load case is prescribed F_aimDot = F_aimDot & + merge((deformation_BC%values - F_aim_lastInc)/loadCaseTime,.0_pReal,deformation_BC%mask) endif @@ -370,9 +370,9 @@ subroutine grid_mech_FEM_forward(cutBack,guess,timeinc,timeinc_old,loadCaseTime, !-------------------------------------------------------------------------------------------------- ! update average and local deformation gradients F_aim = F_aim_lastInc + F_aimDot * timeinc - if (stress_BC%myType=='p') then + if (stress_BC%myType=='P') then P_aim = P_aim + merge((stress_BC%values - P_aim)/loadCaseTime*timeinc,.0_pReal,stress_BC%mask) - elseif (stress_BC%myType=='dotp') then !UNTESTED + elseif (stress_BC%myType=='dotP') then !UNTESTED P_aim = P_aim + merge(stress_BC%values*timeinc,.0_pReal,stress_BC%mask) endif diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index 627fdb718..1a9e66908 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -308,13 +308,13 @@ subroutine grid_mech_spectral_basic_forward(cutBack,guess,timeinc,timeinc_old,lo !----------------------------------------------------------------------------------------------- ! calculate rate for aim - if (deformation_BC%myType=='l') then ! calculate F_aimDot from given L and current F + if (deformation_BC%myType=='L') then ! calculate F_aimDot from given L and current F F_aimDot = F_aimDot & + merge(matmul(deformation_BC%values, F_aim_lastInc),.0_pReal,deformation_BC%mask) - elseif(deformation_BC%myType=='dotf') then ! F_aimDot is prescribed + elseif(deformation_BC%myType=='dotF') then ! F_aimDot is prescribed F_aimDot = F_aimDot & + merge(deformation_BC%values,.0_pReal,deformation_BC%mask) - elseif (deformation_BC%myType=='f') then ! aim at end of load case is prescribed + elseif (deformation_BC%myType=='F') then ! aim at end of load case is prescribed F_aimDot = F_aimDot & + merge((deformation_BC%values - F_aim_lastInc)/loadCaseTime,.0_pReal,deformation_BC%mask) endif @@ -330,9 +330,9 @@ subroutine grid_mech_spectral_basic_forward(cutBack,guess,timeinc,timeinc_old,lo !-------------------------------------------------------------------------------------------------- ! update average and local deformation gradients F_aim = F_aim_lastInc + F_aimDot * timeinc - if (stress_BC%myType=='p') then + if (stress_BC%myType=='P') then P_aim = P_aim + merge((stress_BC%values - P_aim)/loadCaseTime*timeinc,.0_pReal,stress_BC%mask) - elseif (stress_BC%myType=='dotp') then !UNTESTED + elseif (stress_BC%myType=='dotP') then !UNTESTED P_aim = P_aim + merge(stress_BC%values*timeinc,.0_pReal,stress_BC%mask) endif diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index fea1a68f5..8380fa6c1 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -344,13 +344,13 @@ subroutine grid_mech_spectral_polarisation_forward(cutBack,guess,timeinc,timeinc !----------------------------------------------------------------------------------------------- ! calculate rate for aim - if (deformation_BC%myType=='l') then ! calculate F_aimDot from given L and current F + if (deformation_BC%myType=='L') then ! calculate F_aimDot from given L and current F F_aimDot = F_aimDot & + merge(matmul(deformation_BC%values, F_aim_lastInc),.0_pReal,deformation_BC%mask) - elseif(deformation_BC%myType=='dotf') then ! F_aimDot is prescribed + elseif(deformation_BC%myType=='dotF') then ! F_aimDot is prescribed F_aimDot = F_aimDot & + merge(deformation_BC%values,.0_pReal,deformation_BC%mask) - elseif (deformation_BC%myType=='f') then ! aim at end of load case is prescribed + elseif (deformation_BC%myType=='F') then ! aim at end of load case is prescribed F_aimDot = F_aimDot & + merge((deformation_BC%values - F_aim_lastInc)/loadCaseTime,.0_pReal,deformation_BC%mask) endif @@ -370,9 +370,9 @@ subroutine grid_mech_spectral_polarisation_forward(cutBack,guess,timeinc,timeinc !-------------------------------------------------------------------------------------------------- ! update average and local deformation gradients F_aim = F_aim_lastInc + F_aimDot * timeinc - if (stress_BC%myType=='p') then + if (stress_BC%myType=='P') then P_aim = P_aim + merge((stress_BC%values - P_aim)/loadCaseTime*timeinc,.0_pReal,stress_BC%mask) - elseif (stress_BC%myType=='dotp') then !UNTESTED + elseif (stress_BC%myType=='dotP') then !UNTESTED P_aim = P_aim + merge(stress_BC%values*timeinc,.0_pReal,stress_BC%mask) endif