1#ifndef __FIBER_GRIDSELECTOR_HPP
2#define __FIBER_GRIDSELECTOR_HPP
11class BUNDLE_API GridSelector;
13extern BUNDLE_API
bool hasProperty(
const GridSelector&,
const BundleProperty&);
40 const string&getGridName()
const {
return theGridname; }
47 : theSourceBundle(Source)
48 , theGridname(gridname)
53 : theSourceBundle(Source)
54 , theGridname(gridname)
59 : theSourceBundle(Source.theSourceBundle)
60 , theGridname(gridname)
65 : theSourceBundle(Source.theSourceBundle)
66 , theGridname(gridname)
111 return theSourceBundle;
117 return theSourceBundle;
124 return theSourceBundle && theGridname.length()>0;
130 return hasValidGrid();
158 return theSpacetime->findMostRecentGrid(time, theGridname);
169 if (!theSourceBundle)
172 return theSourceBundle->findMostRecentGrid(time, theGridname);
175 return theSpacetime->findMostRecentGrid(time, theGridname);
190 int Level,
int IndexDepth,
200 if (!theSourceBundle)
203 theSourceBundle->findPrev(time, theGridname);
216 if (!theSourceBundle)
219 theSourceBundle->findNext(time, theGridname);
227 return theSourceBundle[time][ Gridname() ];
Convenient abstract base class for inspecting and evaluating properties of Bundles.
Definition BundleProperty.hpp:21
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
friend bool operator!=(const GridSelector &L, const GridSelector &R)
Check if two Grid selectors differ.
Definition GridSelector.hpp:97
const string & Gridname() const
Return the name of the currently selected Grid.
Definition GridSelector.hpp:103
bool hasValidGrid() const
check for validity, bundle pointer must be valid and grid name.
Definition GridSelector.hpp:122
Info< Grid > findMostRecentGrid(const Fiber::BundlePtr &theSpacetime, double time) const
Return the time, slice and grid that is most recent to the given time for the selected grid.
Definition GridSelector.hpp:153
string theGridname
Name of the selected grid.
Definition GridSelector.hpp:36
GridSelector operator[](const string &gridname) const
Operator syntax for constructing a new GridSelector from an existing one and a new gridname.
Definition GridSelector.hpp:84
BundlePtr theSourceBundle
The bundle that was used to retrieve the grid name, meaning: the selected grid name is ensured to exi...
Definition GridSelector.hpp:33
Info< Grid > findMostRecentGrid(double time, const Fiber::BundlePtr &theSpacetime=Fiber::BundlePtr(NullPtr())) const
Find the Grid that is most recent for the given time.
Definition GridSelector.hpp:164
const Fiber::BundlePtr & getBundle() const
Provide the original bundle of from where the Grid was selected.
Definition GridSelector.hpp:115
const Fiber::BundlePtr & BundleSource() const
Provide the original bundle of from where the Grid was selected.
Definition GridSelector.hpp:109
Info< Grid > findNext(double time, const BundlePtr &theSpacetime=BundlePtr(NullPtr())) const
Return the Grid that is just next after the given time.
Definition GridSelector.hpp:212
friend bool operator==(const GridSelector &L, const GridSelector &R)
Compare two Grid selectors.
Definition GridSelector.hpp:90
bool selectGrid(const string &name)
Select a certain grid out of the given spacetime.
Definition GridSelector.hpp:134
GridSelector(const string &gridname, const Fiber::BundlePtr &Source=Fiber::BundlePtr(NullPtr()))
Construct from gridname and bundle.
Definition GridSelector.hpp:46
const string & getGridname() const
Name of the selected grid (member function)
Definition GridSelector.hpp:39
GridSelector(const string &gridname, const GridSelector &Source)
Construct from GridSelector and gridname.
Definition GridSelector.hpp:64
Info< Grid > findPrev(double time, const BundlePtr &theSpacetime=BundlePtr(NullPtr())) const
Return the Grid that is just previous to the given time.
Definition GridSelector.hpp:196
bool hasProperty(const BundleProperty &theProperty) const
Check this GridSelector for a certain property.
Definition GridSelector.hpp:251
GridSelector(const Fiber::BundlePtr &Source, const string &gridname)
Construct from bundle and gridname.
Definition GridSelector.hpp:52
RefPtr< Fiber::Grid > operator()(double time, const Fiber::BundlePtr &theSpacetime=Fiber::BundlePtr(NullPtr())) const
Convenience function to easily retrieve just the most recent Grid for a given time.
Definition GridSelector.hpp:235
GridSelector(const GridSelector &Source, const string &gridname)
Construct from GridSelector and gridname.
Definition GridSelector.hpp:58
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
T & operator[](index_t i) const
Access an element of the array, writeable.
Definition vector/Iterator.hpp:712
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
The information as returned by a query for Grids.
Definition GridInfo.hpp:21
A set of types.
Definition FiberType.hpp:213