FreePOOMA
2.4.1
|
EngineFunctor provides a common interface to a variety of engine queries, like "are you compressed" or "are you shifted with respect to another engine". More...
#include "PETE/PETE.h"
Classes | |
struct | EngineFunctorDefault< Eng, Tag > |
The most generic version of EngineFunctor falls through to EngineFunctorDefault. More... | |
struct | EngineFunctor< Eng, Tag > |
EngineFunctor<Eng,Tag> defines the action corresponding to Tag on the engine of type Eng. More... | |
struct | EngineFunctorScalar< T, Tag > |
Users must specialize this struct for all tags. More... | |
struct | LeafFunctor< Node, EngineView< Tag > > |
LeafFunctor specializations for EngineView. More... | |
struct | LeafFunctor< Scalar< T >, EngineView< Tag > > |
struct | LeafFunctor< Engine< Dim, T, E >, EngineView< Tag > > |
struct | ExpressionApply< Tag > |
The default version of ExpressionApply contains a reference to the tag class, which is typically empty. More... | |
struct | LeafFunctor< Node, ExpressionApply< Tag > > |
LeafFunctor specializations for ExpressionApply. More... | |
struct | LeafFunctor< Scalar< T >, ExpressionApply< Tag > > |
struct | LeafFunctor< Engine< Dim, T, E >, ExpressionApply< Tag > > |
Functions | |
template<class Eng , class Tag > | |
EngineFunctor< Eng, Tag >::Type_t | engineFunctor (const Eng &e, const Tag &tag) |
This helper function is shorthand for: | |
template<class A , class Tag > | |
void | expressionApply (const A &a, const Tag &tag) |
EngineFunctor provides a common interface to a variety of engine queries, like "are you compressed" or "are you shifted with respect to another engine".
By providing a common interface, we minimize the number of changes you need to make to add a new capability that makes non-standard queries of engines.
This approach replaces the previous message() function which made queries of engines. The current version doesn't require new member functions to be added to engines to support new capabilities. Also this approach allows for simple default cases, since you use partial specialization on EngineFunctor.
WARNING: If you use a default action, you should probably have some verification mechanism to ensure that the engine doesn't need to have a special action defined. For example, the DataObject default action checks the dataObject enum in the engine to make sure it doesn't have a data object.
Default actions for a given functor are specified using EngineFunctorDefault. We define EngineFunctor for Expression Engines and general tags, so you cannot specify the action of a specific functor for general engines. (The compiler would not be able to choose between EngineFunctor<ExpressionEngine,T> and EngineFunctor<T,YourFunctor>) The generic version of EngineFunctor<> calls DefaultEngineFunctor<>, so you may define EngineFunctorDefault for a general engine and tag.
EngineFunctor<Eng,Tag>::Type_t engineFunctor | ( | const Eng & | e, |
const Tag & | tag | ||
) | [inline] |
This helper function is shorthand for:
EngineFunctor<Engine, Tag>::apply(engine, tag)
References EngineFunctor< Eng, Tag >::apply().
Referenced by EngineFunctor< Engine< Dim, T, IndirectionTag< A1, A2 > >, DataObjectRequest< RequestType > >::apply(), EngineFunctor< Engine< Dim, T, IndirectionTag< A1, A2 > >, DataObjectRequest< WriteRequest > >::apply(), EngineFunctor< Engine< Dim, T, CompFwd< Eng, Components > >, EFTag >::apply(), EngineFunctor< Engine< Dim, T, IndirectionTag< A1, A2 > >, DataObjectRequest< WriteRelease > >::apply(), EngineFunctor< Engine< D, T, CompFwd< E, Comp > >, EnginePatch >::apply(), EngineFunctor< Engine< Dim, T, UserFunctionEngine< S, E > >, EFTag >::apply(), EngineFunctor< Engine< Dim, T, CompFwd< Eng, Components > >, CompressedRead >::apply(), EngineFunctor< Engine< Dim, T, CompFwd< Eng, Components > >, CompressedReadWrite >::apply(), EngineFunctor< Engine< Dim, T, CompFwd< Eng, Components > >, UnCompressedViewEngine >::apply(), EngineFunctor< Engine< Dim, T, FieldShift< Expression > >, DataObjectRequest< RequestType > >::apply(), EngineFunctor< Engine< Dim, T, ViewEngine< D2, ViewedTag > >, DataObjectRequest< RequestType > >::apply(), EngineFunctor< Engine< D, T, StencilEngine< S, E > >, DataObjectRequest< RequestType > >::apply(), EngineFunctor< Field< Mesh, T, EngineTag >, Tag >::apply(), EngineFunctor< Array< Dim, T, E >, Tag >::apply(), Engine< D, T, UserFunctionEngine< UserFunction, Expression > >::dataObjectRequest(), KernelEvaluator< CompressibleViewKernelTag >::evaluate(), KernelEvaluator< CompressibleKernelTag >::evaluate(), MultiArgEvaluator< RemoteSinglePatchEvaluatorTag >::evaluate(), ReductionEvaluator< CompressibleKernelTag >::evaluate(), Evaluator< RemoteSinglePatchEvaluatorTag >::evaluate(), Reduction< RemoteSinglePatchEvaluatorTag >::evaluate(), ExpressionKernel< LHS, Op, RHS, EvalTag >::ExpressionKernel(), FieldEngine< Mesh, T, EngineTag >::FieldEngine(), Patch< Array< Dim, T, EngineTag > >::make(), MultiArgKernel< MultiArg, Function >::MultiArgKernel(), Field< Mesh, T, EngineTag >::numPatchesLocal(), Array< 1, T >::numPatchesLocal(), ParticleKernel< Array, Function >::ParticleKernel(), ParticleKernel2< Array1, Array2, Function >::ParticleKernel2(), ParticleKernel2Block< Array1, Array2, Function >::ParticleKernel2Block(), ParticleKernel3< Array1, Array2, Array3, Function >::ParticleKernel3(), ParticleKernel3Block< Array1, Array2, Array3, Function >::ParticleKernel3Block(), ParticleKernelBlock< Array, Function >::ParticleKernelBlock(), PatchKernel< A1, Function >::PatchKernel(), PatchKernel2< A1, A2, Function >::PatchKernel2(), PatchKernel3< A1, A2, A3, Function >::PatchKernel3(), ReductionKernel< T, Op, Expr, KernelTag >::ReductionKernel(), ExpressionKernel< LHS, Op, RHS, EvalTag >::~ExpressionKernel(), ParticleKernel< Array, Function >::~ParticleKernel(), ParticleKernel2< Array1, Array2, Function >::~ParticleKernel2(), ParticleKernel2Block< Array1, Array2, Function >::~ParticleKernel2Block(), ParticleKernel3< Array1, Array2, Array3, Function >::~ParticleKernel3(), ParticleKernel3Block< Array1, Array2, Array3, Function >::~ParticleKernel3Block(), ParticleKernelBlock< Array, Function >::~ParticleKernelBlock(), PatchKernel< A1, Function >::~PatchKernel(), PatchKernel2< A1, A2, Function >::~PatchKernel2(), PatchKernel3< A1, A2, A3, Function >::~PatchKernel3(), and ReductionKernel< T, Op, Expr, KernelTag >::~ReductionKernel().
void expressionApply | ( | const A & | a, |
const Tag & | tag | ||
) | [inline] |
References forEach().
Referenced by LeafFunctor< Engine< Dim, T, FieldShift< Expression > >, ExpressionApply< IntersectorTag< Intersect > > >::apply(), LeafFunctor< Engine< D, T, StencilEngine< S, E > >, ExpressionApply< IntersectorTag< Intersect > > >::apply(), Evaluator< MultiPatchEvaluatorTag >::evaluate(), Reduction< MultiPatchEvaluatorTag >::evaluate(), PatchEvaluator< MultiPatchEvaluatorTag >::evaluate(), MultiArgEvaluator< RemoteSinglePatchEvaluatorTag >::evaluate(), Evaluator< RemoteSinglePatchEvaluatorTag >::evaluate(), Evaluator< RemoteMultiPatchEvaluatorTag >::evaluate(), Reduction< RemoteSinglePatchEvaluatorTag >::evaluate(), Reduction< RemoteMultiPatchEvaluatorTag >::evaluate(), PatchEvaluator< MultiPatchEvaluatorTag >::evaluate2(), PatchEvaluator< MultiPatchEvaluatorTag >::evaluate3(), SimpleIntersectorData< Dim >::intersect(), and SimpleIntersector< Dim >::operator()().