15 #include "sll_working_precision.h"
27 sll_int32 :: n_rows = 0
28 sll_int32 :: n_cols = 0
29 sll_int32 :: n_global_rows = 0
30 sll_int32 :: n_global_cols = 0
31 sll_int32 :: n_block_rows = 1
32 sll_int32 :: n_block_cols = 1
33 sll_int32 :: n_dof = 1
34 logical :: is_allocated = .false.
36 sll_int32,
dimension(:),
allocatable :: id_rows
37 sll_int32,
dimension(:),
allocatable :: id_cols
58 sll_real64,
dimension(:),
intent(in ) :: x
59 sll_real64,
dimension(:),
intent( out) :: y
100 & n_global_rows, n_global_cols, &
101 & n_block_rows, n_block_cols, &
106 sll_int32,
optional,
intent(in) :: n_rows
107 sll_int32,
optional,
intent(in) :: n_cols
108 sll_int32,
optional,
intent(in) :: n_global_rows
109 sll_int32,
optional,
intent(in) :: n_global_cols
110 sll_int32,
optional,
intent(in) :: n_block_rows
111 sll_int32,
optional,
intent(in) :: n_block_cols
112 sll_int32,
dimension(:),
optional,
intent(in) :: id_rows
113 sll_int32,
dimension(:),
optional,
intent(in) :: id_cols
116 if (
present(other))
then
117 self % n_rows = other % n_rows
118 self % n_cols = other % n_cols
120 self % n_global_rows = other % n_global_rows
121 self % n_global_cols = other % n_global_cols
123 self % n_block_rows = other % n_block_rows
124 self % n_block_cols = other % n_block_cols
128 if (
present(n_rows))
then
129 self % n_rows = n_rows
132 if (
present(n_global_rows))
then
133 self % n_global_rows = n_global_rows
136 if ((
present(n_rows)) .and. (.not. (
present(n_global_rows))))
then
137 self % n_global_rows = n_rows
140 if ((
present(n_global_rows)) .and. (.not. (
present(n_rows))))
then
141 self % n_rows = n_global_rows
146 if (
present(n_cols))
then
147 self % n_cols = n_cols
150 if (
present(n_global_cols))
then
151 self % n_global_cols = n_global_cols
154 if ((
present(n_cols)) .and. (.not. (
present(n_global_cols))))
then
155 self % n_global_cols = n_cols
158 if ((
present(n_global_cols)) .and. (.not. (
present(n_cols))))
then
159 self % n_cols = n_global_cols
164 if ((
present(n_block_rows)))
then
165 self % n_block_rows = n_block_rows
170 if ((
present(n_block_cols)))
then
171 self % n_block_cols = n_block_cols
177 if (
present(id_rows).and.
present(id_cols))
then
178 self % n_rows =
size(id_rows)
179 self % n_cols =
size(id_cols)
180 allocate( self % id_rows(self % n_rows))
181 allocate( self % id_cols(self % n_cols))
183 self % id_rows = id_rows
184 self % id_cols = id_cols
188 self % n_dof = self % n_block_rows * self % n_block_cols
202 print *,
"* n_bloc_rows : ", self % n_block_rows
203 print *,
"* n_bloc_cols : ", self % n_block_cols
204 print *,
"* n_rows : ", self % n_rows
205 print *,
"* n_cols : ", self % n_cols
206 print *,
"* n_global_rows : ", self % n_global_rows
207 print *,
"* n_global_cols : ", self % n_global_cols
208 print *,
"* n_dof : ", self % n_dof
module for abstract linear operator
subroutine initialize_linear_operator_abstract(self, other, n_rows, n_cols, n_global_rows, n_global_cols, n_block_rows, n_block_cols, id_rows, id_cols)
initialize linear solver from a linear operator or given attributs
subroutine print_info_linear_operator_abstract(self)
prints a linear operator
Module to select the kind parameter.
class for abstract linear operator