1#ifndef __FIBER_FIELD_FRAGMENTIDCOLLECTION_HPP
2#define __FIBER_FIELD_FRAGMENTIDCOLLECTION_HPP
5#include <memcore/RefPtr.hpp>
8#include "FragmentID.hpp"
9#include "DynamicSize.hpp"
32 return myFragmentIDs->get_vector();
35 template <Dims_t DIMS>
45 FragmentIDs()[ FragmentIndex ] =
new FragmentID(FragmentName,
int(FragmentIndex), self() );
46 FragmentNames[ FragmentName ] = FragmentIndex;
64 return myFragmentIDs->get_vector();
93 return getFragmentIDs().size();
101 return myFragmentLayout;
106 if (!myFragmentLayout.
isValid())
return false;
108 return myFragmentLayout.getNumberOfElements() == NumberOfFragmentIDs();
114 template <Dims_t DIMS>
117 if (myFragmentLayout.
isValid())
return false;
118 if (NumberOfFragmentIDs()>0)
return false;
120 myFragmentLayout.
resize(NumberOfFragments);
127 template <Dims_t DIMS>
130 , myFragmentLayout( NumberOfFragments )
139 RefPtr<FragmentID>& makeFragmentID(
const string&Name);
140 FragmentIndex_t findNumericalIDByName(
const string&Name)
const;
145 unsigned iterate(
const std::function<
bool(
const RefPtr<FragmentID>&,
int,
const std::string&)>&F)
const;
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
A class describing an n-dimensional space at runtime.
Definition field/DynamicSize.hpp:29
bool isValid() const
Check if some size has been defined here.
Definition field/DynamicSize.hpp:261
DynamicSize & resize(const MultiIndex< N > &MI)
Set a new size from the given MultiIndex.
Definition field/DynamicSize.hpp:129
Convenience base class.
Definition FragmentIDCollection.hpp:153
A collection of fragment identifiers with bijective mapping to an integer fragment number.
Definition FragmentIDCollection.hpp:19
const DynamicSize & getFragmentLayout() const
Get the current fragment layout.
Definition FragmentIDCollection.hpp:99
bool setFragmentLayout(const MultiIndex< DIMS > &NumberOfFragments, const string &FragmentNamePrefix)
Set the fragment layout.
Definition FragmentIDCollection.hpp:115
size_t NumberOfFragmentIDs() const
Get the number of fragment ID's managed here.
Definition FragmentIDCollection.hpp:91
const FragmentIDs_t & getFragmentIDs() const
get a vector of fragment id's
Definition FragmentIDCollection.hpp:61
Identification information about a field's fragment.
Definition FragmentID.hpp:42
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
string to_string(const Eagle::FixedArray< ElementType, N > &A, const char *OpenBrace="{", const char *CloseBrace="}", const char *Separator=",")