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_1d'"
57 character(len=*),
parameter ::
wrong_type_y =
"y not of type 'sll_t_vector_space_real_array_1d'"
67 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_1d % copy"
74 self%array(:) = x%array
89 character(len=*),
parameter :: this_sub_name =
"sll_t_vector_space_real_array_1d % 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_1d % 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_1d % 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_1d % 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_1d % 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_1d % 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_1d % 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_1d % inner"
299 res = dot_product(self%array, x%array)
Abstract type implementing a generic vector space.
Vector space for wrapping 1D Fortran real arrays.
subroutine incr_lcmb__real(self, a, x)
character(len= *), parameter wrong_type_y
subroutine lcmb__real(self, a, x)
subroutine mult_add__real(self, a, x, y)
integer, parameter wp
Working precision.
subroutine mult__real(self, a, x)
subroutine incr__real(self, x)
subroutine scal__real(self, a)
subroutine incr_mult__real(self, a, x)
subroutine copy__real(self, x)
real(wp) function norm__real(self)
subroutine add__real(self, x, y)
real(wp) function inner__real(self, x)
character(len= *), parameter wrong_type_x
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.