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

A convenience class for optimized handling of fields that are fragmented in a regular manner (n-dimensional tiling). More...

#include <RegularlyFragmentedField.hpp>

Inheritance diagram for Fiber::RegularlyFragmentedField< DIMS >:
Fiber::Field Fiber::Ownable< Field > MemCore::Intercube Fiber::FragmentIDCollectionProvider MemCore::Ageable Fiber::SaveableAttributes Fiber::OwnerBase MemCore::Attributes

Public Member Functions

 RegularlyFragmentedField (const MultiIndex< DIMS > &FragmentNumbers, const string &FragmentNamePrefix="RegularFragment")
 Create a field that consists out of a regular distribution of fragments.
 
const MultiIndex< DIMS > & getNumberOfFragments () const
 
 RegularlyFragmentedField (const RegularlyFragmentedField &RFF)
 Create a new regularly fragmented field from the same fragmentation as the given field.
 
bool validate (const MultiIndex< DIMS > &I) const
 Check if the given multidimensional index is valid.
 
RefPtr< FragmentIDgetFragmentID (const MultiIndex< DIMS > &I) const
 Get the associated FragmentID.
 
RefPtr< CreativeArrayBase > & operator[] (const MultiIndex< DIMS > &I)
 Return a writable pointer with the data container for this multiindex.
 
RefPtr< CreativeArrayBaseoperator() (const MultiIndex< DIMS > &I) const
 Search for a fragment, return NullPtr if no such fragment is contained in this field.
 
string xml () const
 
- Public Member Functions inherited from Fiber::Field
void reserve_fragments (size_t N)
 
void extremeUnction () override
 
void clear ()
 Remove all fragments of this Field.
 
FragmentIndex_t getNumericalID (const RefPtr< FragmentID > &fid)
 
FragmentIndex_t findNumericalID (const RefPtr< FragmentID > &fid) const
 
FragmentIndex_t findNumericalIDByName (const string &FragmentName) const
 
RefPtr< FragmentID > & makeFragmentID (const string &fragmentname)
 Create a new fragment ID if not existent yet.
 
RefPtr< FragmentID > & operator[] (const string &fragmentname)
 
RefPtr< FragmentIDCollectiongetFragmentIDCollection () const override
 
DynamicSize getFragmentLayout () const
 
const FragmentIDCollection::FragmentIDs_tgetFragmentIDs () const
 Return iteratable container of fragment ID's for this field.
 
 Field ()
 Default constructor, no data or fragments.
 
 Field (const RefPtr< FragmentIDCollection > &theFragmentIDCollection)
 Create a new field from an existing FragmentID collection, such as an existing field.
 
 Field (const WeakPtr< Field > &SimilarField)
 
 Field (const FragmentIDCollectionProvider &FICP)
 
 Field (const RefPtr< CreativeArrayBase > &FFC, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr)
 Create unfragmented field with data creation via Creator.
 
 Field (const RefPtr< MemBase > &Mb, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr)
 Create unfragmented field with data stored always in memory ( calls setPersistentData() )
 
 Field (const RefPtr< CreativeArrayBase > &FFC, const WeakPtr< Field > &SimilarField)
 
 Field (const RefPtr< MemBase > &MAb, const WeakPtr< Field > &SimilarField)
 
 Field (const RefPtr< CreativeArrayBase > &FFC, const FragmentIDCollectionProvider &FICP)
 
 Field (const RefPtr< MemBase > &MAb, const FragmentIDCollectionProvider &FICP)
 
 Field (const RefPtr< MemBase > &Mb, const RefPtr< MemCore::Cache > &Cache, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr)
 Create unfragmented field with data stored in memory as long as the cache allows. ( calls setPersistentData() )
 
template<Dims_t DIMS>
 Field (const MultiIndex< DIMS > &NumberOfFragments, const string &FragmentNamePrefix)
 Create a field with a multi-dimensional regular layout for the fragments.
 
template<Dims_t DIMS>
bool setFragmentLayout (const MultiIndex< DIMS > &NumberOfFragments, const string &FragmentNamePrefix)
 Add a multi-dimensional regular layout for the fragments if it had no layout yet.
 
RefPtr< MemBasenewFragmentationArray () const
 For fields with a fragment layout provide such in a MultiArray.
 
template<class T , Dims_t N>
 Field (const MemCore::Ref< MemArray< N, T > > &MemRefPtr, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr)
 Convenience function initializing from a Ref<> to some MemArray.
 
template<class T , Dims_t N>
 Field (const MemCore::RefPtr< MemArray< N, T > > &MemRefPtr, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr)
 Convenience function initializing from a RefPtr<> to some MemArray.
 
template<class T , Dims_t N>
 Field (const MemCore::WeakPtr< MemArray< N, T > > &MemRefPtr, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr)
 Convenience function initializing from a RefPtr<> to some MemArray.
 
template<class T , Dims_t N>
 Field (const MemCore::MemVector< T > &Data, const MultiIndex< N > &Size, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr)
 Construct an unfragmented field from a MemVector and a MultiIndex.
 
template<class T , Dims_t N>
 Field (const MemCore::RefPtr< MemCore::TypedChunk< T > > &Data, const MultiIndex< N > &Size, const RefPtr< FragmentIDCollection > &theFragmentIDCollection=nullptr)
 Construct an unfragmented field from a Chunk of data and multidimensional index.
 
void own (CreativeArrayBase &CAB)
 
void own (const RefPtr< CreativeArrayBase > &CAB)
 
bool hasData (const RefPtr< FragmentID > &FID=nullptr) const
 Check if there are data on this field fragment.
 
const CAB_tsetPersistentData (const RefPtr< MemBase > &Mb, const RefPtr< FragmentID > &=nullptr, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache(), const string &ProvenanceInfo={})
 Set data for a certain field fragment that is always kept in memory, the cache reference is just use to trace memory utilization.
 
const CAB_tsetPersistentData (const RefPtr< MemBase > &Mb, const RefPtr< FragmentID > &fID, const string &ProvenanceInfo)
 
const CAB_tsetPersistentDataByName (const RefPtr< MemBase > &Mb, const string &FragmentName, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache())
 
template<class T , Dims_t N>
const CAB_tsetPersistentData (const MemCore::RefPtr< Chunk< T > > &Mb, const MultiIndex< N > &Dimensions, const RefPtr< FragmentID > &FragID=nullptr, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache())
 A convenience function to set a field's data from a Chunk of data.
 
template<class T , Dims_t N>
const CAB_tsetPersistentData (Chunk< T > *Mb, const MultiIndex< N > &Dimensions, const RefPtr< FragmentID > &FragID=nullptr, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache())
 A convenience function to set a field's data from a Chunk of data.
 
template<class T >
const CAB_tsetPersistentData1D (const MemCore::RefPtr< Chunk< T > > &data, const RefPtr< FragmentID > &FragID=nullptr, const RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache())
 A convenience function to set a field's data from a Chunk of data, interpreting them as one-dimensional.
 
RefPtr< MemArrayPropertiesgetProperties () const
 Return properties associated with this field.
 
const type_infogetFieldStorageType () const
 Get the type of the field.
 
const type_infogetElementType () const
 Retrieve the element type of this field, which is stored with the properties of this field.
 
MemCore::WeakPtr< FiberTypeBasegetElementFiberType () const
 Retrieve the fiber type that is associated with this field.
 
MemCore::WeakPtr< FiberTypeBasegetFiberType () const
 
int getMemoryUsage (memsize_t &UsedMemory, memsize_t &WantedMemory) const
 Get the memory occupied by this field (and all of its fragments).
 
bool isType (const TypeList_t &TL) const
 Check if the type of this field is contained in the given type list.
 
FiberTypeIndex getFiberTypeIndex () const
 
bool addFiberType (TypeList_t &TypeList) const
 Add the type used by this field to the given TypeList.
 
const RefPtr< CreativeArrayBase > & setCreator (const RefPtr< CreativeArrayBase > &FFC, const RefPtr< FragmentID > &=nullptr)
 Sets the creator for an unfragmented field.
 
const RefPtr< CreativeArrayBase > & setCreatorByName (const RefPtr< CreativeArrayBase > &FFC, const string &FragmentName)
 
const RefPtr< CreativeArrayBase > & setCompatibleCreator (const RefPtr< CreativeArrayBase > &CAB, const RefPtr< FragmentID > &fid=nullptr)
 Set the creator for a fragment ID on a different Skeleton such that the fragment IDs are different, only their names matching.
 
FunctionalCreatorsetLambda (const FunctionalCreator::Functor &F, const RefPtr< FragmentID > &fid=nullptr)
 
FunctionalCreatorsetLambda (const RefPtr< FragmentID > &fid, const FunctionalCreator::Functor &F)
 
FunctionalCreatorsetCompatibleLambda (const FunctionalCreator::Functor &F, const RefPtr< FragmentID > &fid=nullptr)
 
const RefPtr< CreativeArrayBase > & setFunctionalCreator (const FunctionalCreator::Functor &F, const RefPtr< FragmentID > &fid=nullptr)
 
template<class Functor >
FunctionalCreatorsetFunctor (const Functor &F, const RefPtr< FragmentID > &fid=nullptr)
 Alias for setLambda().
 
template<class Functor >
FunctionalCreatorsetFunctor (const RefPtr< FragmentID > &fid, const Functor &F)
 Alias for setLambda().
 
size_t nFragments () const
 The number of fragments in this field.
 
size_t NumberOfFragments () const
 The number of fragments in this field.
 
bool isUnfragmented () const
 
bool isFragmented () const
 
RefPtr< FragmentIDgetFragmentID (const string &FragmentName) const
 
RefPtr< FragmentIDoperator() (const string &FragmentName) const
 
RefPtr< CreativeArrayBasegetCreator (const RefPtr< FragmentID > &=nullptr) const
 Get the creator of an unfragmented field.
 
RefPtr< CreativeArrayBaseoperator() (const RefPtr< FragmentID > &FID=nullptr) const
 
RefPtr< CreativeArrayBasegetCreatorByName (const string &FragmentName) const
 Get the creator of an unfragmented field via the textual description of a fragment ID.
 
NamedFragment getCreatorByNameF (const string &FragmentName) const
 
RefPtr< CreativeArrayBasegetCreatorByNumericalID (FragmentIndex_t NumericalID) const
 
RefPtr< CreativeArrayBase > & getCreatorReferenceViaFragmentIndex (FragmentIndex_t NumericalID)
 
RefPtr< CreativeArrayBasegetCreator (FragmentIndex_t NumericalID) const
 
RefPtr< CreativeArrayBasegetCompatibleCreator (const RefPtr< FragmentID > &F=nullptr) const
 Get a creator from a fragment ID that is NAMED similar to one fragment here.
 
NamedFragment getCompatibleCreatorF (const RefPtr< FragmentID > &F=nullptr) const
 Get a creator from a fragment ID that is NAMED similar to one fragment here.
 
RefPtr< MemBasegetData (const RefPtr< FragmentID > &FID=nullptr) const
 Get the data of a contigous field.
 
RefPtr< MemBasegetDataByNumericalID (FragmentIndex_t NumericalID) const
 Get some fragment's data via its numerical fragment ID.
 
 DEPRECATED ("Use function getDataByNumericalID() instead", RefPtr< MemBase > getData(FragmentIndex_t NumericalID) const)
 
RefPtr< MemBasegetFirstData () const
 In case this is field is fragmented, but there is only one fragment, return the ID of this singular fragment.
 
RefPtr< CreativeArrayBasegetFirstCreator () const
 In case this is field is fragmented, but there is only one fragment, return the ID of this singular fragment.
 
RefPtr< FragmentIDgetFirstFragmentID () const
 Get the first fragment ID.
 
RefPtr< MemCore::ChunkBasegetChunk (const RefPtr< FragmentID > &FID=nullptr) const
 Return the stored memory chunk associated with this array.
 
RefPtr< MemBasegetCompatibleData (const RefPtr< FragmentID > &F=nullptr) const
 Get data from a fragment ID that is NAMED similar to one fragment here.
 
unsigned iterate (FragmentIterator &, const MemCore::WeakPtr< FragmentSelector > &FS=nullptr) const
 
template<class T >
unsigned Iterate (const T &t, const MemCore::WeakPtr< FragmentSelector > &FS=nullptr) const
 
template<class T >
unsigned iterate_fragments (const T &t, const MemCore::WeakPtr< FragmentSelector > &FS=nullptr) const
 
Ageable getMostRecentCreatorAge () const
 
Ageable getMostRecentAttributeAge () const
 
bool hasFragmentsNewerThan (const Ageable &A) const
 
unsigned iterate (const FragmentIterator_t &FI, bool parallel=false, bool copy_map_internally=false) const
 
unsigned iterate (bool parallel, const FragmentIterator_t &FI, bool copy_map_internally=false) const
 Same as iterate(const FragmentIterator_t&, bool), just other order of arguments for convenience.
 
unsigned iterate_parallel (const FragmentIterator_t &FI, bool copy_map_internally=false) const
 Iterate over all fragments in parallel.
 
unsigned iterate (FragmentIndexIterator &FFI, const WeakPtr< FragmentSelector > &FS=nullptr, bool copy_map_internally=false) const
 Iterate over the fragments of a field using the integer ID of each fragment.
 
Dims_t Dims () const
 The dimensionality of the field, taken from the getProperties().
 
RefPtr< SizeInterfacegetSize () const
 The size of the field, which is the sum of all fragments.
 
bool isCompatible (const Field &F)
 
void Speak (int indent=0, int maxindent=-1) const
 Informative debug message.
 
string xml () const
 
RefPtr< CreativeArrayBasecreateCreator (const RefPtr< MemBase > &Data, const RefPtr< FragmentID > &=nullptr, CreationFailAlternative=CreationFailAlternative::Persistent, const WeakPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache())
 Insert some data into a Field with various memory management methods.
 
RefPtr< CreativeArrayBasecreateCreator (const RefPtr< MemBase > &Data, const string &FragmentName, CreationFailAlternative=CreationFailAlternative::Persistent, const WeakPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache())
 
template<Dims_t N, class T >
std::pair< RefPtr< MemArray< N, T > >, RefPtr< CreativeArrayBase > > createData (const MultiIndex< N > &Size, const RefPtr< FragmentID > &fid=nullptr, Field::CreationFailAlternative FailMode=Field::CreationFailAlternative::Persistent, const WeakPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache())
 Create a mem array and insert it as a fragment to the Field.
 
template<Dims_t N, class T >
std::pair< RefPtr< MemArray< N, T > >, RefPtr< CreativeArrayBase > > createData (const MultiIndex< N > &Size, const string &fragmentname, Field::CreationFailAlternative FailMode=Field::CreationFailAlternative::Persistent, const WeakPtr< MemCore::Cache > &theCache=MemCore::Cache::MemCache())
 Create a mem array and insert it as a fragment to the Field under the given fragmentname:
 
template<Dims_t Dims>
MultiIndex< Dims > & setFragmentOffset (const string &FragmentName, const MultiIndex< Dims > &Offset)
 Set a fragment's index offset.
 
- Public Member Functions inherited from Fiber::Ownable< Field >
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 MemCore::Ageable
constexpr Ageable (age_t t) noexcept
 
constexpr Ageable (const Ageable &A) noexcept
 
 Ageable (const volatile Ageable &A) noexcept
 
constexpr const AgeablegetAge () const
 
bool isNewerThan (const Ageable &a) const noexcept
 
bool isOlderThan (const Ageable &a) const noexcept
 
bool isYoungerThan (const Ageable &a) const noexcept
 
bool operator!= (const Ageable &a) const noexcept
 
bool operator< (const Ageable &a) const noexcept
 
bool operator<= (const Ageable &a) const noexcept
 
bool operator<= (const volatile Ageable &a) const volatile noexcept
 
bool operator== (const Ageable &a) const noexcept
 
bool operator> (const Ageable &a) const noexcept
 
bool operator> (const volatile Ageable &a) const volatile
 
bool operator>= (const Ageable &a) const noexcept
 
bool operator>= (const volatile Ageable &a) const volatile noexcept
 
constexpr void resetAge () noexcept
 
void setInfinitelyNew () noexcept
 
age_t time_value () const noexcept
 
age_t time_value () const volatile noexcept
 
Ageabletouch () noexcept
 
age_t update (age_t age) noexcept
 
age_t update (const Ageable &Other) noexcept
 
age_t update (const volatile Ageable &Other) volatile noexcept
 
- 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 RefPtr< RegularlyFragmentedFieldnewField (const MultiIndex< DIMS > &FragmentNumbers, const WeakPtr< Field > &SimilarField, const string &FragmentNamePrefix="RegularFragment")
 Create a new regularly fragmented Field from an existing Field that is sufficiently fragmented.
 
static RefPtr< RegularlyFragmentedFieldnewField (const MultiIndex< DIMS > &FragmentNumbers, const RefPtr< FragmentIDCollection > &theFragmentIDCollection, const string &FragmentNamePrefix="RegularFragment")
 Create a regularly fragmented Field from a multidimensional size and an existing fragment ID collection.
 
- Static Public Member Functions inherited from Fiber::Field
static const CAB_tCreativeArrayNullPtr ()
 
static const RefPtr< Field > & NullPtrField ()
 
- Static Public Member Functions inherited from MemCore::Ageable
static const AgeableInfinitelyNew () noexcept
 
static constexpr const AgeableInfinitelyOld () noexcept
 
static age_t now () noexcept
 

Additional Inherited Members

- Public Types inherited from Fiber::Field
enum class  CreationFailAlternative { Fail , Persistent , Discardable }
 
using fragments_t = FlatMap< FragmentIndex_t, RefPtr< CreativeArrayBase > >
 
using fragment_mutex_t = MemCore::shared_mutex
 
using CAB_t = RefPtr< CreativeArrayBase >
 
typedef WeakPtr< Field, Field::reference_domain_t > WeakFieldPtr_t
 
using NamedFragment = std::pair< RefPtr< CreativeArrayBase >, RefPtr< FragmentID > >
 
using Iterator = FragmentIterator
 
using FragmentIterator_t = std::function< bool(const RefPtr< FragmentID > &, const RefPtr< CreativeArrayBase > &)>
 Callback type for functions iterating over Field fragments.
 
- 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 Attributes inherited from Fiber::Field
ListRelativeToBinder< WeakPtr< CreativeArrayBase > > UnsavedCreators
 
- Public Attributes inherited from Fiber::Ownable< Field >
std::unordered_set< MemCore::WeakPtr< Container > > Owners
 The (internal) list of owners.
 
- Public Attributes inherited from Fiber::SaveableAttributes
MemCore::Ageable LastSavedAttributes
 
- Static Public Attributes inherited from Fiber::Field
static constexpr bool use_std__flat_map_for_fragments = false
 
- Protected Member Functions inherited from Fiber::Field
const RefPtr< CreativeArrayBase > & setCreatorViaFragmentIndex (FragmentIndex_t FI, const RefPtr< CreativeArrayBase > &CAB)
 
 ~Field ()
 Destructor.
 
- Protected Attributes inherited from Fiber::Field
MemCore::shared_mutex fragment_mutex
 
fragments_t fragments
 

Detailed Description

template<Dims_t DIMS = 3>
class Fiber::RegularlyFragmentedField< DIMS >

A convenience class for optimized handling of fields that are fragmented in a regular manner (n-dimensional tiling).

Each fragment in this field can then be accessed via a multi-dimensional index.

Note that regular fragmentation of a Field merely means that there is a n-dimensional indexing scheme for each fragments, it does not imply constraints on the fragments itself. Each fragment could still have different sizes, i.e. varying number of elements, and neither is their geometrical location determined by the topology of the fragments.

Examples
XF_LineSetHierarchicalRegularized.cpp.

Constructor & Destructor Documentation

◆ RegularlyFragmentedField()

template<Dims_t DIMS = 3>
Fiber::RegularlyFragmentedField< DIMS >::RegularlyFragmentedField ( const RegularlyFragmentedField< DIMS > &  RFF)
inline

Create a new regularly fragmented field from the same fragmentation as the given field.

Uses the same dimensions and copies the FragmentIDCollection, but no data.

Member Function Documentation

◆ newField() [1/2]

template<Dims_t DIMS = 3>
static RefPtr< RegularlyFragmentedField > Fiber::RegularlyFragmentedField< DIMS >::newField ( const MultiIndex< DIMS > &  FragmentNumbers,
const RefPtr< FragmentIDCollection > &  theFragmentIDCollection,
const string &  FragmentNamePrefix = "RegularFragment" 
)
inlinestatic

Create a regularly fragmented Field from a multidimensional size and an existing fragment ID collection.

Similar to the new operator, but checks if a. the FragmentIDCollection is valid b. the number of fragments is consistent

◆ newField() [2/2]

template<Dims_t DIMS = 3>
static RefPtr< RegularlyFragmentedField > Fiber::RegularlyFragmentedField< DIMS >::newField ( const MultiIndex< DIMS > &  FragmentNumbers,
const WeakPtr< Field > &  SimilarField,
const string &  FragmentNamePrefix = "RegularFragment" 
)
inlinestatic

Create a new regularly fragmented Field from an existing Field that is sufficiently fragmented.

There provided field must provide exactly the same number of fragments as specified in the multi-dimensional FragmentNumbers parameter. If this is not the case then this function will return a NullPtr().

Create a new regularly fragmented field compatible with the existing field if such was given, otherwise create a new one with its own new fragment ID collection. This function will return a nullptr if the give field has a fragment size different from the new fragmentnumbers.

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

◆ operator[]()

Return a writable pointer with the data container for this multiindex.

This function does not validate the given index, use the validate() function in development code.