Loading...
Searching...
No Matches
GenericExpression.H File Reference
Include dependency graph for GenericExpression.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GenericExpression< E >
class  g_negate< E1 >
class  g_sqr< E1 >
class  g_sqrt< E1 >
class  g_magSqr< E1 >
class  g_symm< E1 >
class  g_pow2< E1 >
class  g_pow3< E1 >
class  g_pow4< E1 >
class  g_compl< E1 >
class  g_add< E1, E2 >
class  g_subtract< E1, E2 >
class  g_multiply< E1, E2 >
class  g_divide< E1, E2 >
class  g_or< E1, E2 >
class  g_and< E1, E2 >
class  g_bitand< E1, E2 >
class  g_bitor< E1, E2 >
class  g_xor< E1, E2 >

Namespaces

namespace  Foam::Expression
 A namespace for expression templates.
namespace  Foam
 Namespace for OpenFOAM.

Macros

#define EXPRESSION_FUNCTION1(BaseClass, Func, BaseFunc, OpFunc)
#define EXPRESSION_FUNCTION2(BaseClass, Func, BaseFunc, OpFunc)
#define EXPRESSION_OPERATOR(BaseClass, Op, BaseOp, OpFunc)

Functions

template<typename E1>
g_negate< E1 > operator- (const GenericExpression< E1 > &u)
template<typename E1>
g_sqr< E1 > sqr (const GenericExpression< E1 > &u)
template<typename E1>
g_sqrt< E1 > sqrt (const GenericExpression< E1 > &u)
template<typename E1>
g_magSqr< E1 > magSqr (const GenericExpression< E1 > &u)
template<typename E1>
g_symm< E1 > symm (const GenericExpression< E1 > &u)
template<typename E1>
g_pow2< E1 > pow2 (const GenericExpression< E1 > &u)
template<typename E1>
g_pow3< E1 > pow3 (const GenericExpression< E1 > &u)
template<typename E1>
g_pow4< E1 > pow4 (const GenericExpression< E1 > &u)
template<typename E1>
g_compl< E1 > operator~ (const GenericExpression< E1 > &u)
template<typename E1, typename E2>
g_add< E1, E2 > operator+ (const GenericExpression< E1 > &u, const GenericExpression< E2 > &v)
template<typename E1, typename E2>
g_subtract< E1, E2 > operator- (const GenericExpression< E1 > &u, const GenericExpression< E2 > &v)
template<typename E1, typename E2>
g_multiply< E1, E2 > operator* (const GenericExpression< E1 > &u, const GenericExpression< E2 > &v)
template<typename E1, typename E2>
g_divide< E1, E2 > operator/ (const GenericExpression< E1 > &u, const GenericExpression< E2 > &v)
template<typename E1, typename E2>
g_or< E1, E2 > operator|| (GenericExpression< E1 > const &u, GenericExpression< E2 > const &v)
template<typename E1, typename E2>
g_and< E1, E2 > operator&& (GenericExpression< E1 > const &u, GenericExpression< E2 > const &v)
template<typename E1, typename E2>
g_bitand< E1, E2 > operator& (GenericExpression< E1 > const &u, GenericExpression< E2 > const &v)
template<typename E1, typename E2>
g_bitor< E1, E2 > operator| (GenericExpression< E1 > const &u, GenericExpression< E2 > const &v)
template<typename E1, typename E2>
g_xor< E1, E2 > operator^ (GenericExpression< E1 > const &u, GenericExpression< E2 > const &v)

Detailed Description

Original source file GenericExpression.H

Definition in file GenericExpression.H.

Macro Definition Documentation

◆ EXPRESSION_FUNCTION1

#define EXPRESSION_FUNCTION1 ( BaseClass,
Func,
BaseFunc,
OpFunc )
Value:
template<typename E1> \
class OpFunc \
: \
public BaseClass<OpFunc<E1>> \
{ \
typename std::conditional<E1::is_leaf, const E1&, const E1>::type u_; \
\
public: \
static constexpr bool is_leaf = false; \
\
OpFunc(const E1& u) \
: \
u_(u) \
{} \
\
auto evaluate() const \
{ \
return BaseFunc(u_.evaluate()); \
} \
}; \
template<typename E1> \
OpFunc<E1> Func \
( \
const BaseClass<E1>& u \
) \
{ \
return OpFunc<E1>(static_cast<const E1&>(u)); \
}

Definition at line 63 of file GenericExpression.H.

Referenced by g_compl< E1 >::evaluate(), g_magSqr< E1 >::evaluate(), g_pow2< E1 >::evaluate(), g_pow3< E1 >::evaluate(), g_pow4< E1 >::evaluate(), g_sqrt< E1 >::evaluate(), and g_symm< E1 >::evaluate().

◆ EXPRESSION_FUNCTION2

#define EXPRESSION_FUNCTION2 ( BaseClass,
Func,
BaseFunc,
OpFunc )

◆ EXPRESSION_OPERATOR