Neko 1.99.6
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
vector_math Module Reference

Functions/Subroutines

subroutine, public vector_rzero (a, n)
 Zero a real vector.
 
subroutine, public vector_rone (a, n)
 Set all elements to one.
 
subroutine, public vector_copy (a, b, n)
 Copy a vector \( a = b \).
 
subroutine, public vector_cmult (a, c, n)
 Multiplication by constant c \( a = c \cdot a \).
 
subroutine, public vector_cadd (a, s, n)
 Add a scalar to vector \( a = \sum a_i + s \).
 
subroutine, public vector_cadd2 (a, b, s, n)
 Add a scalar to vector \( a_i = b_i + s \).
 
subroutine, public vector_cfill (a, c, n)
 Set all elements to a constant c \( a = c \).
 
subroutine, public vector_invcol1 (a, n)
 Invert a vector \( a = 1 / a \).
 
subroutine, public vector_invcol3 (a, b, c, n)
 Invert a vector \( a = b / c \).
 
subroutine, public vector_vdot3 (dot, u1, u2, u3, v1, v2, v3, n)
 Compute a dot product \( dot = u \cdot v \) (3-d version) assuming vector components \( u = (u_1, u_2, u_3) \) etc.
 
subroutine, public vector_add2 (a, b, n)
 Vector addition \( a = a + b \).
 
subroutine, public vector_add3 (a, b, c, n)
 Vector addition \( a = b + c \).
 
subroutine vector_add4 (a, b, c, d, n)
 Vector addition \( a = b + c + d \).
 
subroutine, public vector_sub2 (a, b, n)
 Vector substraction \( a = a - b \).
 
subroutine, public vector_sub3 (a, b, c, n)
 Vector subtraction \( a = b - c \).
 
subroutine, public vector_add2s1 (a, b, c1, n)
 Vector addition with scalar multiplication \( a = c_1 a + b \) (multiplication on first argument)
 
subroutine, public vector_add2s2 (a, b, c1, n)
 Vector addition with scalar multiplication \( a = a + c_1 b \) (multiplication on second argument)
 
subroutine, public vector_addsqr2s2 (a, b, c1, n)
 Returns \( a = a + c1 * (b * b )\).
 
subroutine, public vector_cmult2 (a, b, c, n)
 Multiplication by constant c \( a = c \cdot b \).
 
subroutine, public vector_invcol2 (a, b, n)
 Vector division \( a = a / b \).
 
subroutine, public vector_col2 (a, b, n)
 Vector multiplication \( a = a \cdot b \).
 
subroutine, public vector_col3 (a, b, c, n)
 Vector multiplication with 3 vectors \( a = b \cdot c \).
 
subroutine, public vector_subcol3 (a, b, c, n)
 Returns \( a = a - b*c \).
 
subroutine, public vector_add3s2 (a, b, c, c1, c2, n)
 Returns \( a = c1 * b + c2 * c \).
 
subroutine, public vector_addcol3 (a, b, c, n)
 Returns \( a = a + b*c \).
 
subroutine, public vector_addcol4 (a, b, c, d, n)
 Returns \( a = a + b*c*d \).
 
real(kind=rp) function, public vector_glsum (a, n)
 
real(kind=rp) function, public vector_glmax (a, n)
 Global maximum of all elements in a vector \( max = \max_i a_i \).
 
real(kind=rp) function, public vector_glmin (a, n)
 Global minimum of all elements in a vector \( min = \min_i a_i \).
 
real(kind=rp) function, public vector_glsc2 (a, b, n)
 
real(kind=rp) function, public vector_glsc3 (a, b, c, n)
 
subroutine, public vector_absval (a, n)
 Compute the pointwise absolute value of a vector \( a = |a| \).
 
real(kind=rp) function, public vector_glsubnorm (a, b, n)
 
subroutine, public vector_masked_gather_copy_0 (a, b, mask, n, n_mask)
 Gather a vector to reduced contigous array \( a = b(mask) \).
 
subroutine, public vector_face_masked_gather_copy_0 (a, b, mask, facet, lx, ly, lz, n_mask)
 Gather a face-local SEM field to a reduced contiguous vector.
 
subroutine, public vector_masked_gather_copy (a, b, mask, n)
 Gather a vector to reduced contigous array \( a = b(mask) \).
 
subroutine, public vector_masked_scatter_copy_0 (a, b, mask, n, n_mask)
 Scatter a contiguous vector into an array \( a(mask) = b \).
 
subroutine, public vector_masked_scatter_copy (a, b, mask, n)
 Scatter a contiguous vector into an array \( a(mask) = b \).
 
subroutine, public vector_cwrap (a, min_value, max_value, n)
 Wrap vector elements into the range [min_value, max_value)
 
subroutine, public vector_sqrt_inplace (a, n)
 Sqrt a vector \( a = sqrt(a) \).
 
subroutine, public vector_power (ap, a, p, n)
 Take the power of a vector \( a^p \).
 

Function/Subroutine Documentation

◆ vector_absval()

subroutine, public vector_math::vector_absval ( type(vector_t), intent(inout a,
integer, intent(in), optional  n 
)

Definition at line 771 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_add2()

subroutine, public vector_math::vector_add2 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
integer, intent(in), optional  n 
)

Definition at line 317 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_add2s1()

subroutine, public vector_math::vector_add2s1 ( type(vector_t), intent(inout a,
type(vector_t), intent(inout b,
real(kind=rp), intent(in c1,
integer, intent(in), optional  n 
)

Definition at line 425 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_add2s2()

subroutine, public vector_math::vector_add2s2 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
real(kind=rp), intent(in c1,
integer, intent(in), optional  n 
)

Definition at line 448 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_add3()

subroutine, public vector_math::vector_add3 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 338 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_add3s2()

subroutine, public vector_math::vector_add3s2 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
real(kind=rp), intent(in c1,
real(kind=rp), intent(in c2,
integer, intent(in), optional  n 
)

Definition at line 601 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_add4()

subroutine vector_math::vector_add4 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
type(vector_t), intent(in d,
integer, intent(in), optional  n 
)
private

Definition at line 359 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_addcol3()

subroutine, public vector_math::vector_addcol3 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 624 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_addcol4()

subroutine, public vector_math::vector_addcol4 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
type(vector_t), intent(in d,
integer, intent(in), optional  n 
)

Definition at line 646 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_addsqr2s2()

subroutine, public vector_math::vector_addsqr2s2 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
real(kind=rp), intent(in c1,
integer, intent(in), optional  n 
)

Definition at line 470 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_cadd()

subroutine, public vector_math::vector_cadd ( type(vector_t), intent(inout a,
real(kind=rp), intent(in s,
integer, intent(in), optional  n 
)

Definition at line 184 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_cadd2()

subroutine, public vector_math::vector_cadd2 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
real(kind=rp), intent(in s,
integer, intent(in), optional  n 
)

Definition at line 204 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_cfill()

subroutine, public vector_math::vector_cfill ( type(vector_t), intent(inout a,
real(kind=rp), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 226 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_cmult()

subroutine, public vector_math::vector_cmult ( type(vector_t), intent(inout a,
real(kind=rp), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 164 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_cmult2()

subroutine, public vector_math::vector_cmult2 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
real(kind=rp), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 492 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_col2()

subroutine, public vector_math::vector_col2 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
integer, intent(in), optional  n 
)

Definition at line 536 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_col3()

subroutine, public vector_math::vector_col3 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 557 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_copy()

subroutine, public vector_math::vector_copy ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
integer, intent(in), optional  n 
)

Definition at line 144 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_cwrap()

subroutine, public vector_math::vector_cwrap ( type(vector_t), intent(inout a,
real(kind=rp), intent(in min_value,
real(kind=rp), intent(in max_value,
integer, intent(in), optional  n 
)

Definition at line 947 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_face_masked_gather_copy_0()

subroutine, public vector_math::vector_face_masked_gather_copy_0 ( type(vector_t), intent(inout a,
real(kind=rp), dimension(:, :, :, :), intent(in b,
integer, dimension(0:n_mask), intent(in mask,
integer, dimension(0:n_mask), intent(in facet,
integer, intent(in lx,
integer, intent(in ly,
integer, intent(in lz,
integer, intent(in n_mask 
)
Parameters
aDestination vector of size n_mask.
bSource face-local array indexed as b(:, :, facet, element).
maskMask array of length n_mask + 1, where mask(0) = n_mask.
facetFacet ids associated with the masked points.
lxNumber of points in the first SEM direction.
lyNumber of points in the second SEM direction.
lzNumber of points in the third SEM direction.
n_maskSize of the mask array mask and vector a.

Definition at line 846 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_glmax()

real(kind=rp) function, public vector_math::vector_glmax ( type(vector_t), intent(in a,
integer, intent(in), optional  n 
)

Definition at line 689 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_glmin()

real(kind=rp) function, public vector_math::vector_glmin ( type(vector_t), intent(in a,
integer, intent(in), optional  n 
)

Definition at line 710 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_glsc2()

real(kind=rp) function, public vector_math::vector_glsc2 ( type(vector_t), intent(in a,
type(vector_t), intent(in b,
integer, intent(in), optional  n 
)

Definition at line 730 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_glsc3()

real(kind=rp) function, public vector_math::vector_glsc3 ( type(vector_t), intent(in a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 750 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_glsubnorm()

real(kind=rp) function, public vector_math::vector_glsubnorm ( type(vector_t), intent(in a,
type(vector_t), intent(in b,
integer, intent(in), optional  n 
)

Definition at line 790 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_glsum()

real(kind=rp) function, public vector_math::vector_glsum ( type(vector_t), intent(in a,
integer, intent(in), optional  n 
)

Definition at line 668 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_invcol1()

subroutine, public vector_math::vector_invcol1 ( type(vector_t), intent(inout a,
integer, intent(in), optional  n 
)

Definition at line 246 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_invcol2()

subroutine, public vector_math::vector_invcol2 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
integer, intent(in), optional  n 
)

Definition at line 514 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_invcol3()

subroutine, public vector_math::vector_invcol3 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 266 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_masked_gather_copy()

subroutine, public vector_math::vector_masked_gather_copy ( type(vector_t), intent(inout a,
real(kind=rp), dimension(:), intent(in b,
type(mask_t), intent(in mask,
integer, intent(in n 
)
Parameters
aDestination vector of size n_mask.
bSource array of size n.
maskmask_t containing mask array and device pointer if needed.
nSize of the vector b.

Definition at line 873 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_masked_gather_copy_0()

subroutine, public vector_math::vector_masked_gather_copy_0 ( type(vector_t), intent(inout a,
real(kind=rp), dimension(n), intent(in b,
integer, dimension(0:n_mask mask,
integer, intent(in n,
integer, intent(in n_mask 
)
Parameters
aDestination vector of size n_mask.
bSource array of size n.
maskMask array of length n_mask + 1, where mask(0) = n_mask the length of the mask array.
nSize of the vector b.
n_maskSize of the mask array mask and a.

Definition at line 818 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_masked_scatter_copy()

subroutine, public vector_math::vector_masked_scatter_copy ( real(kind=rp), dimension(:), intent(inout a,
type(vector_t), intent(in b,
type(mask_t), intent(in mask,
integer, intent(in n 
)
Parameters
aDestination array.
bSource vector of size n_mask.
maskmask_t containing mask array and device pointer if needed. @param n Size of the arraya`.

Definition at line 926 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_masked_scatter_copy_0()

subroutine, public vector_math::vector_masked_scatter_copy_0 ( real(kind=rp), dimension(n), intent(inout a,
type(vector_t), intent(in b,
integer, dimension(0:n_mask mask,
integer, intent(in n,
integer, intent(in n_mask 
)
Parameters
aDestination array.
bSource vector of size n_mask.
maskMask array of length n_mask + 1, where mask(0) = n_mask the length of the mask array.
nSize of the array a.
n_maskSize of the mask array mask and vector b.

Definition at line 901 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_power()

subroutine, public vector_math::vector_power ( type(vector_t), intent(inout ap,
type(vector_t), intent(in a,
real(kind=rp), intent(in p,
integer, intent(in), optional  n 
)

Definition at line 990 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_rone()

subroutine, public vector_math::vector_rone ( type(vector_t), intent(inout a,
integer, intent(in), optional  n 
)

Definition at line 125 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_rzero()

subroutine, public vector_math::vector_rzero ( type(vector_t), intent(inout a,
integer, intent(in), optional  n 
)

Definition at line 106 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_sqrt_inplace()

subroutine, public vector_math::vector_sqrt_inplace ( type(vector_t), intent(inout a,
integer, intent(in), optional  n 
)

Definition at line 970 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_sub2()

subroutine, public vector_math::vector_sub2 ( type(vector_t), intent(inout a,
type(vector_t), intent(inout b,
integer, intent(in), optional  n 
)

Definition at line 380 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_sub3()

subroutine, public vector_math::vector_sub3 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 401 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_subcol3()

subroutine, public vector_math::vector_subcol3 ( type(vector_t), intent(inout a,
type(vector_t), intent(in b,
type(vector_t), intent(in c,
integer, intent(in), optional  n 
)

Definition at line 579 of file vector_math.f90.

Here is the call graph for this function:

◆ vector_vdot3()

subroutine, public vector_math::vector_vdot3 ( type(vector_t), intent(inout dot,
type(vector_t), intent(in u1,
type(vector_t), intent(in u2,
type(vector_t), intent(in u3,
type(vector_t), intent(in v1,
type(vector_t), intent(in v2,
type(vector_t), intent(in v3,
integer, intent(in), optional  n 
)

Definition at line 289 of file vector_math.f90.

Here is the call graph for this function:
Here is the caller graph for this function: