Loading...
Searching...
No Matches
VectorSpaceOps< N, I > Class Template Reference

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

#include <VectorSpaceOps.H>

Inheritance diagram for VectorSpaceOps< N, I >:

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.
template<class Output, class T>
static void fill_n (Output result, const T &val)
 Somewhat equivalent to std::fill_n() but with templated loops.
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.
template<class S, class V, class EqOp>
static void SeqOp (S &s, const V &vs, EqOp eo)
 Apply the inplace binary reduction operation.
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.
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.
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.
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.

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()

template<direction N, direction I = 0>
template<class Input, class Output>
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 copy_n(), and Foam::I.

Referenced by copy_n(), VectorSpace< Form, Cmpt, Ncmpts >::operator=(), VectorSpace< Form, Cmpt, Ncmpts >::operator=(), Foam::sumReduce(), VectorSpace< Form, Cmpt, Ncmpts >::VectorSpace(), and VectorSpace< Form, Cmpt, Ncmpts >::VectorSpace().

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

◆ fill_n()

template<direction N, direction I = 0>
template<class Output, class T>
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 fill_n(), Foam::I, and Foam::T().

Referenced by VectorSpace< Form, Cmpt, Ncmpts >::fill(), fill_n(), VectorSpace< Form, Cmpt, Ncmpts >::operator=(), and VectorSpace< Form, Cmpt, Ncmpts >::VectorSpace().

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

◆ eqOpS()

template<direction N, direction I = 0>
template<class V, class S, class EqOp>
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 EqOp, eqOpS(), Foam::I, and s().

Referenced by eqOpS(), VectorSpace< Form, Cmpt, Ncmpts >::operator*=(), and VectorSpace< Form, Cmpt, Ncmpts >::operator/=().

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

◆ SeqOp()

template<direction N, direction I = 0>
template<class S, class V, class EqOp>
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 EqOp, Foam::I, s(), and SeqOp().

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

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

◆ eqOp()

template<direction N, direction I = 0>
template<class V1, class V2, class EqOp>
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 EqOp, eqOp(), and Foam::I.

Referenced by Foam::cmptMag(), Foam::cmptMagSqr(), Foam::cmptSqr(), eqOp(), VectorSpace< Form, Cmpt, Ncmpts >::operator+=(), Foam::operator-(), and VectorSpace< Form, Cmpt, Ncmpts >::operator-=().

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

◆ opVS()

template<direction N, direction I = 0>
template<class V, class V1, class S, class BinaryOp>
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, opVS(), and s().

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

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

◆ opSV()

template<direction N, direction I = 0>
template<class V, class S, class V1, class BinaryOp>
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, opSV(), and s().

Referenced by Foam::operator*(), and opSV().

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

◆ op()

template<direction N, direction I = 0>
template<class V, class V1, class BinaryOp>
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, and op().

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

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

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