VectorSpaceOps< N, I > Class Template Reference

Recursive execution. Terminating at <N>, starting at index <I> More...

Static Public Member Functions

template<class Input , class Output >
static void copy_n (Input input, Output result)
 Somewhat equivalent to std::copy_n() but with templated loops. More...
 
template<class Output , class T >
static void fill_n (Output result, const T &val)
 Somewhat equivalent to std::fill_n() but with templated loops. More...
 
template<class V , class S , class EqOp >
static void eqOpS (V &vs, const S &s, EqOp eo)
 Apply the binary assignment operation to each vector-space component. More...
 
template<class S , class V , class EqOp >
static void SeqOp (S &s, const V &vs, EqOp eo)
 Apply the inplace binary reduction operation. More...
 
template<class V1 , class V2 , class EqOp >
static void eqOp (V1 &vs1, const V2 &vs2, EqOp eo)
 Apply the inplace binary assignment operation to the components. More...
 
template<class V , class V1 , class S , class BinaryOp >
static void opVS (V &vs, const V1 &vs1, const S &s, BinaryOp bop)
 Apply the binary operation between vector-space and scalar data and assign the result. More...
 
template<class V , class S , class V1 , class BinaryOp >
static void opSV (V &vs, const S &s, const V1 &vs1, BinaryOp bop)
 Apply the binary operation between scalar and vector-space data and assign the result. More...
 
template<class V , class V1 , class BinaryOp >
static void op (V &vs, const V1 &vs1, const V1 &vs2, BinaryOp bop)
 Apply the binary operation between two vector-space data and assign the result. More...
 

Detailed Description

template<direction N, direction I = 0>
class Foam::VectorSpaceOps< N, I >

Recursive execution. Terminating at <N>, starting at index <I>

Operator functions for VectorSpace.

Definition at line 42 of file VectorSpaceOps.H.

Member Function Documentation

◆ copy_n()

static void copy_n ( Input  input,
Output  result 
)
inlinestatic

Somewhat equivalent to std::copy_n() but with templated loops.

Parameters
[in]inputindexable input data
[out]resultindexable output data

Definition at line 51 of file VectorSpaceOps.H.

References Foam::I, and Foam::input().

Referenced by Foam::sumReduce().

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

◆ fill_n()

static void fill_n ( Output  result,
const T val 
)
inlinestatic

Somewhat equivalent to std::fill_n() but with templated loops.

Parameters
[out]resultindexable output data
valthe value to assign for each entry

Definition at line 67 of file VectorSpaceOps.H.

References Foam::I.

◆ eqOpS()

static void eqOpS ( V &  vs,
const S &  s,
EqOp  eo 
)
inlinestatic

Apply the binary assignment operation to each vector-space component.

Parameters
[in,out]vsvector-space (indexed) data
sscalar/component data (non-indexed)
eobinary combine/assign operation

Definition at line 85 of file VectorSpaceOps.H.

References Foam::I, and s.

◆ SeqOp()

static void SeqOp ( S &  s,
const V &  vs,
EqOp  eo 
)
inlinestatic

Apply the inplace binary reduction operation.

Parameters
[in,out]sscalar or component data (non-indexed)
[in]vsinput vector-space (indexed) data
eobinary combine/assign operation

Definition at line 102 of file VectorSpaceOps.H.

References Foam::I, and s.

Referenced by Foam::cmptMax(), Foam::cmptMin(), Foam::cmptProduct(), Foam::cmptSum(), and Foam::magSqr().

Here is the caller graph for this function:

◆ eqOp()

static void eqOp ( V1 &  vs1,
const V2 &  vs2,
EqOp  eo 
)
inlinestatic

Apply the inplace binary assignment operation to the components.

Parameters
[in,out]vs1vector-space (indexed) data
[in]vs2second vector-space (indexed) data
eobinary combine/assign operation

Definition at line 119 of file VectorSpaceOps.H.

References Foam::I.

Referenced by Foam::cmptMag(), Foam::cmptMagSqr(), Foam::cmptSqr(), and Foam::operator-().

Here is the caller graph for this function:

◆ opVS()

static void opVS ( V &  vs,
const V1 &  vs1,
const S &  s,
BinaryOp  bop 
)
inlinestatic

Apply the binary operation between vector-space and scalar data and assign the result.

Parameters
[out]vsvector-space (indexed) data
[in]vs1vector-space (indexed) data operand
[in]sscalar operand
bopbinary operation

Definition at line 138 of file VectorSpaceOps.H.

References Foam::I, and s.

Referenced by Foam::operator*(), Foam::operator/(), and Foam::stabilise().

Here is the caller graph for this function:

◆ opSV()

static void opSV ( V &  vs,
const S &  s,
const V1 &  vs1,
BinaryOp  bop 
)
inlinestatic

Apply the binary operation between scalar and vector-space data and assign the result.

Parameters
[out]vsvector-space (indexed) data
[in]sscalar operand
[in]vs1vector-space (indexed) data operand
bopbinary operation

Definition at line 157 of file VectorSpaceOps.H.

References Foam::I, and s.

Referenced by Foam::operator*().

Here is the caller graph for this function:

◆ op()

static void op ( V &  vs,
const V1 &  vs1,
const V1 &  vs2,
BinaryOp  bop 
)
inlinestatic

Apply the binary operation between two vector-space data and assign the result.

Parameters
[out]vsvector-space (indexed) data
[in]vs1vector-space (indexed) data operand
[in]vs2vector-space (indexed) data operand
bopbinary operation

Definition at line 176 of file VectorSpaceOps.H.

References Foam::I.

Referenced by Foam::cmptDivide(), Foam::cmptMultiply(), Foam::cmptPow(), Foam::max(), Foam::min(), Foam::minMod(), Foam::operator+(), and Foam::operator-().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: