1 #ifndef INMOST_DATA_H_INCLUDED
2 #define INMOST_DATA_H_INCLUDED
4 #include "inmost_common.h"
5 #if defined(USE_AUTODIFF)
6 #include "inmost_expression.h"
8 #include "inmost_dense.h"
28 typedef INMOST_DATA_BULK_TYPE ElementType;
29 static const ElementType NONE = 0x00;
30 static const ElementType NODE = 0x01;
31 static const ElementType EDGE = 0x02;
32 static const ElementType FACE = 0x04;
33 static const ElementType CELL = 0x08;
34 static const ElementType ESET = 0x10;
35 static const ElementType MESH = 0x20;
36 #define NUM_ELEMENT_TYPS 6
38 __INLINE
bool OneType (ElementType t) {
return t > 0 && (t & (t-1)) == 0;}
39 __INLINE ElementType FirstElementType () {
return NODE;}
40 __INLINE ElementType LastElementType () {
return MESH << 1;}
41 __INLINE ElementType NextElementType (ElementType etype) {
return etype << 1;}
42 __INLINE ElementType PrevElementType (ElementType etype) {
return etype >> 1;}
43 __INLINE ElementType ElementTypeFromDim (INMOST_DATA_INTEGER_TYPE dim) {
return 1 << dim;}
44 const char * ElementTypeName (ElementType t);
45 __INLINE INMOST_DATA_INTEGER_TYPE ElementNum (ElementType t)
47 unsigned int v =
static_cast<unsigned int>(t);
49 static const unsigned int b[] = {0xAAAAAAAA, 0xCCCCCCCC, 0xF0F0F0F0};
50 unsigned int r = (v & b[0]) != 0;
53 r |= ((v & b[2]) != 0) << 2;
54 r |= ((v & b[1]) != 0) << 1;
55 return static_cast<INMOST_DATA_INTEGER_TYPE
>(r);
62 typedef INMOST_DATA_ENUM_TYPE MarkerType;
64 static const INMOST_DATA_ENUM_TYPE MarkerFields = 16;
66 static const INMOST_DATA_ENUM_TYPE MarkerFieldsPrivate = 4;
68 static const INMOST_DATA_ENUM_TYPE MarkerPrivateBit =
static_cast<INMOST_DATA_ENUM_TYPE
>(1) << (
sizeof(INMOST_DATA_ENUM_TYPE)*8-1);
70 static const INMOST_DATA_ENUM_TYPE MarkerMask =
static_cast<INMOST_DATA_BULK_TYPE
>(-1);
72 static const INMOST_DATA_ENUM_TYPE MarkerShift =
sizeof(INMOST_DATA_BULK_TYPE)*8;
73 __INLINE
static bool isPrivate (MarkerType n) {
return (n & MarkerPrivateBit) == MarkerPrivateBit;}
74 __INLINE
static MarkerType InvalidMarker (){
return ENUMUNDEF;}
80 typedef INMOST_DATA_ENUM_TYPE HandleType;
81 static const INMOST_DATA_ENUM_TYPE handle_etype_bits = 3;
82 static const INMOST_DATA_ENUM_TYPE handle_etype_shift =
sizeof(HandleType)*8-handle_etype_bits;
83 static const INMOST_DATA_ENUM_TYPE handle_id_mask = (
static_cast<INMOST_DATA_ENUM_TYPE
>(1) << handle_etype_shift)-1;
85 static const INMOST_DATA_ENUM_TYPE chunk_bits_elems = 13;
86 static const INMOST_DATA_ENUM_TYPE chunk_bits_empty = 8;
87 static const INMOST_DATA_ENUM_TYPE chunk_bits_tags = 6;
88 static const INMOST_DATA_ENUM_TYPE chunk_bits_dense = 6;
90 __INLINE HandleType InvalidHandle () {
return 0;}
91 __INLINE INMOST_DATA_INTEGER_TYPE GetHandleID (HandleType h) {
return (h & handle_id_mask)-1;}
92 __INLINE INMOST_DATA_INTEGER_TYPE GetHandleElementNum (HandleType h) {
return h >> handle_etype_shift;}
93 __INLINE ElementType GetHandleElementType(HandleType h) {
return 1 << GetHandleElementNum(h);}
94 __INLINE HandleType ComposeHandle (ElementType etype, INMOST_DATA_INTEGER_TYPE ID) {
return ID == -1 ? InvalidHandle() : ((ElementNum(etype) << handle_etype_shift) + (1+ID));}
95 __INLINE HandleType ComposeCellHandle (INMOST_DATA_INTEGER_TYPE ID) {
return ID == -1 ? InvalidHandle() : ((ElementNum(CELL) << handle_etype_shift) + (1+ID));}
96 __INLINE HandleType ComposeFaceHandle (INMOST_DATA_INTEGER_TYPE ID) {
return ID == -1 ? InvalidHandle() : ((ElementNum(FACE) << handle_etype_shift) + (1+ID));}
97 __INLINE HandleType ComposeEdgeHandle (INMOST_DATA_INTEGER_TYPE ID) {
return ID == -1 ? InvalidHandle() : ((ElementNum(EDGE) << handle_etype_shift) + (1+ID));}
98 __INLINE HandleType ComposeNodeHandle (INMOST_DATA_INTEGER_TYPE ID) {
return ID == -1 ? InvalidHandle() : ((ElementNum(NODE) << handle_etype_shift) + (1+ID));}
99 __INLINE HandleType ComposeSetHandle (INMOST_DATA_INTEGER_TYPE ID) {
return ID == -1 ? InvalidHandle() : ((ElementNum(ESET) << handle_etype_shift) + (1+ID));}
100 __INLINE HandleType ComposeHandleNum (INMOST_DATA_INTEGER_TYPE etypenum, INMOST_DATA_INTEGER_TYPE ID) {
return ID == -1 ? InvalidHandle() : ((etypenum << handle_etype_shift) + (1+ID));}
101 __INLINE
bool isValidHandle (HandleType h) {
return h != 0;}
106 typedef std::pair<Mesh*,HandleType> RemoteHandleType;
108 Element MakeElement (
const RemoteHandleType & rh);
110 Element MakeElementRef (RemoteHandleType & rh);
114 #if defined(USE_AUTODIFF)
115 typedef array<variable> inner_variable_array;
117 typedef array<INMOST_DATA_REAL_TYPE> inner_real_array;
118 typedef array<INMOST_DATA_INTEGER_TYPE>
120 typedef array<INMOST_DATA_BULK_TYPE> inner_bulk_array;
121 typedef array<HandleType> inner_reference_array;
122 typedef array<RemoteHandleType> inner_remote_reference_array;
130 DATA_REMOTE_REFERENCE = 4,
131 #if defined(USE_AUTODIFF)
137 const char * DataTypeName (DataType t);
157 INMOST_DATA_ENUM_TYPE pos[NUM_ELEMENT_TYPS];
163 INMOST_MPI_Type bulk_data_type;
166 INMOST_DATA_ENUM_TYPE size;
168 INMOST_DATA_ENUM_TYPE bytes_size;
171 bool sparse[NUM_ELEMENT_TYPS];
174 INMOST_DATA_ENUM_TYPE record_size;
198 Tag (
Mesh * m,std::string name, DataType _dtype, INMOST_DATA_ENUM_TYPE size);
199 __INLINE INMOST_DATA_ENUM_TYPE GetRecordSize()
const;
200 __INLINE
void SetSize(INMOST_DATA_ENUM_TYPE size);
201 __INLINE
void SetPosition(INMOST_DATA_ENUM_TYPE pos, ElementType type);
202 __INLINE INMOST_DATA_ENUM_TYPE GetPosition(ElementType type)
const;
203 __INLINE
void SetSparse(ElementType type);
204 __INLINE INMOST_DATA_ENUM_TYPE GetPositionByDim(INMOST_DATA_ENUM_TYPE typenum)
const;
205 __INLINE
void ChangeName(std::string newname);
210 __INLINE
bool operator <(
const Tag & other)
const;
211 __INLINE
bool operator >(
const Tag & other)
const;
212 __INLINE
bool operator ==(
const Tag & other)
const;
213 __INLINE
bool operator !=(
const Tag & other)
const;
214 __INLINE
Tag & operator =(
Tag const & other);
215 __INLINE DataType GetDataType()
const;
216 __INLINE INMOST_MPI_Type GetBulkDataType()
const;
224 __INLINE INMOST_DATA_ENUM_TYPE GetSize()
const;
225 __INLINE std::string GetTagName()
const;
226 __INLINE
bool isDefined(ElementType type)
const;
227 __INLINE
bool isDefinedMask(ElementType mask)
const;
228 __INLINE
bool isSparse(ElementType type)
const;
229 __INLINE
bool isValid()
const;
230 __INLINE
Mesh * GetMeshLink()
const;
231 __INLINE
bool isSparseByDim(INMOST_DATA_INTEGER_TYPE typenum)
const;
232 __INLINE
bool isDefinedByDim(INMOST_DATA_INTEGER_TYPE typenum)
const;
233 __INLINE
void SetBulkDataType(INMOST_MPI_Type type);
234 __INLINE
void SetPrint(
bool print);
235 __INLINE
bool GetPrint()
const;
259 typedef tag_array_type::iterator iteratorTag;
269 Tag CreateTag(
Mesh * m, std::string name, DataType dtype, ElementType etype, ElementType sparse, INMOST_DATA_ENUM_TYPE size = ENUMUNDEF);
275 bool RenameTag(std::string oldname, std::string newname);
278 void ReallocateData(
const Tag & t, INMOST_DATA_INTEGER_TYPE etypenum,INMOST_DATA_ENUM_TYPE new_size);
280 void ReallocateData(INMOST_DATA_INTEGER_TYPE etypenum, INMOST_DATA_ENUM_TYPE new_size);
290 static void CopyData(
const Tag & t,
void * adata,
const void * bdata);
294 typedef tag_array_type::iterator tag_iterator;
295 typedef tag_array_type::const_iterator tag_const_iterator;
313 typedef INMOST_DATA_REAL_TYPE
real;
317 typedef INMOST_DATA_BULK_TYPE
bulk;
330 #if defined(USE_AUTODIFF)
345 void push_back(
const Storage & elem);
347 Element operator[] (size_type n);
348 Element operator[] (size_type n)
const;
408 const_reverse_iterator rbegin()
const {
return const_reverse_iterator(m,shell<HandleType>::rbegin());}
409 iterator end() {
return iterator(m,shell<HandleType>::end());}
410 const_iterator end()
const {
return const_iterator(m,shell<HandleType>::end());}
411 reverse_iterator rend() {
return reverse_iterator(m,shell<HandleType>::rend());}
412 const_reverse_iterator rend()
const {
return const_reverse_iterator(m,shell<HandleType>::rend());}
413 void SetMeshLink(Mesh * new_m) {m = new_m;}
415 Element back()
const;
417 Element front()
const;
418 iterator erase(iterator it) {
return iterator(m, shell<reference>::erase(it)); }
428 void push_back(
const Storage & elem);
430 Element operator[] (size_type n);
431 Element operator[] (size_type n)
const;
472 HandleType * handle_link;
476 Storage(
const Storage & other) : handle(other.handle), handle_link(other.handle_link), m_link(other.m_link) {}
477 Storage(
Mesh * mesh, HandleType handle) : handle(handle), handle_link(NULL), m_link(mesh) {}
479 Storage(
Mesh * mesh, HandleType * handle) : handle(*handle), handle_link(handle), m_link(mesh) {}
483 __INLINE
bool operator < (
const Storage & other)
const {
return handle < other.handle;}
484 __INLINE
bool operator > (
const Storage & other)
const {
return handle > other.handle;}
485 __INLINE
bool operator <= (
const Storage & other)
const {
return handle <= other.handle;}
486 __INLINE
bool operator >= (
const Storage & other)
const {
return handle >= other.handle;}
487 __INLINE
bool operator == (
const Storage & other)
const {
return handle == other.handle;}
488 __INLINE
bool operator != (
const Storage & other)
const {
return handle != other.handle;}
489 __INLINE Storage * operator-> () {
return this;}
490 __INLINE
const Storage * operator-> ()
const {
return this;}
491 __INLINE Storage &
self () {
return *
this;}
492 __INLINE
const Storage &
self ()
const {
return *
this;}
493 virtual ~Storage() {}
497 __INLINE
real &
Real (
const Tag & tag)
const;
503 __INLINE
bulk &
Bulk (
const Tag & tag)
const;
530 __INLINE
real_array RealArrayDF (
const Tag & tag)
const;
531 __INLINE
integer_array IntegerArrayDF (
const Tag & tag)
const;
532 __INLINE
bulk_array BulkArrayDF (
const Tag & tag)
const;
533 __INLINE reference_array ReferenceArrayDF (
const Tag & tag)
const;
534 __INLINE remote_reference_array RemoteReferenceArrayDF(
const Tag & tag)
const;
535 __INLINE
real & RealDF (
const Tag & tag)
const;
536 __INLINE
integer & IntegerDF (
const Tag & tag)
const;
537 __INLINE
bulk & BulkDF (
const Tag & tag)
const;
538 __INLINE
reference & ReferenceDF (
const Tag & tag)
const;
542 __INLINE
real_array RealArrayDV (
const Tag & tag)
const;
543 __INLINE
integer_array IntegerArrayDV (
const Tag & tag)
const;
544 __INLINE
bulk_array BulkArrayDV (
const Tag & tag)
const;
545 __INLINE reference_array ReferenceArrayDV (
const Tag & tag)
const;
546 __INLINE remote_reference_array RemoteReferenceArrayDV(
const Tag & tag)
const;
547 __INLINE
real & RealDV (
const Tag & tag)
const;
548 __INLINE
integer & IntegerDV (
const Tag & tag)
const;
549 __INLINE
bulk & BulkDV (
const Tag & tag)
const;
550 __INLINE
reference & ReferenceDV (
const Tag & tag)
const;
552 #if defined(USE_AUTODIFF)
555 __INLINE
var & VariableDF (
const Tag & tag)
const;
556 __INLINE
var & VariableDV (
const Tag & tag)
const;
559 __INLINE
var_array VariableArrayDF (
const Tag & tag)
const;
560 __INLINE
var_array VariableArrayDV (
const Tag & tag)
const;
568 __INLINE INMOST_DATA_ENUM_TYPE
GetDataSize (
const Tag & tag)
const;
574 __INLINE INMOST_DATA_ENUM_TYPE
GetDataCapacity (
const Tag & tag)
const;
581 INMOST_DATA_ENUM_TYPE new_size)
const;
591 __INLINE
void GetData (
const Tag & tag,
592 INMOST_DATA_ENUM_TYPE shift,
593 INMOST_DATA_ENUM_TYPE size,
595 __INLINE
void SetData (
const Tag & tag,
596 INMOST_DATA_ENUM_TYPE shift,
597 INMOST_DATA_ENUM_TYPE size,
598 const void * data)
const;
599 __INLINE
void DelData (
const Tag & tag)
const;
605 __INLINE
bool HaveData (
const Tag & tag)
const;
606 __INLINE ElementType GetElementType ()
const;
607 __INLINE
integer GetElementNum ()
const;
608 __INLINE
void SetMarker (MarkerType n)
const;
609 __INLINE
bool GetMarker (MarkerType n)
const;
610 __INLINE
void RemMarker (MarkerType n)
const;
611 __INLINE
void SetPrivateMarker (MarkerType n)
const;
612 __INLINE
bool GetPrivateMarker (MarkerType n)
const;
613 __INLINE
void RemPrivateMarker (MarkerType n)
const;
614 __INLINE
void ClearMarkerSpace ()
const;
615 __INLINE
void GetMarkerSpace (
bulk copy[MarkerFields])
const;
616 __INLINE
void SetMarkerSpace (
bulk source[MarkerFields])
const;
617 __INLINE
integer LocalID ()
const;
621 __INLINE
bool isValid ()
const;
622 __INLINE Mesh * GetMeshLink ()
const;
623 __INLINE HandleType GetHandle ()
const;
624 __INLINE Element getAsElement ()
const;
625 __INLINE Node getAsNode ()
const;
626 __INLINE Edge getAsEdge ()
const;
627 __INLINE Face getAsFace ()
const;
628 __INLINE Cell getAsCell ()
const;
629 __INLINE ElementSet getAsSet ()
const;
643 TagReal & operator = (
TagReal const & b) {Tag::operator =(b);
return *
this;}
644 TagReal & operator = (
Tag const & b) {Tag::operator =(b);
return *
this;}
656 TagInteger & operator = (
Tag const & b) {Tag::operator =(b);
return *
this;}
667 TagBulk & operator = (
TagBulk const & b) {Tag::operator =(b);
return *
this;}
668 TagBulk & operator = (
Tag const & b) {Tag::operator =(b);
return *
this;}
680 TagReference & operator = (
Tag const & b) {Tag::operator =(b);
return *
this;}
693 TagRealArray & operator = (
Tag const & b) {Tag::operator =(b);
return *
this;}
699 assert((
int)data.size() == n*m);
724 TagBulkArray & operator = (
Tag const & b) {Tag::operator =(b);
return *
this;}
741 #if defined(USE_AUTODIFF)
749 TagVariable & operator = (
Tag const & b) {Tag::operator =(b);
return *
this;}
751 __INLINE
Storage::var & operator [](HandleType h)
const;
767 assert((
int)data.size() == n*m);
778 __INLINE INMOST_DATA_ENUM_TYPE Tag::GetRecordSize()
const
780 return mem->record_size;
783 __INLINE
void Tag::SetSize(INMOST_DATA_ENUM_TYPE size)
788 __INLINE
void Tag::SetPosition(INMOST_DATA_ENUM_TYPE pos,
791 assert(type != NONE);
792 mem->pos[ElementNum(type)] = pos;
795 __INLINE INMOST_DATA_ENUM_TYPE Tag::GetPosition(ElementType type)
const
798 assert(type != NONE);
799 return mem->pos[ElementNum(type)];
802 __INLINE
void Tag::SetSparse(ElementType type)
804 assert(type != NONE);
805 mem->sparse[ElementNum(type)] =
true;
808 __INLINE
void Tag::SetPrint(
bool print)
810 mem->print_tag = print;
813 __INLINE
bool Tag::GetPrint()
const
815 return mem->print_tag;
818 __INLINE INMOST_DATA_ENUM_TYPE Tag::GetPositionByDim(INMOST_DATA_ENUM_TYPE typenum)
const
820 return mem->pos[typenum];
823 __INLINE
bool Tag::operator <(
const Tag & other)
const
826 return mem->tagname < other.mem->tagname;
831 __INLINE
bool Tag::operator >(
const Tag & other)
const
834 return mem->tagname > other.mem->tagname;
839 __INLINE
bool Tag::operator ==(
const Tag & other)
const
842 return mem->tagname == other.mem->tagname;
847 __INLINE
bool Tag::operator !=(
const Tag & other)
const
850 return mem->tagname != other.mem->tagname;
855 __INLINE Tag & Tag::operator =(Tag
const & other)
861 __INLINE DataType Tag::GetDataType()
const
867 __INLINE INMOST_MPI_Type Tag::GetBulkDataType()
const
870 return mem->bulk_data_type;
876 return mem->bytes_size;
878 __INLINE INMOST_DATA_ENUM_TYPE Tag::GetSize()
const
883 __INLINE std::string Tag::GetTagName()
const
888 __INLINE
bool Tag::isDefined(ElementType type)
const
891 assert(OneType(type));
892 return GetPosition(type) != ENUMUNDEF;
894 __INLINE
bool Tag::isDefinedMask(ElementType mask)
const
898 for(ElementType etype = NODE; etype <= MESH; etype = NextElementType(etype))
899 if( etype & mask ) ret &= isDefined(etype&mask);
902 __INLINE
bool Tag::isSparse(ElementType type)
const
905 assert(OneType(type));
906 return mem->sparse[ElementNum(type)];
908 __INLINE
bool Tag::isValid()
const
912 __INLINE Mesh * Tag::GetMeshLink()
const
917 __INLINE
bool Tag::isSparseByDim(INMOST_DATA_INTEGER_TYPE typenum)
const
920 return mem->sparse[typenum];
922 __INLINE
bool Tag::isDefinedByDim(INMOST_DATA_INTEGER_TYPE typenum)
const
925 return GetPositionByDim(typenum) != ENUMUNDEF;
927 __INLINE
void Tag::SetBulkDataType(INMOST_MPI_Type type)
930 assert(mem->dtype == DATA_BULK );
931 mem->bulk_data_type = type;
Class for linear algebra operations on dense matrices.
Storage type for representing arrays of Element references.
Storage type for representing arrays of Element references on another Mesh.
Base class for Mesh, Element, and ElementSet classes.
__INLINE integer & Integer(const Tag &tag) const
Retrieve integer value associated with Tag.
Storage & operator=(Storage const &other)
If there is a link to handle provided (automatically by ElementArray and reference_array),...
RemoteHandleType remote_reference
Storage type for representing references to Element in another Mesh.
variable var
Storage type for representing real value with vector of variations.
__INLINE void DelDenseData(const Tag &tag) const
Frees variable array or fills field with zeroes.
__INLINE var_array VariableArray(const Tag &tag) const
Retrieve array of variables associated with Tag.
shell< real > real_array
Storage type for representing arrays of real values.
__INLINE INMOST_DATA_ENUM_TYPE GetDataCapacity(const Tag &tag) const
Return the size of the structure required to represent the data on current element.
shell< integer > integer_array
Storage type for representing arrays of integer values.
__INLINE var & Variable(const Tag &tag) const
Retrieve variable reference associated with Tag.
__INLINE bulk_array BulkArray(const Tag &tag) const
Retrieve abstract data associated with Tag as a series of bytes.
shell< bulk > bulk_array
Storage type for representing abstract data as a series of bytes.
shell< variable > var_array
Storage type for representing array of values with vectors of variations.
__INLINE remote_reference_array RemoteReferenceArray(const Tag &tag) const
Retrieve array of Element references associated with Tag.
__INLINE reference & Reference(const Tag &tag) const
Retrieve Element reference associated with Tag.
INMOST_DATA_REAL_TYPE real
Storage type for representing real values.
HandleType reference
Storage type for representing references to Element.
__INLINE integer_array IntegerArray(const Tag &tag) const
Retrieve array of integer values associated with Tag.
Storage(Mesh *mesh, HandleType *handle)
This constructor allows for remote handle modification.
__INLINE remote_reference & RemoteReference(const Tag &tag) const
Retrieve remote Element reference associated with Tag.
__INLINE void GetData(const Tag &tag, INMOST_DATA_ENUM_TYPE shift, INMOST_DATA_ENUM_TYPE size, void *data) const
Extract part of the data associated with Tag.
__INLINE void SetDataSize(const Tag &tag, INMOST_DATA_ENUM_TYPE new_size) const
Set the length of data associated with Tag.
__INLINE real & Real(const Tag &tag) const
Retrieve real value associated with Tag.
__INLINE reference_array ReferenceArray(const Tag &tag) const
Retrieve array of Element references associated with Tag.
__INLINE bulk & Bulk(const Tag &tag) const
Retrieve one byte of abstract data associated with Tag.
__INLINE real_array RealArray(const Tag &tag) const
Retrieve array of real values associated with Tag.
__INLINE INMOST_DATA_ENUM_TYPE GetDataSize(const Tag &tag) const
Return the data length associated with Tag.
INMOST_DATA_ENUM_TYPE enumerator
type for representing unsigned integer values.
INMOST_DATA_BULK_TYPE bulk
Storage type for representing one byte of abstract data.
__INLINE integer DataLocalID() const
This number is guaranteed to be between 0 and Mesh::NumberOf(type of element) after Mesh::ReorderEmpt...
__INLINE bool DelSparseData(const Tag &tag) const
Deallocates space allocated for sparse data, frees variable array if necessary.
__INLINE bool HaveData(const Tag &tag) const
Check if any data is associated with Tag.
INMOST_DATA_INTEGER_TYPE integer
Storage type for representing integer values.
bool RenameTag(std::string oldname, std::string newname)
Change tag name.
static void CopyData(const Tag &t, void *adata, const void *bdata)
Copy data from one element to another.
void ReallocateData(INMOST_DATA_INTEGER_TYPE etypenum, INMOST_DATA_ENUM_TYPE new_size)
Reallocate all the data for all the tags.
__INLINE sparse_sub_type const & GetSparseData(int etypenum, int local_id) const
Retrieve substructure for representation of the sparse data without permission for modification.
Tag GetTag(std::string name) const
Retrieve a data tag by it's name.
bool ElementDefined(Tag const &tag, ElementType etype) const
Check that the tag was defined on certain elements.
void ReallocateData(const Tag &t, INMOST_DATA_INTEGER_TYPE etypenum, INMOST_DATA_ENUM_TYPE new_size)
Shrink or enlarge arrays for a dense data.
void ListTagNames(std::vector< std::string > &list) const
Retrieve names for all the tags present on the mesh.
static void DestroyVariableData(const Tag &t, void *adata)
Destroy data that represents array of variable size.
__INLINE sparse_sub_type & GetSparseData(int etypenum, int local_id)
Retrieve substructure for representation of the sparse data.
Tag CreateTag(Mesh *m, std::string name, DataType dtype, ElementType etype, ElementType sparse, INMOST_DATA_ENUM_TYPE size=ENUMUNDEF)
Create tag with prescribed attributes.
__INLINE dense_sub_type const & GetDenseData(int pos) const
Retrieve substructure for representation of the dense data without permission for modification.
__INLINE dense_sub_type & GetDenseData(int pos)
Retrieve substructure for representation of the dense data.
virtual Tag DeleteTag(Tag tag, ElementType mask)
Delete tag from certain elements.
bool HaveTag(std::string name) const
Check existence of a data tag by it's name.
This class is a data container for class Tag, contains all the necessary information to access mesh d...
~TagMemory()
Destructor should not do anything.
TagMemory & operator=(TagMemory const &other)
Assignment operator should not be ever used, but is here for convinience.
TagMemory(Mesh *m, const TagMemory &other)
Copy constructor, copies all the data except for m_link.
Helper classes for class Tag //.
This class provides the access to the individual mesh datum and general information about it.
INMOST_DATA_ENUM_TYPE GetPackedBytesSize() const
Amount of bytes necessary for one record in packed form that is used in GetData.
__INLINE INMOST_DATA_ENUM_TYPE GetBytesSize() const
Amount of bytes necessary to support one record referred by the tag on one element.
A class that represents a variable with multiple first order variations.