FrontISTR
5.7.0
Large-scale structural analysis program with finit element method
hecmw_precond_ML_nn.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
6
!C
7
!C***
8
!C*** module hecmw_precond_ML_nn
9
!C***
10
!C
11
module
hecmw_precond_ml_nn
12
use
hecmw_util
13
14
private
15
16
public
::
hecmw_precond_ml_nn_setup
17
public
::
hecmw_precond_ml_nn_apply
18
public
::
hecmw_precond_ml_nn_clear
19
20
integer(kind=kint)
,
save
:: id
21
22
logical
,
save
:: INITIALIZED = .false.
23
24
contains
25
26
subroutine
hecmw_precond_ml_nn_setup
(hecMAT, hecMESH, sym)
27
use
hecmw_matrix_misc
28
use
hecmw_mat_id
29
implicit none
30
type
(
hecmwst_matrix
),
intent(inout)
:: hecmat
31
type
(
hecmwst_local_mesh
),
intent(in)
:: hecmesh
32
integer(kind=kint)
,
intent(in)
:: sym
33
integer(kind=kint)
:: ierr
34
integer(kind=kint)
,
save
:: n_recycle = 0
35
if
(initialized)
then
36
if
(hecmat%Iarray(98) == 1)
then
! need symbolic and numerical setup
37
call
hecmw_precond_ml_nn_clear
()
38
else
if
(hecmat%Iarray(97) == 1)
then
! need numerical setup only
39
call
hecmw_precond_ml_nn_clear
()
40
else
! no need to setup or skip setup
41
call
hecmw_mat_id_clear
(id)
42
call
hecmw_mat_id_set
(hecmat, hecmesh, id)
43
return
44
endif
45
endif
46
call
hecmw_mat_id_set
(hecmat, hecmesh, id)
47
call
hecmw_ml_wrapper_setup(id, sym, hecmat%NDOF, ierr)
48
initialized = .true.
49
hecmat%Iarray(98) = 0
! symbolic setup done
50
hecmat%Iarray(97) = 0
! numerical setup done
51
n_recycle = 0
52
end subroutine
hecmw_precond_ml_nn_setup
53
54
subroutine
hecmw_precond_ml_nn_apply
(WW)
55
implicit none
56
real
(kind=
kreal
),
intent(inout)
:: ww(:)
57
integer(kind=kint)
:: ierr
58
call
hecmw_ml_wrapper_apply(id, ww, ierr)
59
end subroutine
hecmw_precond_ml_nn_apply
60
61
subroutine
hecmw_precond_ml_nn_clear
()
62
use
hecmw_mat_id
63
implicit none
64
integer(kind=kint)
:: ierr
65
call
hecmw_ml_wrapper_clear(id, ierr)
66
call
hecmw_mat_id_clear
(id)
67
initialized = .false.
68
end subroutine
hecmw_precond_ml_nn_clear
69
70
end module
hecmw_precond_ml_nn
hecmw_mat_id::hecmw_mat_id_set
subroutine, public hecmw_mat_id_set(hecMAT, hecMESH, id)
Definition:
hecmw_mat_id.f90:28
hecmw_precond_ml_nn::hecmw_precond_ml_nn_clear
subroutine, public hecmw_precond_ml_nn_clear()
Definition:
hecmw_precond_ML_nn.f90:62
hecmw_util
I/O and Utility.
Definition:
hecmw_util_f.F90:7
hecmw_util::hecmwst_local_mesh
Definition:
hecmw_util_f.F90:234
hecmw_util::kreal
integer(kind=4), parameter kreal
Definition:
hecmw_util_f.F90:16
hecmw_mat_id
Definition:
hecmw_mat_id.f90:6
hecmw_precond_ml_nn
Definition:
hecmw_precond_ML_nn.f90:11
hecmw_precond_ml_nn::hecmw_precond_ml_nn_apply
subroutine, public hecmw_precond_ml_nn_apply(WW)
Definition:
hecmw_precond_ML_nn.f90:55
hecmw_matrix_misc
Definition:
hecmw_matrix_misc.f90:6
hecmw_mat_id::hecmw_mat_id_clear
subroutine, public hecmw_mat_id_clear(id)
Definition:
hecmw_mat_id.f90:64
hecmw_precond_ml_nn::hecmw_precond_ml_nn_setup
subroutine, public hecmw_precond_ml_nn_setup(hecMAT, hecMESH, sym)
Definition:
hecmw_precond_ML_nn.f90:27
hecmw_util::hecmwst_matrix
Definition:
hecmw_util_f.F90:444
hecmw1
src
solver
precond
ml
hecmw_precond_ML_nn.f90
Generated by
1.8.17