FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Member Functions | Public Attributes | List of all members
Wizt::Fish< Fiber::Grid > Struct Reference

A fish scale for dealing with dependencies on grid objects. More...

#include <FishGrid.hpp>

Inheritance diagram for Wizt::Fish< Fiber::Grid >:
Wizt::GridOperatorObject< VObject > RandomPointDistribution Wizt::CorbenicField Wizt::FieldObject Wizt::GridOperatorObject< BaseClass > Wizt::OldLineSetOperator Wizt::SkeletonOperatorBase Wizt::VSkeletonRenderObject Wizt::VertexFieldCollection

Public Member Functions

 Fish (const string &s="grid", int prior=2)
 Constructor, optionally pass a parameter of this grid's name (ie.
 
virtual ~Fish ()
 Destructor.
 
void registerGridAsOutput ()
 Make grid visible as output.
 
Fiber::Bundle::GridInfo_t findMostRecentGrid (GridSelector &GS, const RefPtr< ValuePool > &VP, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const
 This is a convenience function to find the most recent grid for the current time ( Fish<Slice>() or virtual function getTime() ).
 
Fiber::Bundle::GridInfo_t findMostRecentGrid (const RefPtr< ValuePool > &VP, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const
 Find the most recent grid for the current time ( Fish<Slice>() or virtual function getTime() ).
 
virtual GridSelector getGridSelector (const RefPtr< ValuePool > &VP) const
 Provide the current Grid selector, which usually would be taken from the intrinsic TypedSlot, such as equivalent to:
 
Fiber::Info< Fiber::SkeletongetRefinementLevel (int Level, const RefPtr< ValuePool > &VP, int IndexDepth=0, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const override
 Get an refinement level for the given spacetime based on the GridSelector as returned by getGridSelector().
 
bool IterateLevelsOnMostRecentGrid (LevelIterator &LI, const RefPtr< ValuePool > &Context, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const
 Iterate over all the selected levels of a Grid via an instance of the LevelIterator.
 
RefPtr< Fiber::FieldgetField (const Fiber::FieldSelector &FS, const RefPtr< ValuePool > &VP, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr()))
 Retrieve a field for the given FieldSelector on the currently selected Grid.
 

Public Attributes

TypedSlot< Fiber::GridMyGrid
 

Detailed Description

A fish scale for dealing with dependencies on grid objects.

VISH input objects and routines to retrieve a Grid object from a fiber bundle data set.

Constructor & Destructor Documentation

◆ Fish()

Wizt::Fish< Fiber::Grid >::Fish ( const string &  s = "grid",
int  prior = 2 
)

Constructor, optionally pass a parameter of this grid's name (ie.

the name of the slot that will refer to a grid object).

Member Function Documentation

◆ findMostRecentGrid()

Fiber::Bundle::GridInfo_t Wizt::Fish< Fiber::Grid >::findMostRecentGrid ( GridSelector GS,
const RefPtr< ValuePool > &  VP,
const Fiber::BundlePtr SpaceTime = Fiber::BundlePtr(NullPtr()) 
) const

This is a convenience function to find the most recent grid for the current time ( Fish<Slice>() or virtual function getTime() ).

This is only valid when using the GridSelector of the Fish's Grid. If you add a secondary Grid via a TypedSlot<Grid> you must not use this function for the second Grid. Use the findMostRecentGrid() function of the GridSelector instead. Here is an example when accessing one Fish Grid and a secondary Grid in an update() function of a VObject derived from a Fish<Grid>:

MyGrid << R >> GS1; // get the GridSelector of the inherited Fish Grid
InGrid2 << R >> GS2; // get the GridSelector of the second Grid added with a TypedSlot<Grid>InGrid2
// get fish grid
// get second grid
Fiber::BundlePtr secBP = GS2.theSourceBundle;
double sectime = getTime(R, secBP);
Fiber::Bundle::GridInfo_t Grid2 = GS2.findMostRecentGrid( secBP, sectime );
Convenience class that implements a pointer to a Bundle object but adds some useful member funtions t...
Definition Bundle.hpp:779
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Context information to select a grid from within a bundle.
Definition GridSelector.hpp:26
The information as returned by a query for Grids.
Definition GridInfo.hpp:21
Fiber::Bundle::GridInfo_t findMostRecentGrid(GridSelector &GS, const RefPtr< ValuePool > &VP, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const
This is a convenience function to find the most recent grid for the current time ( Fish<Slice>() or v...
Parameters
GSReturn information about the current grid selection.
VPThe context relative to which this selection is to be made
SpaceTimeAn optional alternative spacetime from which this grid is retrieved. It will be queried under the same name and under the same time as here.

Referenced by Wizt::FragmentPainter::renderFragments(), Fiber::NamedField< FieldName >::update(), and Wizt::FieldObject::update().

◆ getField()

RefPtr< Field > Wizt::Fish< Fiber::Grid >::getField ( const Fiber::FieldSelector FS,
const RefPtr< ValuePool > &  VP,
const Fiber::BundlePtr SpaceTime = Fiber::BundlePtr(NullPtr() ) 
)

Retrieve a field for the given FieldSelector on the currently selected Grid.

This field may possibly not exist yet on this Grid and must be computed first via EvalGrid(). This may be computationally intensive.

◆ getGridSelector()

virtual GridSelector Wizt::Fish< Fiber::Grid >::getGridSelector ( const RefPtr< ValuePool > &  VP) const
virtual

Provide the current Grid selector, which usually would be taken from the intrinsic TypedSlot, such as equivalent to:

return GS;

However, for special cases a child class may this function and take the GridSelector from another source.

Reimplemented in Wizt::VertexFieldCollection.

Referenced by Fiber::NamedField< FieldName >::update().

◆ IterateLevelsOnMostRecentGrid()

bool Wizt::Fish< Fiber::Grid >::IterateLevelsOnMostRecentGrid ( LevelIterator LI,
const RefPtr< ValuePool > &  Context,
const Fiber::BundlePtr SpaceTime = Fiber::BundlePtrNullPtr() ) 
) const
inline

Iterate over all the selected levels of a Grid via an instance of the LevelIterator.

Use code like this in a subclass derived from Fish<Field> :

{
int Level,
const RefPtr<ValuePool>&Context) override
{
return true;
}
}
DE;
IterateLevels(DE, Context);
_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > apply(_Tp __func(_Tp)) const
Definition Lytica.hpp:7