|
Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
Helper class for evaluating Fields given in one Grid on another Grid, used by EvalGrid(). More...
#include <GridEvaluator.hpp>
Classes | |
| struct | Context |
Public Types | |
| enum | FragmentSearchResult { Nope , Possibly , Certainly , YesWithLocationAlreadyFound } |
| Status of first-pass point search in multiblock source Grids. More... | |
Public Member Functions | |
| bool | find (const RefPtr< MemBase > &DestinationCoords, const Field &SourcePositions, GridEvaluator::Context &theEvaluationContext) |
| Given a set of destination coordinates, find the evaluation weights from the given source positions. | |
| GridEvaluator (const RefPtr< MemBase > &DestinationCoords, const Field &SourcePositions, GridEvaluator::Context &theEvaluationContext) | |
| template<class PositionsFieldType> | |
| void | findForSpecificDestinationPositions (const PositionsFieldType &DestinationPositions, const Field &SourcePositions, GridEvaluator::Context &theEvaluationContext) |
| Given a specific type for the positions in the destination coordinates, find the evaluation weights for each point. | |
| template<int SourceDims, class ValueType> | |
| bool | evalFloatIndices (std::vector< ValueType > &ResultData, const CreativeIterator< FixedArray< double, SourceDims > > &InterpolationWeightsPerDestPoint, const Field &SourceField) const |
| The type must match as stored in the SourceField. | |
| template<class ValueType> | |
| bool | evalType (std::vector< ValueType > &ResultData, const Field &SourceField) const |
| Evaluate a source field on a pre-allocated std::vector<> of destination types. | |
| template<int DestDims, class ValueType> | |
| RefPtr< MemBase > | evalDimensionalDestType (const MultiIndex< DestDims > &DestSize, const Field &SourceField) const |
| Allocate a data field for the destination based on the given dimensions and evaluate the given Field on it using evalType(). | |
| template<class ValueType> | |
| RefPtr< MemBase > | evalFromCompatibleData (const RefPtr< MemBase > &DestinationCompatibleData, const Field &SourceField) const |
| RefPtr< MemBase > | evalKnownDataTypes (const RefPtr< MemBase > &DestinationCompatibleData, const Field &SourceField) const |
Public Attributes | |
| RefPtr< MemBase > | FragmentIDs |
| Fragment ID's per evaluation point. | |
| RefPtr< MemBase > | SearchStatus |
| An integer field of search result enums (FragmentSearchResult). | |
| RefPtr< MemBase > | PointLocation |
| Will be of type: FixedArray<double, int CoordinateDims>. | |
Helper class for evaluating Fields given in one Grid on another Grid, used by EvalGrid().
The GridEvaluator class stores information about referencing the points of a Grid, such as the interpolation weights of such points and their fragment ID's after lookup in a fragmented (i.e. multiblock) source Grid. When evaluating multiple fields this information needs to be determined only once and can then be re-used for all Fields.
Status of first-pass point search in multiblock source Grids.
Will be stored as integer field in the SearchStatus.
| bool Fiber::GridEvaluator::evalFloatIndices | ( | std::vector< ValueType > & | ResultData, |
| const CreativeIterator< FixedArray< double, SourceDims > > & | InterpolationWeightsPerDestPoint, | ||
| const Field & | SourceField ) const |
The type must match as stored in the SourceField.
if (RefPtr<MemArray<3, int> > SearchResult = SearchStatus)
References Fiber::HyperslabParameters::count(), FragmentIDs, Fiber::Field::getData(), Fiber::FragmentIDContainer::getFirst(), Fiber::FragmentIDContainer::nFragments(), and SearchStatus.
Referenced by evalType().
| bool Fiber::GridEvaluator::evalType | ( | std::vector< ValueType > & | ResultData, |
| const Field & | SourceField ) const |
Evaluate a source field on a pre-allocated std::vector<> of destination types.
Interpolate a field of the given type in 2 or 3 dimensions.
References evalFloatIndices(), and PointLocation.
Referenced by evalDimensionalDestType().
| bool Fiber::GridEvaluator::find | ( | const RefPtr< MemBase > & | DestinationCoords, |
| const Field & | SourcePositions, | ||
| GridEvaluator::Context & | theEvaluationContext ) |
Given a set of destination coordinates, find the evaluation weights from the given source positions.
This call will iterate over a set of known possible types of destination coordinates using the findForSpecificDestinationPositions() function. If a specific such destination coordinate type is not supported, then use findForSpecificDestinationPositions() explicitly.
Evaluate data on a 2D destination grid of curvilinear coordinates.
unspecific coordinate type, 3D
unspecific coordinate type, 2D
References findForSpecificDestinationPositions().
| void Fiber::GridEvaluator::findForSpecificDestinationPositions | ( | const PositionsFieldType & | DestinationPositions, |
| const Field & | SourcePositions, | ||
| GridEvaluator::Context & | theEvaluationContext ) |
Given a specific type for the positions in the destination coordinates, find the evaluation weights for each point.
The PositionsFieldType must export an enum Dims and a type value_type that has an enum member SIZE, which gives the number of components used for the interpolation.
References apply(), Fiber::FragmentSearch< PointType >::Contains(), Fiber::FragmentSearchBase::FoundFragID, FragmentIDs, Fiber::MultiIndex< Dims >::inc(), PointLocation, SearchStatus, and Fiber::MultiIndex< Dims >::size().
Referenced by find().
Fragment ID's per evaluation point.
This will be a FragmentIDContainer for each point on a first pass when searching through a multiblock grid with bounding box search. A second pass will be required to reduce this field into an exact match with only exactly one FragmentID per point.
Referenced by Fiber::EvalFragment::apply(), evalFloatIndices(), and findForSpecificDestinationPositions().