9 #include "sll_errors.h"
31 real(
wp),
allocatable :: array(:, :)
56 character(len=*),
parameter ::
wrong_type_x =
"x not of type 'sll_t_vector_space_real_array_2d'"
57 character(len=*),
parameter ::
wrong_type_y =
"y not of type 'sll_t_vector_space_real_array_2d'"
67 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_2d % copy"
74 self%array(:, :) = x%array
89 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_2d % incr"
95 self%array(:, :) = self%array(:, :) + x%array(:, :)
108 real(wp),
intent(in) :: a
110 self%array(:, :) = self%array(:, :)*a
120 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_2d % add"
130 self%array(:, :) = x%array(:, :) + y%array(:, :)
149 real(wp),
intent(in) :: a
152 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_2d % mult"
158 self%array(:, :) = a*x%array(:, :)
171 real(wp),
intent(in) :: a
175 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_2d % mult_add"
185 self%array(:, :) = a*x%array(:, :) + y%array(:, :)
204 real(wp),
intent(in) :: a
207 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_2d % incr_mult"
213 self%array(:, :) = self%array(:, :) + a*x%array(:, :)
226 real(wp),
intent(in) :: a(:)
229 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_2d % lcmb"
238 self%array(:, :) = a(1)*x(1)%array(:, :)
240 self%array(:, :) = self%array(:, :) + a(i)*x(i)%array(:, :)
254 real(wp),
intent(in) :: a(:)
257 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_2d % incr_lcmb"
267 self%array(:, :) = self%array(:, :) + a(i)*x(i)%array(:, :)
283 res = norm2(self%array)
293 character(len=*),
parameter :: this_fun_name =
"sll_t_vector_space_real_array_2d % inner"
299 res = sum(self%array*x%array)
Abstract type implementing a generic vector space.
Vector space for wrapping 2D Fortran real arrays.
real(wp) function inner__real(self, x)
character(len= *), parameter wrong_type_y
subroutine copy__real(self, x)
integer, parameter wp
Working precision.
subroutine lcmb__real(self, a, x)
subroutine incr_lcmb__real(self, a, x)
subroutine mult__real(self, a, x)
subroutine incr_mult__real(self, a, x)
subroutine add__real(self, x, y)
subroutine incr__real(self, x)
subroutine scal__real(self, a)
subroutine mult_add__real(self, a, x, y)
character(len= *), parameter wrong_type_x
real(wp) function norm__real(self)
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 2D Fortran real arrays.