FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Fiber::FiberType< T > Class Template Reference

Description of types, which is meta-information like what is the number of elements of some array-like type. More...

#include <FiberType.hpp>

Inheritance diagram for Fiber::FiberType< T >:
Fiber::FiberTypeBase Fiber::FiberTypeIndex MemCore::ReferenceBase< FiberTypeBase >

Public Types

enum  { Dims = Eagle::CoordinateInfo<Chart_t>::Dims }
 
typedef Eagle::MetaInfo< T > FiberInfo_t
 
typedef FiberInfo_t::element_t element_t
 
typedef FiberInfo_t::Chart_t Chart_t
 
- Public Types inherited from Fiber::FiberTypeBase
using WeakPtr_t = MemCore::WeakPtr< FiberTypeBase, FiberTypeBase >
 
- Public Types inherited from MemCore::ReferenceBase< FiberTypeBase >
typedef Object reference_domain_t
 
typedef WeakPtr< Object, Object > SelfPtr_t
 

Public Member Functions

 FiberType (const FiberType &)=delete
 
const std::type_infogetType () const override
 Type ID for this type.
 
MemCore::RefPtr< MemCore::ChunkBasenewChunk (size_t N) const override
 Implement the virtual function to allocate chinks.
 
bool isType (const std::type_info &theType) const override
 
WeakPtr_t element_type () const override
 
std::string coordinate_component_name (int i) const override
 The grade of this vector type, a multivector quantity from geometric algebra.
 
const std::type_infochart_type () const override
 Return the associated chart type.
 
int element_index (const int i[]) const override
 Information about the organization of elements of a multi-ranked object.
 
int indexing_scheme (int i) const override
 
const charnontensor () const override
 
- Public Member Functions inherited from Fiber::FiberTypeBase
 FiberTypeBase (const FiberTypeIndex &FTI)
 
bool remember ()
 
template<class ... T>
bool isType () const
 
unsigned multiplicity () const
 How many atomic elements construct this type.
 
unsigned mem_size () const
 How many bytes this object occupies in memory.
 
int rank () const
 For tensorial objects, specify the rank.
 
int grade () const
 Grade of multivectors.
 
unsigned array_element_size () const
 The size of an array element in memory if this type is an array.
 
std::string chart_name () const
 
std::string component_name (unsigned ComponentId) const
 A textual description for each member, as derived from the coordinate's component names, the indexing scheme and the grade-.
 
int chart_dimension () const
 
bool is_lower_index (int i) const
 
bool is_upper_index (int i) const
 
std::string description () const
 
const FiberTypeIndexgetFiberTypeIndex () const
 
auto operator<=> (const FiberTypeBase &FTB) const
 
auto operator== (const FiberTypeBase &FTB) const
 
void speak () const
 
auto value_type_size () const
 How many bytes this object occupies in memory.
 
- Public Member Functions inherited from MemCore::ReferenceBase< FiberTypeBase >
auto getObjectCountID () const noexcept
 
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
 
void mkAutoDestructive ()
 
refcount_t refcount () const noexcept
 
 ReferenceBase (Object *that) noexcept
 
const auto & self () const
 
refcount_t wrefcount () const noexcept
 

Static Public Member Functions

static FiberTypeIndex getFiberTypeIndex ()
 
static WeakPtr_t getFiberType ()
 Get the fiber type information for the current type.
 
- Static Public Member Functions inherited from Fiber::FiberTypeBase
static WeakPtr_t find (const FiberTypeIndex &FTI)
 
static WeakPtr_t find (const std::type_info &T)
 

Additional Inherited Members

- Protected Types inherited from MemCore::ReferenceBase< FiberTypeBase >
typedef Object reference_domain_t
 
typedef WeakPtr< Object, Object > SelfPtr_t
 
- Protected Member Functions inherited from Fiber::FiberTypeIndex
auto operator<=> (const FiberTypeIndex &) const =default
 https://en.cppreference.com/w/cpp/language/default_comparisons https://devblogs.microsoft.com/cppblog/simplify-your-code-with-rocket-science-c20s-spaceship-operator/
 
std::string description () const
 
auto value_type_size () const
 
- Protected Member Functions inherited from MemCore::ReferenceBase< FiberTypeBase >
virtual void extremeUnction ()
 
ReferenceBaseoperator= (const ReferenceBase &R)
 
void suicide ()
 
auto getObjectCountID () const noexcept
 
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
 
void mkAutoDestructive ()
 
refcount_t refcount () const noexcept
 
 ReferenceBase (Object *that) noexcept
 
const auto & self () const
 
refcount_t wrefcount () const noexcept
 
- Protected Attributes inherited from Fiber::FiberTypeIndex
unsigned multiplicity = 0
 How many atomic elements construct this type.
 
unsigned mem_size = 0
 How many bytes this object occupies in memory.
 
int rank = 0
 For tensorial objects, specify the rank.
 
int grade = 0
 Grade of multivectors.
 
unsigned array_element_size = 0
 The size of an array element in memory if the type is an array.
 
std::string type_name
 
std::string element_type_name
 
std::string chart_name
 Return the textual naming scheme of the ith coordinate.
 
int chart_dimension = 0
 A textual description for each member, as derived from the coordinate's component names, the indexing scheme and the grade-.
 

Detailed Description

template<class T>
class Fiber::FiberType< T >

Description of types, which is meta-information like what is the number of elements of some array-like type.

This class is supposed to describe the properties of a fiber space, and thus is applicable only to homogeneous types. It supports types as used in Tensor algebra and Geometric algebra, but NOT types such as generic types in C++ .

Member Function Documentation

◆ chart_type()

template<class T >
const std::type_info & Fiber::FiberType< T >::chart_type ( ) const
inlineoverridevirtual

Return the associated chart type.

Implements Fiber::FiberTypeBase.

◆ coordinate_component_name()

template<class T >
std::string Fiber::FiberType< T >::coordinate_component_name ( int  i) const
inlineoverridevirtual

The grade of this vector type, a multivector quantity from geometric algebra.

Note that at this point mixed multivectors (sums of vectors of multple grades) are NOT supported. Return the textual naming scheme of the ith coordinate.

Parameters
avalue beteen 0 and char_dimension()

Implements Fiber::FiberTypeBase.

◆ element_index()

template<class T >
int Fiber::FiberType< T >::element_index ( const int  i[]) const
inlineoverridevirtual

Information about the organization of elements of a multi-ranked object.

The index i must be smaller than rank().

Implements Fiber::FiberTypeBase.

◆ element_type()

template<class T >
WeakPtr_t Fiber::FiberType< T >::element_type ( ) const
inlineoverridevirtual

Implements Fiber::FiberTypeBase.

◆ getFiberType()

template<class T >
static WeakPtr_t Fiber::FiberType< T >::getFiberType ( )
inlinestatic

Get the fiber type information for the current type.

This is basically static information, but the pointer may become invalid if the type has been defined in a runtime plugin and this runtime plugin has been unloaded. This situation occurs particularly at program termination when plugins are unloaded in the reversed order on how they had been loaded.

Referenced by Fiber::TypedArray< T >::applyFunction(), Fiber::TypedArray< T >::applyFunction(), Fiber::TypedArray< T >::applyFunction(), Fiber::TypedArray< T >::applyFunction(), Fiber::TypedArray< T >::applyFunction(), Fiber::MemBase::create(), Fiber::H5Globals::initChartAndNativeTypes(), and Fiber::FiberIO::HDF5::PrecisionTransformation::setFragmentFiberType().

◆ getType()

template<class T >
const std::type_info & Fiber::FiberType< T >::getType ( ) const
inlineoverridevirtual

Type ID for this type.

Implements Fiber::FiberTypeBase.

◆ indexing_scheme()

template<class T >
int Fiber::FiberType< T >::indexing_scheme ( int  i) const
inlineoverridevirtual
Parameters
iThe index number, between 0 and rank()

Implements Fiber::FiberTypeBase.

◆ isType()

template<class T >
bool Fiber::FiberType< T >::isType ( const std::type_info theType) const
inlineoverridevirtual

Implements Fiber::FiberTypeBase.

◆ newChunk()

template<class T >
MemCore::RefPtr< MemCore::ChunkBase > Fiber::FiberType< T >::newChunk ( size_t  N) const
inlineoverridevirtual

Implement the virtual function to allocate chinks.

Implements Fiber::FiberTypeBase.

◆ nontensor()

template<class T >
const char * Fiber::FiberType< T >::nontensor ( ) const
inlineoverridevirtual

Implements Fiber::FiberTypeBase.