print instead of write
This commit is contained in:
parent
168d6e85e1
commit
8fbadef524
|
@ -203,8 +203,7 @@ function grid_damage_spectral_solution(timeinc) 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(IO_STDOUT,'(/,a,f8.6,2x,f8.6,2x,e11.4,/)',advance='no') ' Minimum|Maximum|Delta Damage = ',&
|
print'(/,a,f8.6,2x,f8.6,2x,e11.4)', ' Minimum|Maximum|Delta Damage = ', phi_min, phi_max, stagNorm
|
||||||
phi_min, phi_max, stagNorm
|
|
||||||
print'(/,a)', ' ==========================================================================='
|
print'(/,a)', ' ==========================================================================='
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
|
|
||||||
|
|
|
@ -510,10 +510,9 @@ subroutine formResidual(da_local,x_local, &
|
||||||
newIteration: if (totalIter <= PETScIter) then
|
newIteration: if (totalIter <= PETScIter) then
|
||||||
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) print'(/,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
||||||
write(IO_STDOUT,'(/,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(IO_STDOUT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
print'(/,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
||||||
' deformation gradient aim =', transpose(F_aim)
|
' deformation gradient aim =', transpose(F_aim)
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
endif newIteration
|
endif newIteration
|
||||||
|
|
|
@ -472,10 +472,9 @@ subroutine formResidual(in, F, &
|
||||||
newIteration: if (totalIter <= PETScIter) then
|
newIteration: if (totalIter <= PETScIter) then
|
||||||
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) print'(/,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
||||||
write(IO_STDOUT,'(/,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(IO_STDOUT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
print'(/,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
||||||
' deformation gradient aim =', transpose(F_aim)
|
' deformation gradient aim =', transpose(F_aim)
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
endif newIteration
|
endif newIteration
|
||||||
|
|
|
@ -555,10 +555,9 @@ subroutine formResidual(in, FandF_tau, &
|
||||||
newIteration: if (totalIter <= PETScIter) then
|
newIteration: if (totalIter <= PETScIter) then
|
||||||
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) print'(/,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
||||||
write(IO_STDOUT,'(/,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(IO_STDOUT,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
print'(/,a,/,2(3(f12.7,1x)/),3(f12.7,1x))', &
|
||||||
' deformation gradient aim =', transpose(F_aim)
|
' deformation gradient aim =', transpose(F_aim)
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
endif newIteration
|
endif newIteration
|
||||||
|
|
|
@ -197,8 +197,7 @@ function grid_thermal_spectral_solution(timeinc) 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(IO_STDOUT,'(/,a,f8.4,2x,f8.4,2x,f8.4,/)',advance='no') ' Minimum|Maximum|Delta Temperature / K = ',&
|
print'(/,a,f8.4,2x,f8.4,2x,f8.4)', ' Minimum|Maximum|Delta Temperature / K = ', T_min, T_max, stagNorm
|
||||||
T_min, T_max, stagNorm
|
|
||||||
print'(/,a)', ' ==========================================================================='
|
print'(/,a)', ' ==========================================================================='
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
|
|
||||||
|
|
|
@ -688,8 +688,8 @@ 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(IO_STDOUT,'(/,a,/,9(9(2x,f12.7,1x)/))',advance='no') ' Stiffness C (load) / GPa =',&
|
print'(/,a,/,8(9(2x,f12.7,1x)/),9(2x,f12.7,1x))', &
|
||||||
transpose(temp99_Real)*1.0e-9_pReal
|
' Stiffness C (load) / GPa =', transpose(temp99_Real)*1.0e-9_pReal
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -709,9 +709,8 @@ 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(IO_STDOUT,trim(formatString),advance='no') ' C * S (load) ', &
|
print trim(formatString), ' C * S (load) ', transpose(matmul(c_reduced,s_reduced))
|
||||||
transpose(matmul(c_reduced,s_reduced))
|
print trim(formatString), ' S (load) ', transpose(s_reduced)
|
||||||
write(IO_STDOUT,trim(formatString),advance='no') ' S (load) ', transpose(s_reduced)
|
|
||||||
if(errmatinv) error stop 'matrix inversion error'
|
if(errmatinv) error stop 'matrix inversion error'
|
||||||
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])
|
||||||
|
@ -722,7 +721,7 @@ 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(IO_STDOUT,'(/,a,/,9(9(2x,f10.5,1x)/),/)',advance='no') &
|
print'(/,a,/,9(9(2x,f10.5,1x)/),9(2x,f10.5,1x))', &
|
||||||
' Masked Compliance (load) * GPa =', transpose(temp99_Real)*1.0e9_pReal
|
' Masked Compliance (load) * GPa =', transpose(temp99_Real)*1.0e9_pReal
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
endif
|
endif
|
||||||
|
@ -818,13 +817,11 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,&
|
||||||
P = reshape(homogenization_P, [3,3,grid(1),grid(2),grid3])
|
P = reshape(homogenization_P, [3,3,grid(1),grid(2),grid3])
|
||||||
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) print'(/,a,/,2(3(2x,f12.4,1x)/),3(2x,f12.4,1x))', &
|
||||||
write(IO_STDOUT,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress (lab) / MPa =',&
|
' Piola--Kirchhoff stress (lab) / MPa =', transpose(P_av)*1.e-6_pReal
|
||||||
transpose(P_av)*1.e-6_pReal
|
if(present(rotation_BC)) P_av = rotation_BC%rotate(P_av)
|
||||||
if(present(rotation_BC)) &
|
print'(/,a,/,2(3(2x,f12.4,1x)/),3(2x,f12.4,1x))', &
|
||||||
P_av = rotation_BC%rotate(P_av)
|
' Piola--Kirchhoff stress / MPa =', transpose(P_av)*1.e-6_pReal
|
||||||
write(IO_STDOUT,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress / MPa =',&
|
|
||||||
transpose(P_av)*1.e-6_pReal
|
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
|
|
||||||
dPdF_max = 0.0_pReal
|
dPdF_max = 0.0_pReal
|
||||||
|
|
|
@ -659,8 +659,8 @@ 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(IO_STDOUT,'(/,a,/,3(3(2x,f12.4,1x)/))',advance='no') ' Piola--Kirchhoff stress / MPa =',&
|
print'(/,a,/,2(3(2x,f12.4,1x)/),3(2x,f12.4,1x))', &
|
||||||
transpose(P_av)*1.e-6_pReal
|
' Piola--Kirchhoff stress / MPa =',transpose(P_av)*1.e-6_pReal
|
||||||
flush(IO_STDOUT)
|
flush(IO_STDOUT)
|
||||||
|
|
||||||
end subroutine FEM_mech_converged
|
end subroutine FEM_mech_converged
|
||||||
|
|
Loading…
Reference in New Issue