FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
Fiber::Grid Class Reference

A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object. More...

#include <Grid.hpp>

Inheritance diagram for Fiber::Grid:
Fiber::SkeletonMap Fiber::Ownable< Grid > MemCore::Intercube Fiber::SaveableAttributes Fiber::OwnerBase MemCore::Attributes

Classes

struct  FragmentFilter
 Filter callback functions per fragment. More...
 

Public Types

typedef Fiber::SkeletonInfo SkeletonInfo
 
typedef SkeletonIterator Iterator
 Associated Iterator class.
 
template<class index_type >
using filter = std::function< bool(Chunk< index_type > &indirection, const RefPtr< FragmentID > &fid, CreativeArrayBase &CAB)>
 A filter function provided by a SkeletonFilter that fills the given indirection array based for the given fragment based on the given coordinates.
 
using metafilter = FragmentMetaIndirector::MetaInfoProvider_t
 A callback function that will be called once a source fragment has been processed such that meta-data can be set on the newly create target Creator.
 
template<class index_type >
using SkeletonFilter = std::function< FragmentFilter< index_type >(Skeleton &SourceVertices, const Representer &theRepresenter, const Representation &R)>
 A function invoked per skeleton to provide a filter function, given a certain Representation and Representer.
 
- Public Types inherited from Fiber::SkeletonMap
typedef std::list< RefPtr< Skeleton > > Skeletons_t
 
typedef SkeletonIterator Iterator
 Associated Iterator class.
 
- Public Types inherited from Fiber::OwnerBase
template<class ItemType >
using Item = MemCore::InterfaceData< ItemType >
 An optional convenience class that allows to easily add arbitrary types to Intercubes .
 

Public Member Functions

 Grid (const OwnerOf< Grid > &GridOwner, const WeakPtr< GridContainer > &GC, const RefPtr< GlobalCharts > &GAtlas)
 The constructor.
 
 Grid (const WeakPtr< GridContainer > &GC, const RefPtr< GlobalCharts > &GAtlas)
 
 ~Grid ()
 Destructor.
 
const RefPtr< Atlas > & MyAtlas () const
 Return the Atlas of this Grid.
 
const Atlas::Atlas_tgetCharts () const
 
Atlas::Atlas_t getCharts (const type_info &ChartType) const
 Return the set of all charts on this Grid of a given type.
 
Atlas::Atlas_t getCartesianCharts3D () const
 Return the set of all three-dimensional cartesian charts defined on this Gri.
 
const RefPtr< ChartgetUniqueCartesianChart3D () const
 Return a chart of type cartesian of only one such exists.
 
string getUniqueCartesianChart3DName () const
 
RefPtr< ChartfindChart (const RefPtr< ChartID > &id) const
 Search for a chart on this grid.
 
RefPtr< ChartfindChart (const type_info &ChartType, const string &name=string()) const
 Search for a named chart of the given type and the given name, using a standard chart if no name is given.
 
RefPtr< ChartmakeChart (const type_info &ChartType, const string &name={}, uint16_t epsg_code=0)
 Make a chart on this grid with the given name, ie create one if not yet existent.
 
RefPtr< ChartfindChart (uint16_t epsg_code) const
 Search for a chart by epsg number on this grid.
 
RefPtr< ChartIDfindChartID (uint16_t epsg_code) const
 
bool insertSharedChart (const RefPtr< Chart > &ExistingChart)
 
RefPtr< ChartmakeCartesianChart (const string &name={}, uint16_t epsg_code=0)
 Create a cartesian chart here, if not existent yet.
 
RefPtr< ChartfindCartesianChart (const string &name={}) const
 Find a cartesian chart here.
 
RefPtr< RepresentationgetCartesianRepresentation (const Skeleton &Skel, const string &ChartName={}) const
 Return the representation of the given Skeleton in cartesian coordinates on this Grid.
 
RefPtr< RepresentationgetCartesianRepresentation (const string &ChartName={}) const
 Return the representation of the Vertices on this Grid in cartesian coordinates.
 
RefPtr< Representationoperator() () const
 Shortcut for getCartesianRepresentation().
 
RefPtr< RepresentationgetTimePolar2DRepresentation (const Skeleton &Skel) const
 Return the representation of the given Skeleton in TimePolar2D coordinates on this Grid.
 
RefPtr< RepresentationgetTimePolar2DRepresentation () const
 
RepresentationmakeCartesianRepresentation (int Dims, const string &name={}, uint16_t epsg_code=0)
 Provide a representation in an n-dimensional skeleton of the vertices.
 
Representationoperator[] (int Dims)
 Shortcut operator function: Create a vertex representation of this Grid with the given dimensionality.
 
RefPtr< Fieldoperator() (const string &fieldname, const string &ChartName=string()) const
 Retrieve a field on the vertices.
 
RefPtr< Fieldoperator() (const string &fieldname, const RefPtr< Chart > &theChart) const
 
FieldProxy operator[] (const string &fieldname)
 Convenience shortcut function: Create a field in 3D cartesian vertices, if no vertices and no cartesian represenation yet exists.
 
RefPtr< FieldCartesianPositions () const
 Shortcut function: get the coordinates of the vertices in the default cartesian chart.
 
RefPtr< FieldTimePolar2DPositions () const
 
RefPtr< FieldgetCartesianPositions () const
 Shortcut function: get the coordinates of the vertices in the default cartesian chart.
 
void setCartesianPositions (const MemCore::RefPtr< MemBase > &Coordinates, const string &ChartName={}, uint16_t epsg_code=0)
 Convenience function to easily set cartesian coordinates directly from data as unfragmented field.
 
RepresentationsetCartesianPositions (const MemBase &Coordinates, const string &ChartName={}, uint16_t epsg_code=0)
 Convenience function to create a cartesian representation directly from a set of coordinates.
 
template<class SkeletonFunctor >
int iterate_skeletons (const SkeletonFunctor &F) const
 
RefPtr< FieldgetField (const RefPtr< ChartID > &theChartID, const string &fieldname, const RefPtr< Skeleton > &theSkeleton) const
 Get a field of the specified Skeleton, which must reside on the Grid, in the given Chart.
 
RefPtr< FieldgetField (const RefPtr< Chart > &theChart, const string &fieldname, const RefPtr< Skeleton > &theSkeleton) const
 
RefPtr< FieldgetField (const RefPtr< ChartID > &theChartID, const string &fieldname) const
 Get a field of the Grid's vertices in the given Chart.
 
RefPtr< FieldgetField (const RefPtr< Chart > &theChart, const string &fieldname) const
 
RefPtr< FieldgetPositions (const RefPtr< ChartID > &theChartID, const RefPtr< Skeleton > &theSkeleton) const
 Get the positional field of the specified Skeleton, which must reside on the Grid, in the given Chart.
 
RefPtr< FieldgetPositions (const string &ChartName={}) const
 
RefPtr< FieldgetVertexPositions (const RefPtr< ChartID > &theChartID) const
 Get the positional field of the vertices of this Grid for the specified chart.
 
RefPtr< RepresentationgetRepresentation (const RefPtr< ChartID > &theChartID, const RefPtr< Skeleton > &theSkeleton) const
 Get the representation of this Grid's Skeleton in the specified Chart.
 
RefPtr< RepresentationgetRepresentation (const RefPtr< Chart > &theChart, const SkeletonID &theSkeletonID) const
 Get the representation of a Skeleton in the specified Chart.
 
RefPtr< RepresentationgetRepresentation (const RefPtr< ChartID > &theChartID, const SkeletonID &theSkeletonID) const
 
RefPtr< RepresentationgetVertexRepresentation (const RefPtr< ChartID > &theChartID) const
 Get the representation of this Grid's vertices in the specified Chart.
 
RefPtr< SkeletonfindHighestHomogenousRefinement (int MaxLevel, int IndexDepth, int Dimensionality) const
 Find the refinement of the highest homogeneous refinement level with the given index depth and dimensionality, i.e.
 
RefPtr< SkeletonfindHighestHomogenousVertexRefinement (int MaxLevel) const
 Find the vertex refinement of the highest homogeneous refinement level, i.e.
 
template<is_field_identifier... FieldIdentifiers>
std::array< RefPtr< Field >, sizeof...(FieldIdentifiers)> getVertexFields (const RefPtr< Chart > &chart, FieldIdentifiers... theFieldIdentifiers) const
 
template<is_field_identifier... FieldIdentifiers>
auto getVertexFields (uint16_t epsg_code, FieldIdentifiers... theFieldIdentifiers) const
 
template<is_field_identifier... FieldIdentifiers>
auto getVertexFields (const type_info &ChartType, const string &ChartName, FieldIdentifiers... theFieldIdentifiers) const
 
template<is_field_identifier... FieldIdentifiers>
auto getCartesianVertexFields (const string &ChartName, FieldIdentifiers... theFieldIdentifiers) const
 
template<is_field_identifier... FieldIdentifiers>
auto getVertexFieldCreators (const RefPtr< FragmentID > &fID, const RefPtr< Chart > &chart, FieldIdentifiers... theFieldIdentifiers) const
 
template<is_field_identifier... FieldIdentifiers>
auto getVertexFieldCreators (const RefPtr< FragmentID > &fID, uint16_t epsg_code, FieldIdentifiers... theFieldIdentifiers) const
 
template<is_field_identifier... FieldIdentifiers>
auto getVertexFieldCreators (const RefPtr< FragmentID > &fID, const type_info &ChartType, const string &ChartName, FieldIdentifiers... theFieldIdentifiers) const
 
template<is_field_identifier... FieldIdentifiers>
auto getCartesianVertexFieldCreators (const RefPtr< FragmentID > &fID, const string &ChartName, FieldIdentifiers... theFieldIdentifiers) const
 
string xml () const
 
RefPtr< SkeletonfindSkeleton (const RefPtr< FragmentID > &fID)
 Investigation function to find the skeleton that corresponds to a certain fragment ID.
 
void establishSkeletonFilter (Skeleton &TargetVertices, Skeleton &SourceVertices, SkeletonFilter< uint32_t > SF)
 Establish a connection between the SourceVertices from another Grid to the TargetVertices on this grid given the specified SkeletonFilter relationship.
 
void establishVertexFilter (const Grid &SourceGrid, SkeletonFilter< uint32_t > SF)
 Establish a connection between all Vertices from another Grid to all Vertices on this grid given the specified SkeletonFilter relationship, which means possibly traversal of a hierarchy.
 
int iterate (ConstSkeletonIterator &) const
 Iterate over all skeletons of this Grid.
 
int iterate (SkeletonIterator &)
 Iterate over all skeletons of this Grid.
 
int iterate (std::function< bool(const SkeletonID &id, Skeleton &S)>) const
 
template<class Functor >
int iterate_all (const Functor &F) const
 
RefPtr< SkeletonfindMaxHomogenousRefinement (int IndexDepth) const
 Find the skeleton with the maximal homogenous refinement level.
 
- Public Member Functions inherited from Fiber::SkeletonMap
RefPtr< SkeletonfindVertices (int TotalRefinement=-1) const
 Find the Skeleton describing the Vertices on this Grid.
 
RefPtr< SkeletongetVerticesInfo (int TotalRefinement=-1) const
 Find the skeleton describing the vertices of this Grid.
 
RefPtr< SkeletongetEdgeInfo (int TotalRefinement=-1) const
 Find the skeleton describing the faces of this Grid.
 
RefPtr< SkeletongetFaceInfo (int TotalRefinement=-1) const
 Find the skeleton describing the edges of this Grid.
 
double NumberOfHoles (int TotalRefinement=-1) const
 Implements the Euler-Poincare formula to determine the topological number of holes within some surface.
 
SkeletonmakeVertices (int dims)
 Create a Skeleton describing the vertices of a Grid.
 
Skeletonoperator[] (const SkeletonID &Sid)
 Create a Skeleton.
 
RefPtr< SkeletongetSkeleton (const SkeletonID &Sid) const
 Find a Skeleton.
 
RefPtr< Skeletonoperator() (const SkeletonID &Sid) const
 Find a Skeleton.
 
RefPtr< RepresentationCellsAsVertices (int dims) const
 
int MinLevel (int IndexDepth=0) const
 Get a Skeleton that would describe the topology of the fragments of a given Skeleton, which is corresponds to a skeleton of index depth two larger.
 
int MaxLevel (int IndexDepth=0) const
 Find the maximal refinement level for the given index depth.
 
RefPtr< SkeletonfindMaxHomogenousRefinement (int IndexDepth) const
 Find the skeleton with the maximal homogenous refinement level.
 
bool replaceSkeletonID (const SkeletonID &old_id, const SkeletonID &new_id)
 
RefPtr< SkeletonfindIsotropicRefinementFactor (int Factor, int IndexDepth) const
 Find a Skeleton that corresponds to isotropic refinement by the given factor.
 
int iterate (ConstSkeletonIterator &) const
 Iterate over all skeletons of this Grid.
 
int iterate (SkeletonIterator &)
 Iterate over all skeletons of this Grid.
 
int iterate (std::function< bool(const SkeletonID &id, Skeleton &S)>) const
 
int iterate_const (std::function< bool(const SkeletonID &id, const Skeleton &S)>) const
 
template<class SkeletonFunctor >
int Iterate (const SkeletonFunctor &F) const
 
template<class Functor >
int iterate_all (const Functor &F) const
 
int nSkeletons () const
 Return the number of skeletons defined on this grid.
 
int nSkeletons (int IndexDepth) const
 
int getMemoryUsage (memsize_t &UsedMemory, memsize_t &WantedMemory) const
 Get the memory occupied by this Grid (and all of its fields).
 
void Speak (int indent=0, int maxindent=-1) const
 Informative debug message.
 
string xml () const
 
- Public Member Functions inherited from Fiber::Ownable< Grid >
void x_updateOwnershipAge (const MemCore::Ageable &theNewAge) override
 Forward some age to all Owners.
 
void insertOwner (const Container &theOwner)
 Add some owner.
 
bool insertOwner (const MemCore::WeakPtr< Container > &theOwner)
 Add some owner.
 
void addOwner (const Container &theOwner, const MemCore::Ageable &theNewAge)
 Add some owner and broadcast a new age to all Ownerrs.
 
void addOwner (const MemCore::WeakPtr< Container > &theOwner, const MemCore::Ageable &theNewAge)
 Add some owner and broadcast a new age to all Ownerrs.
 
 Ownable ()
 Default constructor, empty Ownership list.
 
 Ownable (const Ownable &)
 Copy constructor, does NOT copy any ownership information, the new Ownable will be unowned.
 
 Ownable (const MemCore::WeakPtr< Container > &theOwner, const MemCore::Ageable &theNewAge)
 Construct an Ownable with an initial owner.
 
 Ownable (const Container &theOwner, const MemCore::Ageable &theNewAge)
 Construct an Ownable with an initial owner.
 
Ownableoperator= (const Ownable &)
 Assignment, does NOT copy any ownership information, the assigned Ownable will retain all its ownership information.
 
MemCore::WeakPtr< Container > getPrimaryOwner () const
 Get the first valid owner.
 
size_t getNumberOfValidOwners () const
 Get the first valid owner.
 
bool processOwnership (MemCore::Intercube &Output, const MemCore::Intercube &Input) const override
 Process some ownership action.
 
- Public Member Functions inherited from Fiber::OwnerBase
bool processOwnership (MemCore::Intercube &OutputAndInput) const
 Process ownership where the input information is shared with the output information in the same Intercube.
 
- Public Member Functions inherited from MemCore::Intercube
void addInterface (const RefPtr< InterfaceBase > &I) const
 
void addInterfaceData (const Data &D)
 
void addInterfaceData (const Data &D)
 
void clearInterfaces ()
 
bool const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const
 
virtual RefPtr< InterfaceBasecreateInterface (const type_info &) const
 
RefPtr< InterfaceBasefindInterface (const type_info &t) const
 
RefPtr< InterfaceBasegetInterface (const type_info &t)
 
std::string getInterfaceNames (const char delim=';') const
 
bool gotNewInterfaceData (const Data &D)
 
bool gotNewInterfaceData (mutex &M, const Data &D)
 
bool gotNewInterfaceData (mutex &M, const Data &D)
 
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector &S)
 
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector *S)
 
bool hasChangedInterfaceData (const Data &D) const
 
bool hasChangedInterfaceData (const Data &D) const
 
bool hasChangedInterfaceData (const Data &D, const Selector &) const
 
bool hasChangedInterfaceData (const Data &D, const Selector *) const
 
bool hasInterface (const type_info &t) const
 
bool iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP)
 
void printInterfaces () const
 
void registerInterface (const type_info &t)
 
void removeInterface ()
 
void removeInterfaceBase (const type_info &InterfaceBaseID)
 
- Public Member Functions inherited from Fiber::SaveableAttributes
void attributesHaveBeenSaved () const
 
bool attributesNeedSaving () const
 
- Public Member Functions inherited from MemCore::Attributes
MemCore::RefPtr< MemCore::ChunkBasegetAttribute (const std::string &name) const
 
const AgeablegetAttributeAge () const
 
std::pair< bool, T > getAttributeValue (const string &AttributeName, size_t ElementNumber=0) const
 
attributes_t & getAttributeValues ()
 
const attributes_t & getAttributeValues () const
 
size_t getNumberOfAttributes () const
 
bool hasAttribute (const std::string &name) const
 
int Iterate (const Functor &L) const
 
int iterate (Iterator &it) const
 
int iterate_attributes (const Functor &L) const
 
size_t NumberOfAttributes () const
 
void setAttribute (const std::string &name, const MemCore::RefPtr< MemCore::ChunkBase > &AttribData)
 
ResizableChunk< T > & setAttributeValue (const std::string &name, const T &AttribData)
 
ResizableChunk< T > & setAttributeValues (const std::string &name, const std::initializer_list< T > &AttribData)
 
const T & setValue (const T &AttribData, const std::string &name)
 
const T & setValue (const T &AttribData, const std::string &name, const std::string &Comment, const std::string &CommentPrefix="Comment")
 
string toString () const
 
const AgeabletouchAttributes () const
 
const AgeableupdateAttributeAge (const Ageable &A) const
 

Static Public Member Functions

static string getChartName (const type_info &ChartType, const string &name)
 
static RefPtr< RepresentationgetRepresentation (const RefPtr< Chart > &theChart, const RefPtr< Skeleton > &theSkeleton)
 Get the representation of a Skeleton in the specified Chart.
 

Additional Inherited Members

- Public Attributes inherited from Fiber::SkeletonMap
Skeletons_t Skeletons
 
- Public Attributes inherited from Fiber::Ownable< Grid >
std::unordered_set< MemCore::WeakPtr< Container > > Owners
 The (internal) list of owners.
 
- Public Attributes inherited from Fiber::SaveableAttributes
MemCore::Ageable LastSavedAttributes
 
- Protected Member Functions inherited from Fiber::SkeletonMap
 ~SkeletonMap ()
 Destructor.
 
void extremeUnction () override
 

Detailed Description

A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.

The Grid class that describes a geometrical entity at a certain point within a parameter space. It is the host of geometrical and topological information together with fields on each set describing these components. The geometrical shape as well as any fields is available in multiple coordinate systems. Topological information includes relationships among edges, vertices, polygons etc. as well as multi-level refinement information originating from adaptive mesh refinements (AMR) and also relationships relative to other grids on the same parameter space point.

Examples
EvolutionSurface.cpp, HelicalLines.cpp, Sphere.cpp, XF_LineSetFragmented.cpp, XF_LineSetHierarchical.cpp, XF_LineSetHierarchicalRegularized.cpp, trimesh.cpp, and uniform_scalar.cpp.

Member Typedef Documentation

◆ filter

A filter function provided by a SkeletonFilter that fills the given indirection array based for the given fragment based on the given coordinates.

Parameters
indirectionOUTPUT array of indices, it has its size already reserved, such that using push_back() is fine. It must contain indices into the source skeleton to tell which elements there may be used on the target skeleton.
fidFragment ID, may be used optionally to consider properties of other fields as well - in this case, the providing SkeletonFilter function must also pass the appropriate Representation.
CABA creator for a positional fragment for a fragment, probably holding coordinates in a chart.

◆ metafilter

using Fiber::Grid::metafilter = FragmentMetaIndirector::MetaInfoProvider_t

A callback function that will be called once a source fragment has been processed such that meta-data can be set on the newly create target Creator.

Ideally, such meta-data may allow to avoid creation of actual data, for instance by providing a bounding box.

◆ SkeletonFilter

A function invoked per skeleton to provide a filter function, given a certain Representation and Representer.

It must return a nullptr if the given Representation shall not be used as source for a filter.

Constructor & Destructor Documentation

◆ Grid()

Fiber::Grid::Grid ( const OwnerOf< Grid > &  GridOwner,
const WeakPtr< GridContainer > &  GC,
const RefPtr< GlobalCharts > &  GAtlas 
)

The constructor.

Give it an object that may hold Grid objects, which is weakly stored as backlink - i.e. when the GridContainer is destroyed by external means this backlink pointer will automatically become invalid. The Grid object also requires an Atlas of global charts.

References Fiber::Ownable< Grid >::insertOwner().

Member Function Documentation

◆ findHighestHomogenousRefinement()

RefPtr< Skeleton > Fiber::Grid::findHighestHomogenousRefinement ( int  MaxLevel,
int  IndexDepth,
int  Dimensionality 
) const

Find the refinement of the highest homogeneous refinement level with the given index depth and dimensionality, i.e.

the highest resolution available for this Skeleton.

See also
findMaxHomogenousRefinement(int IndexDepth) const;

References apply(), Fiber::SkeletonID::getHomogeneousLevel(), Fiber::SkeletonID::getRank(), Fiber::SkeletonID::IndexDepth(), Fiber::SkeletonMap::iterate(), and Fiber::SkeletonMap::MaxLevel().

◆ findHighestHomogenousVertexRefinement()

RefPtr< Skeleton > Fiber::Grid::findHighestHomogenousVertexRefinement ( int  MaxLevel) const

Find the vertex refinement of the highest homogeneous refinement level, i.e.

the highest resolution available for vertices.

See also
findMaxHomogenousRefinement(int IndexDepth) const;

References apply(), Fiber::SkeletonID::getHomogeneousLevel(), Fiber::SkeletonID::IndexDepth(), Fiber::SkeletonMap::iterate(), and Fiber::SkeletonMap::MaxLevel().

◆ findMaxHomogenousRefinement()

RefPtr< Skeleton > Fiber::SkeletonMap::findMaxHomogenousRefinement ( int  IndexDepth) const

Find the skeleton with the maximal homogenous refinement level.

Will return a null ptr if none such is found, for instance there are no skeletons of the given index depth or all Skeletons of this index depth are inhomogeneous (different refinement resolution in each coordinate direction).

◆ findSkeleton()

RefPtr< Skeleton > Fiber::Grid::findSkeleton ( const RefPtr< FragmentID > &  fID)

Investigation function to find the skeleton that corresponds to a certain fragment ID.

This is a slow search function and should not be used in production code.

◆ getCartesianPositions()

RefPtr< Field > Fiber::Grid::getCartesianPositions ( ) const
inline

Shortcut function: get the coordinates of the vertices in the default cartesian chart.

Same as CartesianPositions().

Referenced by Fiber::RegularlyFragmentedGridWithCartesianVertices< VertexDims >::create().

◆ getCharts()

const Atlas::Atlas_t & Fiber::Grid::getCharts ( ) const
       Return the set of all charts on this Grid.
for(const auto&theChart : MyGrid.getCharts() )
{
Verbose(0) << "Have Chart: " << theChart->Name();
}
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
const Atlas::Atlas_t & getCharts() const
Definition Grid.cpp:205

Referenced by getCartesianCharts3D().

◆ getField() [1/2]

RefPtr< Field > Fiber::Grid::getField ( const RefPtr< ChartID > &  theChartID,
const string &  fieldname 
) const
inline

Get a field of the Grid's vertices in the given Chart.

This function might invoke coordinate transformations.

◆ getField() [2/2]

RefPtr< Field > Fiber::Grid::getField ( const RefPtr< ChartID > &  theChartID,
const string &  fieldname,
const RefPtr< Skeleton > &  theSkeleton 
) const

Get a field of the specified Skeleton, which must reside on the Grid, in the given Chart.

This function might invoke coordinate transformations.

References findChart().

Referenced by getPositions(), and getVertexPositions().

◆ getPositions()

RefPtr< Field > Fiber::Grid::getPositions ( const RefPtr< ChartID > &  theChartID,
const RefPtr< Skeleton > &  theSkeleton 
) const

Get the positional field of the specified Skeleton, which must reside on the Grid, in the given Chart.

This function might invoke coordinate transformations.

References getField().

◆ getRepresentation() [1/3]

RefPtr< Representation > Fiber::Grid::getRepresentation ( const RefPtr< Chart > &  theChart,
const RefPtr< Skeleton > &  theSkeleton 
)
static

Get the representation of a Skeleton in the specified Chart.

This function is independent of a grid and resides here as mere convenience function providing a shortcut.

◆ getRepresentation() [2/3]

RefPtr< Representation > Fiber::Grid::getRepresentation ( const RefPtr< Chart > &  theChart,
const SkeletonID theSkeletonID 
) const

Get the representation of a Skeleton in the specified Chart.

This function is independent of a grid and resides here as mere convenience function providing a shortcut.

References getRepresentation(), and Fiber::SkeletonMap::getSkeleton().

◆ getRepresentation() [3/3]

RefPtr< Representation > Fiber::Grid::getRepresentation ( const RefPtr< ChartID > &  theChartID,
const RefPtr< Skeleton > &  theSkeleton 
) const

Get the representation of this Grid's Skeleton in the specified Chart.

Note that the Skeleton rather be one on this Grid, otherwise this function will return something which is no good.

References findChart(), and getRepresentation().

Referenced by getRepresentation(), and getRepresentation().

◆ getUniqueCartesianChart3D()

const RefPtr< Chart > Fiber::Grid::getUniqueCartesianChart3D ( ) const

Return a chart of type cartesian of only one such exists.

Otherwise return a nullptr.

References getCartesianCharts3D().

◆ getVertexPositions()

RefPtr< Field > Fiber::Grid::getVertexPositions ( const RefPtr< ChartID > &  theChartID) const

Get the positional field of the vertices of this Grid for the specified chart.

This function might invoke coordinate transformations.

References Fiber::SkeletonMap::findVertices(), and getField().

◆ getVertexRepresentation()

RefPtr< Representation > Fiber::Grid::getVertexRepresentation ( const RefPtr< ChartID > &  theChartID) const
inline

Get the representation of this Grid's vertices in the specified Chart.

This function will not invoke coordinate transformations, the returned Representation will only contain fields that already exist on this Representation. Calling the getField() member function is recommendable as it might compute Fields from different Representations.

◆ iterate_all()

template<class Functor >
int Fiber::SkeletonMap::iterate_all ( const Functor F) const
inline
       Lambda functor iteration over all data.
       More control is provided via iterate_skeletons().
g.iterate_all( [](const Skeleton&S,
const Representer&theRepresenter, const Representation&R,
const FieldID&theFieldID, const Field&theField,
{
}
);
Identifier for Fields within a Grid.
Definition FieldID.hpp:53
A Field is a collection of CreativeArrayBase reference pointers which are accessed via FragmentID obj...
Definition Field.hpp:245
A Representation is a set of Field objects, each of them accessed via some FieldID identifier.
Definition Representation.hpp:101
A Skeleton is a set of Representation object, each of them accessed by an Representer object.
Definition Skeleton.hpp:102
See also
iterate_skeletons()

References apply(), and Fiber::RepresentationMap::iterate_all().

◆ iterate_skeletons()

template<class SkeletonFunctor >
int Fiber::Grid::iterate_skeletons ( const SkeletonFunctor F) const
inline
       Lambda functor iteration over skeletons:
g.iterate_skeletons( [](const SkeletonID&id, const Skeleton&S)
{
return true;
}
);
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24

References Fiber::SkeletonMap::iterate().

Referenced by Fiber::ShapefileSaver::apply_const(), and establishVertexFilter().

◆ makeCartesianChart()

RefPtr< Chart > Fiber::Grid::makeCartesianChart ( const string &  name = {},
uint16_t  epsg_code = 0 
)

Create a cartesian chart here, if not existent yet.

This is a convenience call to:

Chart object for cartesian coordinates.
Definition CartesianChart.hpp:15
RefPtr< Chart > makeChart(const type_info &ChartType, const string &name={}, uint16_t epsg_code=0)
Make a chart on this grid with the given name, ie create one if not yet existent.
Definition Grid.cpp:272
Examples
XF_LineSetHierarchical.cpp, and XF_LineSetHierarchicalRegularized.cpp.

References makeChart().

◆ makeCartesianRepresentation()

Representation & Fiber::Grid::makeCartesianRepresentation ( int  Dims,
const string &  name = {},
uint16_t  epsg_code = 0 
)

Provide a representation in an n-dimensional skeleton of the vertices.

Creates one if not existent yet.

Examples
XF_LineSetFragmented.cpp.

References findChart(), makeChart(), and Fiber::SkeletonMap::makeVertices().

Referenced by Fiber::FragmentedUniformGrid3DPoints::create().

◆ makeChart()

RefPtr< Chart > Fiber::Grid::makeChart ( const type_info ChartType,
const string &  name = {},
uint16_t  epsg_code = 0 
)

Make a chart on this grid with the given name, ie create one if not yet existent.

Make a standard chart on this grid if no name is given.

References findChart().

Referenced by Fiber::FragmentedUniformGrid3DPoints::create(), Fiber::EvalFieldOnRepresentation(), makeCartesianChart(), makeCartesianRepresentation(), and operator[]().

◆ operator()()

RefPtr< Field > Fiber::Grid::operator() ( const string &  fieldname,
const string &  ChartName = string() 
) const

Retrieve a field on the vertices.

Shortcut function for convenience, it queries the vertices Skeleton and employs its default chart.

References getCartesianRepresentation().

◆ operator[]()

Representation & Fiber::Grid::operator[] ( int  Dims)
inline

Shortcut operator function: Create a vertex representation of this Grid with the given dimensionality.

This function is provided for convenience.