ops.H File Reference

Various functors for unary and binary operations. Can be used for parallel combine-reduce operations or other places requiring a functor. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  eqOp2< T1, T2 >
 
struct  eqOp< T >
 
struct  plusEqOp2< T1, T2 >
 
struct  plusEqOp< T >
 
struct  minusEqOp2< T1, T2 >
 
struct  minusEqOp< T >
 
struct  multiplyEqOp2< T1, T2 >
 
struct  multiplyEqOp< T >
 
struct  divideEqOp2< T1, T2 >
 
struct  divideEqOp< T >
 
struct  eqSqrOp2< T1, T2 >
 
struct  eqSqrOp< T >
 
struct  eqMagOp2< T1, T2 >
 
struct  eqMagOp< T >
 
struct  eqMagSqrOp2< T1, T2 >
 
struct  eqMagSqrOp< T >
 
struct  plusEqMagSqrOp2< T1, T2 >
 
struct  plusEqMagSqrOp< T >
 
struct  maxEqOp2< T1, T2 >
 
struct  maxEqOp< T >
 
struct  minEqOp2< T1, T2 >
 
struct  minEqOp< T >
 
struct  minMagSqrEqOp2< T1, T2 >
 
struct  minMagSqrEqOp< T >
 
struct  maxMagSqrEqOp2< T1, T2 >
 
struct  maxMagSqrEqOp< T >
 
struct  andEqOp2< T1, T2 >
 
struct  andEqOp< T >
 
struct  orEqOp2< T1, T2 >
 
struct  orEqOp< T >
 
struct  xorEqOp2< T1, T2 >
 
struct  xorEqOp< T >
 
struct  bitAndEqOp2< T1, T2 >
 
struct  bitAndEqOp< T >
 
struct  bitOrEqOp2< T1, T2 >
 
struct  bitOrEqOp< T >
 
struct  bitXorEqOp2< T1, T2 >
 
struct  bitXorEqOp< T >
 
struct  eqMinusOp2< T1, T2 >
 
struct  eqMinusOp< T >
 
struct  nopEqOp2< T1, T2 >
 
struct  nopEqOp< T >
 
struct  sumOp3< T, T1, T2 >
 
struct  sumOp2< T1, T2 >
 
struct  sumOp< T >
 
struct  plusOp3< T, T1, T2 >
 
struct  plusOp2< T1, T2 >
 
struct  plusOp< T >
 
struct  minusOp3< T, T1, T2 >
 
struct  minusOp2< T1, T2 >
 
struct  minusOp< T >
 
struct  multiplyOp3< T, T1, T2 >
 
struct  multiplyOp2< T1, T2 >
 
struct  multiplyOp< T >
 
struct  divideOp3< T, T1, T2 >
 
struct  divideOp2< T1, T2 >
 
struct  divideOp< T >
 
struct  cmptMultiplyOp3< T, T1, T2 >
 
struct  cmptMultiplyOp2< T1, T2 >
 
struct  cmptMultiplyOp< T >
 
struct  cmptPowOp3< T, T1, T2 >
 
struct  cmptPowOp2< T1, T2 >
 
struct  cmptPowOp< T >
 
struct  cmptDivideOp3< T, T1, T2 >
 
struct  cmptDivideOp2< T1, T2 >
 
struct  cmptDivideOp< T >
 
struct  stabiliseOp3< T, T1, T2 >
 
struct  stabiliseOp2< T1, T2 >
 
struct  stabiliseOp< T >
 
struct  maxOp3< T, T1, T2 >
 
struct  maxOp2< T1, T2 >
 
struct  maxOp< T >
 
struct  minOp3< T, T1, T2 >
 
struct  minOp2< T1, T2 >
 
struct  minOp< T >
 
struct  minMagSqrOp3< T, T1, T2 >
 
struct  minMagSqrOp2< T1, T2 >
 
struct  minMagSqrOp< T >
 
struct  maxMagSqrOp3< T, T1, T2 >
 
struct  maxMagSqrOp2< T1, T2 >
 
struct  maxMagSqrOp< T >
 
struct  minModOp3< T, T1, T2 >
 
struct  minModOp2< T1, T2 >
 
struct  minModOp< T >
 
struct  bitAndOp3< T, T1, T2 >
 
struct  bitAndOp2< T1, T2 >
 
struct  bitAndOp< T >
 
struct  bitOrOp3< T, T1, T2 >
 
struct  bitOrOp2< T1, T2 >
 
struct  bitOrOp< T >
 
struct  bitXorOp3< T, T1, T2 >
 
struct  bitXorOp2< T1, T2 >
 
struct  bitXorOp< T >
 
struct  andOp2< T1, T2 >
 
struct  andOp< T >
 
struct  orOp2< T1, T2 >
 
struct  orOp< T >
 
struct  xorOp2< T1, T2 >
 
struct  xorOp< T >
 
struct  equalOp2< T1, T2 >
 
struct  equalOp< T >
 
struct  notEqualOp2< T1, T2 >
 
struct  notEqualOp< T >
 
struct  lessOp2< T1, T2 >
 
struct  lessOp< T >
 
struct  lessEqOp2< T1, T2 >
 
struct  lessEqOp< T >
 
struct  greaterOp2< T1, T2 >
 
struct  greaterOp< T >
 
struct  greaterEqOp2< T1, T2 >
 
struct  greaterEqOp< T >
 
struct  equalOp1< T >
 
struct  notEqualOp1< T >
 
struct  lessOp1< T >
 
struct  lessEqOp1< T >
 
struct  greaterOp1< T >
 
struct  greaterEqOp1< T >
 
class  multiplyWeightedOp< T, CombineOp >
 
struct  compareOp< T >
 Three-way comparison operation of two parameters,. More...
 
struct  getNameOp< T >
 Deprecated(2020-11) use nameOp (word.H) More...
 
struct  getTypeOp< T >
 Deprecated(2020-11) use typeOp (word.H) More...
 

Namespaces

 Foam
 Namespace for OpenFOAM.
 

Macros

#define EqOp(opName, op)
 
#define WARNRETURN
 
#define Op(opName, op)
 
#define BoolOp(opName, op)
 
#define Bool1Op(opName, op)
 
#define WeightedOp(opName, op)
 

Detailed Description

Various functors for unary and binary operations. Can be used for parallel combine-reduce operations or other places requiring a functor.

Original source file ops.H

InNamespace Foam

Definition in file ops.H.

Macro Definition Documentation

◆ EqOp

#define EqOp (   opName,
  op 
)
Value:
\
template<class T1, class T2> \
struct opName##Op2 \
{ \
void operator()(T1& x, const T2& y) const \
{ \
op; \
} \
}; \
\
template<class T> \
struct opName##Op \
{ \
void operator()(T& x, const T& y) const \
{ \
op; \
} \
};

Definition at line 50 of file ops.H.

◆ WARNRETURN

#define WARNRETURN

Definition at line 105 of file ops.H.

◆ Op

#define Op (   opName,
  op 
)
Value:
\
template<class T, class T1, class T2> \
struct opName##Op3 \
{ \
T operator()(const T1& x, const T2& y) const WARNRETURN \
{ \
return op; \
} \
}; \
\
template<class T1, class T2> \
struct opName##Op2 \
{ \
T1 operator()(const T1& x, const T2& y) const WARNRETURN \
{ \
return op; \
} \
}; \
\
template<class T> \
struct opName##Op \
{ \
T operator()(const T& x, const T& y) const WARNRETURN \
{ \
return op; \
} \
};

Definition at line 112 of file ops.H.

◆ BoolOp

#define BoolOp (   opName,
  op 
)
Value:
\
template<class T1, class T2> \
struct opName##Op2 \
{ \
bool operator()(const T1& x, const T2& y) const WARNRETURN \
{ \
return op; \
} \
}; \
\
template<class T> \
struct opName##Op \
{ \
bool operator()(const T& x, const T& y) const WARNRETURN \
{ \
return op; \
} \
};

Definition at line 144 of file ops.H.

◆ Bool1Op

#define Bool1Op (   opName,
  op 
)
Value:
\
template<class T> \
struct opName##Op1 \
{ \
const T& value; \
\
opName##Op1(const T& v) : value(v) {} \
\
bool operator()(const T& x) const WARNRETURN \
{ \
return op; \
} \
};

Definition at line 168 of file ops.H.

◆ WeightedOp

#define WeightedOp (   opName,
  op 
)
Value:
\
template<class T, class CombineOp> \
class opName##WeightedOp \
{ \
const CombineOp& cop_; \
\
public: \
\
opName##WeightedOp(const CombineOp& cop) \
: \
cop_(cop) \
{} \
\
void operator() \
( \
T& x, \
const label index, \
const T& y, \
const scalar weight \
) const \
{ \
cop_(x, op); \
} \
}; \

Definition at line 186 of file ops.H.

WeightedOp
#define WeightedOp(opName, op)
Definition: ops.H:186
WARNRETURN
#define WARNRETURN
Definition: ops.H:105
T
const volScalarField & T
Definition: createFieldRefs.H:2
x
x
Definition: LISASMDCalcMethod2.H:52
Op
#define Op(opName, op)
Definition: ops.H:112
y
scalar y
Definition: LISASMDCalcMethod1.H:14