9 subroutine heat_solve_main(hecMESH, hecMAT, hecMESHmpc, hecMATmpc, fstrPARAM, fstrHEAT, ISTEP, iterALL, next_time, delta_time)
16 integer(kind=kint) :: i, iterALL, ISTEP, bup_n_dof
17 real(kind=kreal) :: delta_time, next_time
18 type(hecmwst_local_mesh) :: hecmesh
19 type(hecmwst_matrix) :: hecMAT
22 type(hecmwst_local_mesh),
pointer :: hecMESHmpc
23 type(hecmwst_matrix),
pointer :: hecMATmpc
24 logical :: is_congerged
35 hecmatmpc%Iarray(97) = 1
36 bup_n_dof = hecmesh%n_dof
39 hecmesh%n_dof = bup_n_dof
40 call hecmw_mpc_tback_sol(hecmesh, hecmat, hecmatmpc)
42 do i = 1, hecmesh%n_node
43 fstrheat%TEMPC(i) = fstrheat%TEMP(i)
44 fstrheat%TEMP (i) = hecmat%X(i)
49 if(is_congerged .or. fstrheat%is_iter_max_limit .or. fstrheat%beta == 0.0d0)
exit
56 integer(kind=kint) :: i, iterALL, iter_max, ISTEP
57 real(kind=kreal) :: val, iter_eps
58 type(hecmwst_local_mesh) :: hecmesh
61 logical :: is_congerged
63 is_congerged = .false.
64 fstrheat%is_iter_max_limit = .false.
65 iter_max = fstrparam%itmax(istep)
66 iter_eps = fstrparam%eps(istep)
69 do i = 1, hecmesh%nn_internal
70 val = val + (fstrheat%TEMP(i) - fstrheat%TEMPC(i))**2
72 call hecmw_allreduce_r1(hecmesh, val, hecmw_sum)
75 if(hecmesh%my_rank == 0)
then
76 write(*,
'(i8,1pe16.6)') iterall, val
79 if(val < iter_eps)
then
80 if(hecmesh%my_rank == 0)
write(
imsg,*)
' !!! CONVERGENCE ACHIEVED '
84 if(iter_max <= iterall)
then
85 if(hecmesh%my_rank == 0)
write(*,*)
' !!! ITERATION COUNT OVER : MAX = ', iter_max
86 fstrheat%is_iter_max_limit = .true.