Public Types | Public Member Functions | Public Attributes | Friends

Fiber::FieldSelector Class Reference

An internal class that stores a couple of textual names. More...

#include <FieldSelector.hpp>

List of all members.

Public Types

Public Member Functions

Public Attributes

Friends


Detailed Description

An internal class that stores a couple of textual names.

It is to be used for selecting a field out of a selection of fields.

Examples:

ColoredLines.cpp, PolychromeSurface.cpp, Sphere.cpp, and TransparentColoredSurface.cpp.


Constructor & Destructor Documentation

Fiber::FieldSelector::FieldSelector ( const FieldSelector FS  ) 

Construct from an existing FieldSelector.

Note that the FieldSelection will be empty, not copied from the existing FieldSelector!

Fiber::FieldSelector::FieldSelector ( double &  time,
const BundlePtr BP,
const string &  gridName,
const string &  fieldName 
)

Construct a FieldSelector from the field found on the most recent Grid of the given bundle.

The respective time will be provided in the time argument.


Member Function Documentation

template<class T >
void Fiber::FieldSelector::accept (  )  [inline]
RefPtr< Field > Fiber::FieldSelector::getField ( const string &  theName  )  const

Return a field of the given name in the Cartesian representation of the Vertices on the toplevel refinement level.

This general function is useful to retrieve a field on the current grid which is not identical with the selected one.

Referenced by Wizt::Fish< Fiber::Field >::getField(), and VectorArrows::update().

const RefPtr<Fiber::Grid>& Fiber::FieldSelector::getGrid (  )  const [inline]

The Grid object that was found to carry the selected field.

Note that there is no requirement to query fields from just that grid where the field was found. It can as well be queried on another Grid as well, just then it's not ensured that such a field would exist there.

Referenced by Vector4ToVector3AndScalar::update().

const RefPtr<Fiber::Grid>& Fiber::FieldSelector::GridSource (  )  const [inline]

The Grid object that was found to carry the selected field.

Note that there is no requirement to query fields from just that grid where the field was found. It can as well be queried on another Grid as well, just then it's not ensured that such a field would exist there.

Referenced by VectorArrows::update().

bool Fiber::FieldSelector::requires ( const type_info &  what  )  const [inline]

Check if this field selector requires the field to be of the specified type.

Note that if no field selection has been specified, then all types will be "required" and this function returns true.

void Fiber::FieldSelector::selectField ( const BundlePtr BP,
const double  time,
const string &  gridName,
const string &  fieldName,
const RefPtr< Grid > &  G,
const RefPtr< Slice > &  S 
) [inline]

Select a field with full context information.

Only property that is left to set is the accepted types, to be set with accept().

void Fiber::FieldSelector::selectField ( const string &  fieldname,
const TypeList_t FT = TypeList_t() 
)

Select a singular field.

Removes all others field, only one will remain here. More control and adding multiple fields requires using the SelectedFields() member function.

Examples:
Sphere.cpp.

Referenced by LinearRescale::FieldOperation(), and Wizt::FieldFunctor< Operation >::FieldOperation().


Member Data Documentation

Meta-Information - from where did we get the selected field? The base class, GridSelector, specifies information on how to find a certain Grid.

The FieldSource now actually provides the result of such a search process, and tells concretely which Grid has been found using the parameters of the base class, the Grid Selector.

Referenced by Wizt::FieldObject::update().