8 #include "sll_errors.h"
63 character(len=*),
parameter ::
wrong_type_x =
"x not of type 'sll_t_vector_space_c1_block'"
64 character(len=*),
parameter ::
wrong_type_y =
"y not of type 'sll_t_vector_space_c1_block'"
72 integer,
intent(in) :: n1
73 integer,
intent(in) :: n2
74 integer,
intent(in) :: p1
75 integer,
intent(in) :: p2
89 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_c1_block % copy"
95 call self%vd%copy(x%vd)
96 call self%vs%copy(x%vs)
110 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_c1_block % incr"
116 call self%vd%incr(x%vd)
117 call self%vs%incr(x%vs)
129 real(wp),
intent(in) :: a
142 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_c1_block % add"
152 call self%vd%add(x%vd, y%vd)
153 call self%vs%add(x%vs, y%vs)
172 real(wp),
intent(in) :: a
175 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_c1_block % mult"
181 call self%vd%mult(a, x%vd)
182 call self%vs%mult(a, x%vs)
195 real(wp),
intent(in) :: a
199 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_c1_block % mult_add"
209 call self%vd%mult_add(a, x%vd, y%vd)
210 call self%vs%mult_add(a, x%vs, y%vs)
229 real(wp),
intent(in) :: a
232 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_c1_block % incr_mult"
238 call self%vd%incr_mult(a, x%vd)
239 call self%vs%incr_mult(a, x%vs)
252 real(wp),
intent(in) :: a(:)
255 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_c1_block % lcmb"
261 call self%vd%lcmb(a, x%vd)
262 call self%vs%lcmb(a, x%vs)
275 real(wp),
intent(in) :: a(:)
278 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_c1_block % incr_lcmb"
284 call self%vd%incr_lcmb(a, x%vd)
285 call self%vs%incr_lcmb(a, x%vs)
300 res = sqrt(self%inner(self))
310 character(len=*),
parameter :: this_fun_name =
"sll_t_vector_space_c1_block % inner"
316 associate(n1 => self%n1, n2 => self%n2)
317 res = self%vd%inner(x%vd) + &
318 sum(self%vs%array(1:n1, 1:n2)*x%vs%array(1:n1, 1:n2))
Abstract type implementing a generic vector space.
Vector space for wrapping 2D Fortran real arrays.
subroutine s_vector_space_c1_block__mult(self, a, x)
subroutine s_vector_space_c1_block__init(self, n1, n2, p1, p2)
character(len= *), parameter wrong_type_y
subroutine s_vector_space_c1_block__incr(self, x)
subroutine s_vector_space_c1_block__mult_add(self, a, x, y)
subroutine s_vector_space_c1_block__add(self, x, y)
real(wp) function f_vector_space_c1_block__norm(self)
integer, parameter wp
Working precision.
subroutine s_vector_space_c1_block__incr_mult(self, a, x)
subroutine s_vector_space_c1_block__scal(self, a)
subroutine s_vector_space_c1_block__copy(self, x)
subroutine s_vector_space_c1_block__incr_lcmb(self, a, x)
subroutine s_vector_space_c1_block__lcmb(self, a, x)
character(len= *), parameter wrong_type_x
real(wp) function f_vector_space_c1_block__inner(self, x)
Vector space for wrapping 1D Fortran real arrays.
Vector space for wrapping 2D Fortran real arrays.
Module to select the kind parameter.
integer, parameter, public f64
f64 is the kind type for 64-bit reals (double precision)
Abstract base class for all vector spaces.
Vector space for wrapping 1D Fortran real arrays.
Vector space for wrapping 2D Fortran real arrays.