13 #include "sll_working_precision.h"
28 sll_int32 :: n_dim_nullspace = 1
30 sll_real64,
dimension(:,:),
allocatable :: vecs
52 & vecs, n_dim_nullspace)
56 sll_real64,
dimension(:,:) ,
optional,
intent(in) :: vecs
57 sll_int32 ,
optional,
intent(in) :: n_dim_nullspace
60 if (
present(linear_operator))
then
61 self % ptr_linear_operator => linear_operator
66 call self % initialize_abstract (other=linear_operator)
70 self % n_dim_nullspace = 1
71 if (
present(n_dim_nullspace))
then
72 self % n_dim_nullspace = n_dim_nullspace
77 allocate(self % vecs(self % n_dim_nullspace, self % n_global_cols))
82 if (
present(vecs))
then
85 if (self % n_dim_nullspace == 1)
then
88 stop
"create_linear_operator_penalized: wrong arguments for the vecs attribut"
106 deallocate(self % vecs)
121 sll_real64,
dimension(:),
intent(in ) :: x
122 sll_real64,
dimension(:),
intent( out) :: y
127 if (
associated(self % ptr_linear_operator) .eqv. .true.)
then
128 call self % ptr_linear_operator % dot(x, y)
130 stop
"dot_real_linear_operator_penalized: linear operator must be initialized"
135 do i = 1, self % n_dim_nullspace
136 y(:) = y(:) + dot_product(self % vecs(i, :), x(:)) / real(self % n_global_cols, f64)
152 print *,
">>>> linear_operator_penalized"
153 call self % print_info_abstract()
155 print *,
"* n_dim_nullspace : ", self % n_dim_nullspace
module for abstract linear operator
module for a penalized linear operator
subroutine free_linear_operator_penalized(self)
destroys the current object
subroutine dot_linear_operator_penalized(self, x, y)
apply the dot operation
subroutine create_linear_operator_penalized(self, linear_operator, vecs, n_dim_nullspace)
creates a linear operator_penalized
subroutine print_info_linear_operator_penalized(self)
prints a linear operator
class for abstract linear operator
class for a linear operator_penalized