FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_solve_error.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
5 
7  use hecmw_util
8 
9  integer(kind=kint), parameter :: &
17 
18 contains
19 
20  subroutine hecmw_solve_error (hecMESH, IFLAG)
22  implicit none
23  type (hecmwST_local_mesh) :: hecMESH
24  integer(kind=kint) :: IFLAG
25 
26  if ( hecmesh%zero.eq.1 .and. &
27  (iflag.eq.hecmw_solver_error_incons_pc .or. iflag.eq.hecmw_solver_error_zero_diag) ) then
28  write (*,'(/a )') &
29  & '###############################################'
30  write (*,'( a )') &
31  & '######## ERROR MESSAGE : LINEAR SOLVER ########'
32  write (*,'( a/)') &
33  & '###############################################'
34  endif
35 
36  if (iflag.eq.hecmw_solver_error_incons_pc) then
37  if (hecmesh%zero.eq.1) then
38  write (*,'(/a )')' #### HEC-MW-SOLVER-E-1001'
39  write (*,'( a/)')' inconsistent solver/preconditioning'
40  endif
41  ! call MPI_ABORT (hecMESH%MPI_COMM, ierr)
43  endif
44 
45  if (iflag.eq.hecmw_solver_error_zero_diag) then
46  if (hecmesh%zero.eq.1) then
47  write (*,'(/a )')' #### HEC-MW-SOLVER-E-2001: '
48  write (*,'( a/)')' ZERO component in diagonal block'
49  endif
50  ! call MPI_ABORT (hecMESH%MPI_COMM, ierr)
52  endif
53 
54  if (iflag.eq.hecmw_solver_error_zero_rhs) then
55  if (hecmesh%zero.eq.1) then
56  write (*,'(/a )')' #### HEC-MW-SOLVER-W-2002: '
57  write (*,'( a/)')' ZERO RHS norm'
58  endif
59  endif
60 
61  if (iflag.eq.hecmw_solver_error_noconv_maxit) then
62  if (hecmesh%zero.eq.1) then
63  write (*,'(/a )')' #### HEC-MW-SOLVER-W-3001: '
64  write (*,'( a/)')' not converged within certain iterations'
65  endif
66  endif
67 
68  if (iflag.eq.hecmw_solver_error_diverge_mat) then
69  if (hecmesh%zero.eq.1) then
70  write (*,'(/a )')' #### HEC-MW-SOLVER-W-3002: '
71  write (*,'( a/)')' diverged due to indefinite or negative definite matrix'
72  endif
73  endif
74 
75  if (iflag.eq.hecmw_solver_error_diverge_pc) then
76  if (hecmesh%zero.eq.1) then
77  write (*,'(/a )')' #### HEC-MW-SOLVER-W-3003: '
78  write (*,'( a/)')' diverged due to indefinite preconditioner'
79  endif
80  endif
81 
82  if (iflag.eq.hecmw_solver_error_diverge_nan) then
83  if (hecmesh%zero.eq.1) then
84  write (*,'(/a )')' #### HEC-MW-SOLVER-W-3004: '
85  write (*,'( a/)')' diverged due to NaN'
86  endif
87  endif
88 
89  !stop " PROGRAM STOP:"
90 
91  end subroutine hecmw_solve_error
92 
93 end module m_hecmw_solve_error
m_hecmw_solve_error::hecmw_solver_error_diverge_nan
integer(kind=kint), parameter hecmw_solver_error_diverge_nan
Definition: hecmw_solve_error.f90:9
hecmw_util::hecmw_abort
subroutine hecmw_abort(comm)
Definition: hecmw_util_f.F90:534
m_hecmw_solve_error::hecmw_solver_error_zero_diag
integer(kind=kint), parameter hecmw_solver_error_zero_diag
Definition: hecmw_solve_error.f90:9
m_hecmw_solve_error::hecmw_solver_error_incons_pc
integer(kind=kint), parameter hecmw_solver_error_incons_pc
Definition: hecmw_solve_error.f90:9
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
m_hecmw_solve_error::hecmw_solver_error_diverge_pc
integer(kind=kint), parameter hecmw_solver_error_diverge_pc
Definition: hecmw_solve_error.f90:9
m_hecmw_solve_error::hecmw_solve_error
subroutine hecmw_solve_error(hecMESH, IFLAG)
Definition: hecmw_solve_error.f90:21
m_hecmw_solve_error
Definition: hecmw_solve_error.f90:6
m_hecmw_solve_error::hecmw_solver_error_noconv_maxit
integer(kind=kint), parameter hecmw_solver_error_noconv_maxit
Definition: hecmw_solve_error.f90:9
hecmw_util::hecmw_comm_get_comm
integer(kind=kint) function hecmw_comm_get_comm()
Definition: hecmw_util_f.F90:571
m_hecmw_solve_error::hecmw_solver_error_zero_rhs
integer(kind=kint), parameter hecmw_solver_error_zero_rhs
Definition: hecmw_solve_error.f90:9
m_hecmw_solve_error::hecmw_solver_error_diverge_mat
integer(kind=kint), parameter hecmw_solver_error_diverge_mat
Definition: hecmw_solve_error.f90:9