Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
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 > Wizt::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_t & getCharts () const
 Return the set of all charts on this Grid.
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< Chart > getUniqueCartesianChart3D () const
 Return a chart of type cartesian of only one such exists.
string getUniqueCartesianChart3DName () const
RefPtr< Chart > findChart (const RefPtr< ChartID > &id) const
 Search for a chart on this grid.
RefPtr< Chart > findChart (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< 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.
RefPtr< Chart > findChart (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< Chart > makeCartesianChart (const string &name={}, uint16_t epsg_code=0)
 Create a cartesian chart here, if not existent yet.
RefPtr< Chart > findCartesianChart (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
 Lambda functor iteration over skeletons:
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.
Skeletonoperator[] (const SkeletonID &Sid)
 Create a Skeleton.
RefPtr< Skeletonoperator() (const SkeletonID &Sid) const
 Find a Skeleton.
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
 Lambda functor iteration over all data.
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
 Lambda functor iteration over skeletons:
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.
void addOwner (const Container &theOwner, const MemCore::Ageable &theNewAge)
 Add some owner and broadcast a new age to all Ownerrs.
 Ownable ()
 Default constructor, empty Ownership list.
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 Wizt::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, XF_LineSetFragmented.cpp, XF_LineSetHierarchical.cpp, XF_LineSetHierarchicalRegularized.cpp, trimesh.cpp, and uniform_scalar.cpp.

Member Typedef Documentation

◆ filter

template<class index_type>
using Fiber::Grid::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.

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

template<class index_type>
using Fiber::Grid::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.

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()

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().

References CartesianPositions().

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

◆ getCartesianRepresentation() [1/2]

◆ getCartesianRepresentation() [2/2]

RefPtr< Representation > Fiber::Grid::getCartesianRepresentation ( const string & ChartName = {}) const

Return the representation of the Vertices on this Grid in cartesian coordinates.

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

◆ 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();
}

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.

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

◆ 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 getField(), 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(), getRepresentation(), and getVertexRepresentation().

◆ getTimePolar2DRepresentation()

RefPtr< Representation > Fiber::Grid::getTimePolar2DRepresentation ( const Skeleton & Skel) const

Return the representation of the given Skeleton in TimePolar2D coordinates on this Grid.

References findChart().

◆ 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.

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

◆ 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
StrongPtr< Object, ObjectBase > RefPtr
WeakPtr< BaseSpace > Representer
The type used to reference other objects, which is the anchor of representations of a Skeleton.
Definition RepresentationMap.hpp:28
See also
iterate_skeletons()

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

Referenced by 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::PointSearch::PointSearch(), Fiber::TriangularSurface::addVerticesAndConnectivity(), Fiber::FragmentedUniformGrid3DPoints::create(), main(), and operator[]().

◆ makeChart()

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

◆ 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.

References makeCartesianRepresentation().