forgotten renames in subfolders
This commit is contained in:
parent
f26c3ca1ea
commit
53ce4e07d2
|
@ -99,7 +99,7 @@ program DAMASK_grid
|
||||||
! init DAMASK (all modules)
|
! init DAMASK (all modules)
|
||||||
|
|
||||||
call CPFEM_initAll
|
call CPFEM_initAll
|
||||||
print'(/,a)', ' <<<+- DAMASK_spectral init -+>>>'; flush(6)
|
print'(/,a)', ' <<<+- DAMASK_spectral init -+>>>'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
print*, 'Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
print*, 'Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
||||||
print*, 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
print*, 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
||||||
|
@ -279,11 +279,11 @@ program DAMASK_grid
|
||||||
endif
|
endif
|
||||||
do i = 1, 3; do j = 1, 3
|
do i = 1, 3; do j = 1, 3
|
||||||
if(newLoadCase%deformation%maskLogical(i,j)) then
|
if(newLoadCase%deformation%maskLogical(i,j)) then
|
||||||
write(6,'(2x,f12.7)',advance='no') newLoadCase%deformation%values(i,j)
|
write(OUTPUT_UNIT,'(2x,f12.7)',advance='no') newLoadCase%deformation%values(i,j)
|
||||||
else
|
else
|
||||||
write(6,'(2x,12a)',advance='no') ' * '
|
write(OUTPUT_UNIT,'(2x,12a)',advance='no') ' * '
|
||||||
endif
|
endif
|
||||||
enddo; write(6,'(/)',advance='no')
|
enddo; write(OUTPUT_UNIT,'(/)',advance='no')
|
||||||
enddo
|
enddo
|
||||||
if (any(newLoadCase%stress%maskLogical .eqv. &
|
if (any(newLoadCase%stress%maskLogical .eqv. &
|
||||||
newLoadCase%deformation%maskLogical)) errorID = 831 ! exclusive or masking only
|
newLoadCase%deformation%maskLogical)) errorID = 831 ! exclusive or masking only
|
||||||
|
@ -292,17 +292,17 @@ program DAMASK_grid
|
||||||
print*, ' stress / GPa:'
|
print*, ' stress / GPa:'
|
||||||
do i = 1, 3; do j = 1, 3
|
do i = 1, 3; do j = 1, 3
|
||||||
if(newLoadCase%stress%maskLogical(i,j)) then
|
if(newLoadCase%stress%maskLogical(i,j)) then
|
||||||
write(6,'(2x,f12.7)',advance='no') newLoadCase%stress%values(i,j)*1e-9_pReal
|
write(OUTPUT_UNIT,'(2x,f12.7)',advance='no') newLoadCase%stress%values(i,j)*1e-9_pReal
|
||||||
else
|
else
|
||||||
write(6,'(2x,12a)',advance='no') ' * '
|
write(OUTPUT_UNIT,'(2x,12a)',advance='no') ' * '
|
||||||
endif
|
endif
|
||||||
enddo; write(6,'(/)',advance='no')
|
enddo; write(OUTPUT_UNIT,'(/)',advance='no')
|
||||||
enddo
|
enddo
|
||||||
if (any(abs(matmul(newLoadCase%rot%asMatrix(), &
|
if (any(abs(matmul(newLoadCase%rot%asMatrix(), &
|
||||||
transpose(newLoadCase%rot%asMatrix()))-math_I3) > &
|
transpose(newLoadCase%rot%asMatrix()))-math_I3) > &
|
||||||
reshape(spread(tol_math_check,1,9),[ 3,3]))) errorID = 846 ! given rotation matrix contains strain
|
reshape(spread(tol_math_check,1,9),[ 3,3]))) errorID = 846 ! given rotation matrix contains strain
|
||||||
if (any(dNeq(newLoadCase%rot%asMatrix(), math_I3))) &
|
if (any(dNeq(newLoadCase%rot%asMatrix(), math_I3))) &
|
||||||
write(6,'(2x,a,/,3(3(3x,f12.7,1x)/))',advance='no') 'rotation of loadframe:',&
|
write(OUTPUT_UNIT,'(2x,a,/,3(3(3x,f12.7,1x)/))',advance='no') 'rotation of loadframe:',&
|
||||||
transpose(newLoadCase%rot%asMatrix())
|
transpose(newLoadCase%rot%asMatrix())
|
||||||
if (newLoadCase%time < 0.0_pReal) errorID = 834 ! negative time increment
|
if (newLoadCase%time < 0.0_pReal) errorID = 834 ! negative time increment
|
||||||
print'(a,f0.3)', ' time: ', newLoadCase%time
|
print'(a,f0.3)', ' time: ', newLoadCase%time
|
||||||
|
@ -342,7 +342,7 @@ program DAMASK_grid
|
||||||
open(newunit=statUnit,file=trim(getSolverJobName())//'.sta',form='FORMATTED',status='REPLACE')
|
open(newunit=statUnit,file=trim(getSolverJobName())//'.sta',form='FORMATTED',status='REPLACE')
|
||||||
write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded' ! statistics file
|
write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded' ! statistics file
|
||||||
if (debug_grid%contains('basic')) print'(/,a)', ' header of statistics file written out'
|
if (debug_grid%contains('basic')) print'(/,a)', ' header of statistics file written out'
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
else writeHeader
|
else writeHeader
|
||||||
open(newunit=statUnit,file=trim(getSolverJobName())//&
|
open(newunit=statUnit,file=trim(getSolverJobName())//&
|
||||||
'.sta',form='FORMATTED', position='APPEND', status='OLD')
|
'.sta',form='FORMATTED', position='APPEND', status='OLD')
|
||||||
|
@ -405,7 +405,7 @@ program DAMASK_grid
|
||||||
write(incInfo,'(4(a,i0))') &
|
write(incInfo,'(4(a,i0))') &
|
||||||
'Increment ',totalIncsCounter,'/',sum(loadCases%incs),&
|
'Increment ',totalIncsCounter,'/',sum(loadCases%incs),&
|
||||||
'-', stepFraction,'/',subStepFactor**cutBackLevel
|
'-', stepFraction,'/',subStepFactor**cutBackLevel
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! forward fields
|
! forward fields
|
||||||
|
@ -489,11 +489,11 @@ program DAMASK_grid
|
||||||
print'(/,a,i0,a)', ' increment ', totalIncsCounter, ' converged'
|
print'(/,a,i0,a)', ' increment ', totalIncsCounter, ' converged'
|
||||||
else
|
else
|
||||||
print'(/,a,i0,a)', ' increment ', totalIncsCounter, ' NOT converged'
|
print'(/,a,i0,a)', ' increment ', totalIncsCounter, ' NOT converged'
|
||||||
endif; flush(6)
|
endif; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0) then ! at output frequency
|
if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0) then ! at output frequency
|
||||||
print'(1/,a)', ' ... writing results to file ......................................'
|
print'(1/,a)', ' ... writing results to file ......................................'
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
call CPFEM_results(totalIncsCounter,time)
|
call CPFEM_results(totalIncsCounter,time)
|
||||||
endif
|
endif
|
||||||
if (mod(inc,loadCases(currentLoadCase)%restartFrequency) == 0) then
|
if (mod(inc,loadCases(currentLoadCase)%restartFrequency) == 0) then
|
||||||
|
|
|
@ -65,7 +65,7 @@ subroutine discretization_grid_init(restart)
|
||||||
integer(C_INTPTR_T) :: &
|
integer(C_INTPTR_T) :: &
|
||||||
devNull, z, z_offset
|
devNull, z, z_offset
|
||||||
|
|
||||||
print'(/,a)', ' <<<+- discretization_grid init -+>>>'; flush(6)
|
print'(/,a)', ' <<<+- discretization_grid init -+>>>'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
if(index(interface_geomFile,'.vtr') /= 0) then
|
if(index(interface_geomFile,'.vtr') /= 0) then
|
||||||
call readVTR(grid,geomSize,origin,microstructureAt)
|
call readVTR(grid,geomSize,origin,microstructureAt)
|
||||||
|
|
|
@ -205,10 +205,10 @@ function grid_damage_spectral_solution(timeinc,timeinc_old) result(solution)
|
||||||
call VecMax(solution_vec,devNull,phi_max,ierr); CHKERRQ(ierr)
|
call VecMax(solution_vec,devNull,phi_max,ierr); CHKERRQ(ierr)
|
||||||
if (solution%converged) &
|
if (solution%converged) &
|
||||||
print'(/,a)', ' ... nonlocal damage converged .....................................'
|
print'(/,a)', ' ... nonlocal damage converged .....................................'
|
||||||
write(6,'(/,a,f8.6,2x,f8.6,2x,e11.4,/)',advance='no') ' Minimum|Maximum|Delta Damage = ',&
|
write(OUTPUT_UNIT,'(/,a,f8.6,2x,f8.6,2x,e11.4,/)',advance='no') ' Minimum|Maximum|Delta Damage = ',&
|
||||||
phi_min, phi_max, stagNorm
|
phi_min, phi_max, stagNorm
|
||||||
print'(/,a)', ' ==========================================================================='
|
print'(/,a)', ' ==========================================================================='
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
end function grid_damage_spectral_solution
|
end function grid_damage_spectral_solution
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ subroutine grid_mech_FEM_init
|
||||||
PetscScalar, pointer, dimension(:,:,:,:) :: &
|
PetscScalar, pointer, dimension(:,:,:,:) :: &
|
||||||
u_current,u_lastInc
|
u_current,u_lastInc
|
||||||
|
|
||||||
print'(/,a)', ' <<<+- grid_mech_FEM init -+>>>'; flush(6)
|
print'(/,a)', ' <<<+- grid_mech_FEM init -+>>>'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
!-----------------------------------------------------------------------------------------------
|
!-----------------------------------------------------------------------------------------------
|
||||||
! debugging options
|
! debugging options
|
||||||
|
@ -413,7 +413,7 @@ subroutine grid_mech_FEM_restartWrite
|
||||||
call DMDAVecGetArrayF90(mech_grid,solution_current,u_current,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(mech_grid,solution_current,u_current,ierr); CHKERRQ(ierr)
|
||||||
call DMDAVecGetArrayF90(mech_grid,solution_lastInc,u_lastInc,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(mech_grid,solution_lastInc,u_lastInc,ierr); CHKERRQ(ierr)
|
||||||
|
|
||||||
print*, 'writing solver data required for restart to file'; flush(6)
|
print*, 'writing solver data required for restart to file'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
write(fileName,'(a,a,i0,a)') trim(getSolverJobName()),'_',worldrank,'.hdf5'
|
write(fileName,'(a,a,i0,a)') trim(getSolverJobName()),'_',worldrank,'.hdf5'
|
||||||
fileHandle = HDF5_openFile(fileName,'w')
|
fileHandle = HDF5_openFile(fileName,'w')
|
||||||
|
@ -481,7 +481,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,fnorm,reason,dummy,i
|
||||||
print'(a,f12.2,a,es8.2,a,es9.2,a)', ' error stress BC = ', &
|
print'(a,f12.2,a,es8.2,a,es9.2,a)', ' error stress BC = ', &
|
||||||
err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')'
|
err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')'
|
||||||
print'(/,a)', ' ==========================================================================='
|
print'(/,a)', ' ==========================================================================='
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
end subroutine converged
|
end subroutine converged
|
||||||
|
|
||||||
|
@ -517,11 +517,11 @@ subroutine formResidual(da_local,x_local, &
|
||||||
totalIter = totalIter + 1
|
totalIter = totalIter + 1
|
||||||
print'(1x,a,3(a,i0))', trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter+1, '≤', num%itmax
|
print'(1x,a,3(a,i0))', trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter+1, '≤', num%itmax
|
||||||
if (debugRotation) &
|
if (debugRotation) &
|
||||||
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
write(OUTPUT_UNIT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
||||||
' deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
' deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
||||||
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
write(OUTPUT_UNIT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
||||||
' deformation gradient aim =', transpose(F_aim)
|
' deformation gradient aim =', transpose(F_aim)
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
endif newIteration
|
endif newIteration
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -109,7 +109,7 @@ subroutine grid_mech_spectral_basic_init
|
||||||
character(len=pStringLen) :: &
|
character(len=pStringLen) :: &
|
||||||
fileName
|
fileName
|
||||||
|
|
||||||
print'(/,a)', ' <<<+- grid_mech_spectral_basic init -+>>>'; flush(6)
|
print'(/,a)', ' <<<+- grid_mech_spectral_basic init -+>>>'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
print*, 'Eisenlohr et al., International Journal of Plasticity 46:37–53, 2013'
|
print*, 'Eisenlohr et al., International Journal of Plasticity 46:37–53, 2013'
|
||||||
print*, 'https://doi.org/10.1016/j.ijplas.2012.09.012'//IO_EOL
|
print*, 'https://doi.org/10.1016/j.ijplas.2012.09.012'//IO_EOL
|
||||||
|
@ -375,7 +375,7 @@ subroutine grid_mech_spectral_basic_restartWrite
|
||||||
|
|
||||||
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr)
|
call DMDAVecGetArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr)
|
||||||
|
|
||||||
print'(a)', ' writing solver data required for restart to file'; flush(6)
|
print'(a)', ' writing solver data required for restart to file'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
write(fileName,'(a,a,i0,a)') trim(getSolverJobName()),'_',worldrank,'.hdf5'
|
write(fileName,'(a,a,i0,a)') trim(getSolverJobName()),'_',worldrank,'.hdf5'
|
||||||
fileHandle = HDF5_openFile(fileName,'w')
|
fileHandle = HDF5_openFile(fileName,'w')
|
||||||
|
@ -441,7 +441,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dumm
|
||||||
print'(a,f12.2,a,es8.2,a,es9.2,a)', ' error stress BC = ', &
|
print'(a,f12.2,a,es8.2,a,es9.2,a)', ' error stress BC = ', &
|
||||||
err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')'
|
err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')'
|
||||||
print'(/,a)', ' ==========================================================================='
|
print'(/,a)', ' ==========================================================================='
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
end subroutine converged
|
end subroutine converged
|
||||||
|
|
||||||
|
@ -475,11 +475,11 @@ subroutine formResidual(in, F, &
|
||||||
totalIter = totalIter + 1
|
totalIter = totalIter + 1
|
||||||
print'(1x,a,3(a,i0))', trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter, '≤', num%itmax
|
print'(1x,a,3(a,i0))', trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter, '≤', num%itmax
|
||||||
if (debugRotation) &
|
if (debugRotation) &
|
||||||
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
write(OUTPUT_UNIT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
||||||
' deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
' deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
||||||
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
write(OUTPUT_UNIT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
||||||
' deformation gradient aim =', transpose(F_aim)
|
' deformation gradient aim =', transpose(F_aim)
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
endif newIteration
|
endif newIteration
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -123,7 +123,7 @@ subroutine grid_mech_spectral_polarisation_init
|
||||||
character(len=pStringLen) :: &
|
character(len=pStringLen) :: &
|
||||||
fileName
|
fileName
|
||||||
|
|
||||||
print'(/,a)', ' <<<+- grid_mech_spectral_polarisation init -+>>>'; flush(6)
|
print'(/,a)', ' <<<+- grid_mech_spectral_polarisation init -+>>>'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
print*, 'Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
|
print*, 'Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
|
||||||
print*, 'https://doi.org/10.1016/j.ijplas.2014.02.006'
|
print*, 'https://doi.org/10.1016/j.ijplas.2014.02.006'
|
||||||
|
@ -433,7 +433,7 @@ subroutine grid_mech_spectral_polarisation_restartWrite
|
||||||
F => FandF_tau(0: 8,:,:,:)
|
F => FandF_tau(0: 8,:,:,:)
|
||||||
F_tau => FandF_tau(9:17,:,:,:)
|
F_tau => FandF_tau(9:17,:,:,:)
|
||||||
|
|
||||||
print*, 'writing solver data required for restart to file'; flush(6)
|
print*, 'writing solver data required for restart to file'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
write(fileName,'(a,a,i0,a)') trim(getSolverJobName()),'_',worldrank,'.hdf5'
|
write(fileName,'(a,a,i0,a)') trim(getSolverJobName()),'_',worldrank,'.hdf5'
|
||||||
fileHandle = HDF5_openFile(fileName,'w')
|
fileHandle = HDF5_openFile(fileName,'w')
|
||||||
|
@ -505,7 +505,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dumm
|
||||||
print '(a,f12.2,a,es8.2,a,es9.2,a)', ' error stress BC = ', &
|
print '(a,f12.2,a,es8.2,a,es9.2,a)', ' error stress BC = ', &
|
||||||
err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')'
|
err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')'
|
||||||
print'(/,a)', ' ==========================================================================='
|
print'(/,a)', ' ==========================================================================='
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
end subroutine converged
|
end subroutine converged
|
||||||
|
|
||||||
|
@ -559,11 +559,11 @@ subroutine formResidual(in, FandF_tau, &
|
||||||
totalIter = totalIter + 1
|
totalIter = totalIter + 1
|
||||||
print'(1x,a,3(a,i0))', trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter, '≤', num%itmax
|
print'(1x,a,3(a,i0))', trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter, '≤', num%itmax
|
||||||
if(debugRotation) &
|
if(debugRotation) &
|
||||||
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
write(OUTPUT_UNIT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
||||||
' deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
' deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
||||||
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
write(OUTPUT_UNIT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
||||||
' deformation gradient aim =', transpose(F_aim)
|
' deformation gradient aim =', transpose(F_aim)
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
endif newIteration
|
endif newIteration
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -199,10 +199,10 @@ function grid_thermal_spectral_solution(timeinc,timeinc_old) result(solution)
|
||||||
call VecMax(solution_vec,devNull,T_max,ierr); CHKERRQ(ierr)
|
call VecMax(solution_vec,devNull,T_max,ierr); CHKERRQ(ierr)
|
||||||
if (solution%converged) &
|
if (solution%converged) &
|
||||||
print'(/,a)', ' ... thermal conduction converged ..................................'
|
print'(/,a)', ' ... thermal conduction converged ..................................'
|
||||||
write(6,'(/,a,f8.4,2x,f8.4,2x,f8.4,/)',advance='no') ' Minimum|Maximum|Delta Temperature / K = ',&
|
write(OUTPUT_UNIT,'(/,a,f8.4,2x,f8.4,2x,f8.4,/)',advance='no') ' Minimum|Maximum|Delta Temperature / K = ',&
|
||||||
T_min, T_max, stagNorm
|
T_min, T_max, stagNorm
|
||||||
print'(/,a)', ' ==========================================================================='
|
print'(/,a)', ' ==========================================================================='
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
end function grid_thermal_spectral_solution
|
end function grid_thermal_spectral_solution
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ subroutine spectral_utilities_init
|
||||||
if(debugPETSc) print'(3(/,a),/)', &
|
if(debugPETSc) print'(3(/,a),/)', &
|
||||||
' Initializing PETSc with debug options: ', &
|
' Initializing PETSc with debug options: ', &
|
||||||
trim(PETScDebug), &
|
trim(PETScDebug), &
|
||||||
' add more using the PETSc_Options keyword in numerics.yaml '; flush(6)
|
' add more using the PETSc_Options keyword in numerics.yaml '; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
num_grid => config_numerics%get('grid',defaultVal=emptyDict)
|
num_grid => config_numerics%get('grid',defaultVal=emptyDict)
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ subroutine spectral_utilities_init
|
||||||
if (pReal /= C_DOUBLE .or. kind(1) /= C_INT) error stop 'C and Fortran datatypes do not match'
|
if (pReal /= C_DOUBLE .or. kind(1) /= C_INT) error stop 'C and Fortran datatypes do not match'
|
||||||
call fftw_set_timelimit(num_grid%get_asFloat('fftw_timelimit',defaultVal=-1.0_pReal))
|
call fftw_set_timelimit(num_grid%get_asFloat('fftw_timelimit',defaultVal=-1.0_pReal))
|
||||||
|
|
||||||
print*, 'FFTW initialized'; flush(6)
|
print*, 'FFTW initialized'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! MPI allocation
|
! MPI allocation
|
||||||
|
@ -507,7 +507,7 @@ subroutine utilities_fourierGammaConvolution(fieldAim)
|
||||||
|
|
||||||
|
|
||||||
print'(/,a)', ' ... doing gamma convolution ...............................................'
|
print'(/,a)', ' ... doing gamma convolution ...............................................'
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! do the actual spectral method calculation (mechanical equilibrium)
|
! do the actual spectral method calculation (mechanical equilibrium)
|
||||||
|
@ -577,7 +577,7 @@ real(pReal) function utilities_divergenceRMS()
|
||||||
complex(pReal), dimension(3) :: rescaledGeom
|
complex(pReal), dimension(3) :: rescaledGeom
|
||||||
|
|
||||||
print'(/,a)', ' ... calculating divergence ................................................'
|
print'(/,a)', ' ... calculating divergence ................................................'
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
rescaledGeom = cmplx(geomSize/scaledGeomSize,0.0_pReal)
|
rescaledGeom = cmplx(geomSize/scaledGeomSize,0.0_pReal)
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ real(pReal) function utilities_curlRMS()
|
||||||
complex(pReal), dimension(3) :: rescaledGeom
|
complex(pReal), dimension(3) :: rescaledGeom
|
||||||
|
|
||||||
print'(/,a)', ' ... calculating curl ......................................................'
|
print'(/,a)', ' ... calculating curl ......................................................'
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
rescaledGeom = cmplx(geomSize/scaledGeomSize,0.0_pReal)
|
rescaledGeom = cmplx(geomSize/scaledGeomSize,0.0_pReal)
|
||||||
|
|
||||||
|
@ -701,9 +701,9 @@ function utilities_maskedCompliance(rot_BC,mask_stress,C)
|
||||||
|
|
||||||
if(debugGeneral) then
|
if(debugGeneral) then
|
||||||
print'(/,a)', ' ... updating masked compliance ............................................'
|
print'(/,a)', ' ... updating masked compliance ............................................'
|
||||||
write(6,'(/,a,/,9(9(2x,f12.7,1x)/))',advance='no') ' Stiffness C (load) / GPa =',&
|
write(OUTPUT_UNIT,'(/,a,/,9(9(2x,f12.7,1x)/))',advance='no') ' Stiffness C (load) / GPa =',&
|
||||||
transpose(temp99_Real)*1.0e-9_pReal
|
transpose(temp99_Real)*1.0e-9_pReal
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
do i = 1,9; do j = 1,9
|
do i = 1,9; do j = 1,9
|
||||||
|
@ -723,9 +723,9 @@ function utilities_maskedCompliance(rot_BC,mask_stress,C)
|
||||||
if (debugGeneral .or. errmatinv) then
|
if (debugGeneral .or. errmatinv) then
|
||||||
write(formatString, '(i2)') size_reduced
|
write(formatString, '(i2)') size_reduced
|
||||||
formatString = '(/,a,/,'//trim(formatString)//'('//trim(formatString)//'(2x,es9.2,1x)/))'
|
formatString = '(/,a,/,'//trim(formatString)//'('//trim(formatString)//'(2x,es9.2,1x)/))'
|
||||||
write(6,trim(formatString),advance='no') ' C * S (load) ', &
|
write(OUTPUT_UNIT,trim(formatString),advance='no') ' C * S (load) ', &
|
||||||
transpose(matmul(c_reduced,s_reduced))
|
transpose(matmul(c_reduced,s_reduced))
|
||||||
write(6,trim(formatString),advance='no') ' S (load) ', transpose(s_reduced)
|
write(OUTPUT_UNIT,trim(formatString),advance='no') ' S (load) ', transpose(s_reduced)
|
||||||
if(errmatinv) call IO_error(error_ID=400,ext_msg='utilities_maskedCompliance')
|
if(errmatinv) call IO_error(error_ID=400,ext_msg='utilities_maskedCompliance')
|
||||||
endif
|
endif
|
||||||
temp99_real = reshape(unpack(reshape(s_reduced,[size_reduced**2]),reshape(mask,[81]),0.0_pReal),[9,9])
|
temp99_real = reshape(unpack(reshape(s_reduced,[size_reduced**2]),reshape(mask,[81]),0.0_pReal),[9,9])
|
||||||
|
@ -736,9 +736,9 @@ function utilities_maskedCompliance(rot_BC,mask_stress,C)
|
||||||
utilities_maskedCompliance = math_99to3333(temp99_Real)
|
utilities_maskedCompliance = math_99to3333(temp99_Real)
|
||||||
|
|
||||||
if(debugGeneral) then
|
if(debugGeneral) then
|
||||||
write(6,'(/,a,/,9(9(2x,f10.5,1x)/),/)',advance='no') &
|
write(OUTPUT_UNIT,'(/,a,/,9(9(2x,f10.5,1x)/),/)',advance='no') &
|
||||||
' Masked Compliance (load) * GPa =', transpose(temp99_Real)*1.0e9_pReal
|
' Masked Compliance (load) * GPa =', transpose(temp99_Real)*1.0e9_pReal
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
end function utilities_maskedCompliance
|
end function utilities_maskedCompliance
|
||||||
|
@ -823,7 +823,7 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,&
|
||||||
real(pReal), dimension(2) :: valueAndRank !< pair of min/max norm of dPdF to synchronize min/max of dPdF
|
real(pReal), dimension(2) :: valueAndRank !< pair of min/max norm of dPdF to synchronize min/max of dPdF
|
||||||
|
|
||||||
print'(/,a)', ' ... evaluating constitutive response ......................................'
|
print'(/,a)', ' ... evaluating constitutive response ......................................'
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
materialpoint_F = reshape(F,[3,3,1,product(grid(1:2))*grid3]) ! set materialpoint target F to estimated field
|
materialpoint_F = reshape(F,[3,3,1,product(grid(1:2))*grid3]) ! set materialpoint target F to estimated field
|
||||||
|
|
||||||
|
@ -833,13 +833,13 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,&
|
||||||
P_av = sum(sum(sum(P,dim=5),dim=4),dim=3) * wgt ! average of P
|
P_av = sum(sum(sum(P,dim=5),dim=4),dim=3) * wgt ! average of P
|
||||||
call MPI_Allreduce(MPI_IN_PLACE,P_av,9,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
call MPI_Allreduce(MPI_IN_PLACE,P_av,9,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
||||||
if (debugRotation) &
|
if (debugRotation) &
|
||||||
write(6,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress (lab) / MPa =',&
|
write(OUTPUT_UNIT,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress (lab) / MPa =',&
|
||||||
transpose(P_av)*1.e-6_pReal
|
transpose(P_av)*1.e-6_pReal
|
||||||
if(present(rotation_BC)) &
|
if(present(rotation_BC)) &
|
||||||
P_av = rotation_BC%rotate(P_av)
|
P_av = rotation_BC%rotate(P_av)
|
||||||
write(6,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress / MPa =',&
|
write(OUTPUT_UNIT,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress / MPa =',&
|
||||||
transpose(P_av)*1.e-6_pReal
|
transpose(P_av)*1.e-6_pReal
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
dPdF_max = 0.0_pReal
|
dPdF_max = 0.0_pReal
|
||||||
dPdF_norm_max = 0.0_pReal
|
dPdF_norm_max = 0.0_pReal
|
||||||
|
@ -1095,7 +1095,7 @@ subroutine utilities_saveReferenceStiffness
|
||||||
fileUnit,ierr
|
fileUnit,ierr
|
||||||
|
|
||||||
if (worldrank == 0) then
|
if (worldrank == 0) then
|
||||||
print'(a)', ' writing reference stiffness data required for restart to file'; flush(6)
|
print'(a)', ' writing reference stiffness data required for restart to file'; flush(OUTPUT_UNIT)
|
||||||
open(newunit=fileUnit, file=getSolverJobName()//'.C_ref',&
|
open(newunit=fileUnit, file=getSolverJobName()//'.C_ref',&
|
||||||
status='replace',access='stream',action='write',iostat=ierr)
|
status='replace',access='stream',action='write',iostat=ierr)
|
||||||
if(ierr /=0) call IO_error(100,ext_msg='could not open file '//getSolverJobName()//'.C_ref')
|
if(ierr /=0) call IO_error(100,ext_msg='could not open file '//getSolverJobName()//'.C_ref')
|
||||||
|
|
|
@ -78,7 +78,7 @@ program DAMASK_mesh
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! init DAMASK (all modules)
|
! init DAMASK (all modules)
|
||||||
call CPFEM_initAll
|
call CPFEM_initAll
|
||||||
print'(/,a)', ' <<<+- DAMASK_mesh init -+>>>'; flush(6)
|
print'(/,a)', ' <<<+- DAMASK_mesh init -+>>>'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
!---------------------------------------------------------------------
|
!---------------------------------------------------------------------
|
||||||
! reading field information from numerics file and do sanity checks
|
! reading field information from numerics file and do sanity checks
|
||||||
|
@ -299,7 +299,7 @@ program DAMASK_mesh
|
||||||
write(incInfo,'(4(a,i0))') &
|
write(incInfo,'(4(a,i0))') &
|
||||||
'Increment ',totalIncsCounter,'/',sum(loadCases%incs),&
|
'Increment ',totalIncsCounter,'/',sum(loadCases%incs),&
|
||||||
'-',stepFraction, '/', subStepFactor**cutBackLevel
|
'-',stepFraction, '/', subStepFactor**cutBackLevel
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! forward fields
|
! forward fields
|
||||||
|
@ -363,7 +363,7 @@ program DAMASK_mesh
|
||||||
print'(/,a,i0,a)', ' increment ', totalIncsCounter, ' converged'
|
print'(/,a,i0,a)', ' increment ', totalIncsCounter, ' converged'
|
||||||
else
|
else
|
||||||
print'(/,a,i0,a)', ' increment ', totalIncsCounter, ' NOT converged'
|
print'(/,a,i0,a)', ' increment ', totalIncsCounter, ' NOT converged'
|
||||||
endif; flush(6)
|
endif; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0) then ! at output frequency
|
if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0) then ! at output frequency
|
||||||
print'(/,a)', ' ... writing results to file ......................................'
|
print'(/,a)', ' ... writing results to file ......................................'
|
||||||
|
|
|
@ -122,7 +122,7 @@ subroutine FEM_utilities_init
|
||||||
' Initializing PETSc with debug options: ', &
|
' Initializing PETSc with debug options: ', &
|
||||||
trim(PETScDebug), &
|
trim(PETScDebug), &
|
||||||
' add more using the PETSc_Options keyword in numerics.yaml '
|
' add more using the PETSc_Options keyword in numerics.yaml '
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
call PetscOptionsClear(PETSC_NULL_OPTIONS,ierr)
|
call PetscOptionsClear(PETSC_NULL_OPTIONS,ierr)
|
||||||
CHKERRQ(ierr)
|
CHKERRQ(ierr)
|
||||||
if(debugPETSc) call PetscOptionsInsertString(PETSC_NULL_OPTIONS,trim(PETSCDEBUG),ierr)
|
if(debugPETSc) call PetscOptionsInsertString(PETSC_NULL_OPTIONS,trim(PETSCDEBUG),ierr)
|
||||||
|
|
|
@ -110,7 +110,7 @@ subroutine FEM_mech_init(fieldBC)
|
||||||
class(tNode), pointer :: &
|
class(tNode), pointer :: &
|
||||||
num_mesh
|
num_mesh
|
||||||
|
|
||||||
print'(/,a)', ' <<<+- FEM_mech init -+>>>'; flush(6)
|
print'(/,a)', ' <<<+- FEM_mech init -+>>>'; flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
!-----------------------------------------------------------------------------
|
!-----------------------------------------------------------------------------
|
||||||
! read numerical parametes and do sanity checks
|
! read numerical parametes and do sanity checks
|
||||||
|
@ -319,7 +319,7 @@ type(tSolutionState) function FEM_mech_solution( &
|
||||||
endif
|
endif
|
||||||
|
|
||||||
print'(/,a)', ' ==========================================================================='
|
print'(/,a)', ' ==========================================================================='
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
end function FEM_mech_solution
|
end function FEM_mech_solution
|
||||||
|
|
||||||
|
@ -682,9 +682,9 @@ subroutine FEM_mech_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,dumm
|
||||||
print'(/,1x,a,a,i0,a,i0,f0.3)', trim(incInfo), &
|
print'(/,1x,a,a,i0,a,i0,f0.3)', trim(incInfo), &
|
||||||
' @ Iteration ',PETScIter,' mechanical residual norm = ', &
|
' @ Iteration ',PETScIter,' mechanical residual norm = ', &
|
||||||
int(fnorm/divTol),fnorm/divTol-int(fnorm/divTol)
|
int(fnorm/divTol),fnorm/divTol-int(fnorm/divTol)
|
||||||
write(6,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress / MPa =',&
|
write(OUTPUT_UNIT,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress / MPa =',&
|
||||||
transpose(P_av)*1.e-6_pReal
|
transpose(P_av)*1.e-6_pReal
|
||||||
flush(6)
|
flush(OUTPUT_UNIT)
|
||||||
|
|
||||||
end subroutine FEM_mech_converged
|
end subroutine FEM_mech_converged
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue