2 #ifndef INMOST_AUTODIFF_H_INCLUDED
3 #define INMOST_AUTODIFF_H_INCLUDED
5 #include "inmost_common.h"
6 #include "inmost_mesh.h"
8 #if defined(USE_AUTODIFF) && defined(USE_MESH)
16 template<>
struct Demote<INMOST_DATA_INTEGER_TYPE> {
typedef INMOST_DATA_INTEGER_TYPE type;};
17 template<>
struct Demote<INMOST_DATA_REAL_TYPE> {
typedef INMOST_DATA_REAL_TYPE type;};
31 INMOST_DATA_ENUM_TYPE reg_index;
37 AbstractEntry(ElementType etype = NONE, MarkerType mask = 0,
bool inverse =
false)
38 : reg_index(ENUMUNDEF), offset_tag(
Tag()), mask(mask), inverse_mask(inverse), etype(etype) {}
44 void SetMask(MarkerType _mask,
bool inverse =
false) {mask = _mask; inverse_mask = inverse;}
54 bool isValid(
const Storage & e)
const {
return reg_index != ENUMUNDEF && offset_tag.isDefined(e.GetElementType()) && (e.GetElementType() & etype) && (mask == 0 || (e->GetMarker(mask) ^ inverse_mask));}
57 virtual INMOST_DATA_REAL_TYPE
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const = 0;
60 virtual INMOST_DATA_REAL_TYPE &
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos) = 0;
64 virtual INMOST_DATA_ENUM_TYPE
Index(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const = 0;
92 virtual INMOST_DATA_ENUM_TYPE
Size()
const = 0;
98 virtual INMOST_DATA_ENUM_TYPE
Size(
const Storage & e)
const = 0;
100 virtual INMOST_DATA_ENUM_TYPE
GetValueComp(INMOST_DATA_ENUM_TYPE unk)
const = 0;
125 std::vector<TagRealArray> unknown_tags;
126 std::vector<INMOST_DATA_ENUM_TYPE> unknown_comp;
131 void ClearTags() { unknown_tags.clear(); unknown_comp.clear(); }
135 void AddTag(
Tag value, INMOST_DATA_ENUM_TYPE comp = ENUMUNDEF);
137 INMOST_DATA_REAL_TYPE
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const {
return unknown_tags[pos][e][unknown_comp[pos]];}
139 INMOST_DATA_REAL_TYPE &
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos) {
return unknown_tags[pos][e][unknown_comp[pos]];}
157 INMOST_DATA_ENUM_TYPE
Size()
const {
return (INMOST_DATA_ENUM_TYPE)unknown_tags.size();}
161 INMOST_DATA_ENUM_TYPE ret = 0;
162 for(
unsigned k = 0; k < unknown_tags.size(); ++k)
163 if( e.
HaveData(unknown_tags[k]) ) ret++;
167 INMOST_DATA_ENUM_TYPE
GetValueComp(INMOST_DATA_ENUM_TYPE unk)
const {
return unknown_comp[unk];}
179 INMOST_DATA_ENUM_TYPE unknown_comp;
182 SingleEntry(ElementType etype = NONE, MarkerType mask = 0,
bool inverse =
false) :
AbstractEntry(etype, mask, inverse) { unknown_comp = 0; }
184 SingleEntry(ElementType etype, MarkerType mask,
bool inverse,
Tag unknown_tag, INMOST_DATA_ENUM_TYPE unknown_comp = 0) :
AbstractEntry(etype,mask,inverse), unknown_tag(unknown_tag), unknown_comp(unknown_comp) {}
186 void SetTag(
Tag unknown_tag_in, INMOST_DATA_ENUM_TYPE unknown_comp_in = 0) {unknown_tag = unknown_tag_in; unknown_comp = unknown_comp_in;}
188 INMOST_DATA_REAL_TYPE
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const {(void)pos; assert(pos==0);
return unknown_tag[e][unknown_comp];}
190 INMOST_DATA_REAL_TYPE &
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos) {(void)pos; assert(pos==0);
return unknown_tag[e][unknown_comp];}
208 INMOST_DATA_ENUM_TYPE
Size()
const {
return 1;}
212 INMOST_DATA_ENUM_TYPE
GetValueComp(INMOST_DATA_ENUM_TYPE unk)
const {(void)unk; assert(unk == 0);
return unknown_comp;}
230 void SetTag(
Tag unknown_tag_in) {unknown_tag = unknown_tag_in;}
232 INMOST_DATA_REAL_TYPE
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const {assert(pos<unknown_tag[e].size());
return unknown_tag[e][pos];}
234 INMOST_DATA_REAL_TYPE &
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos) {assert(pos<unknown_tag[e].size());
return unknown_tag[e][pos];}
236 INMOST_DATA_ENUM_TYPE
Index(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const {assert(pos<unknown_tag[e].size());
return isValid(e) ?
GetOffsetTag()[e]+pos : ENUMUNDEF;}
250 INMOST_DATA_ENUM_TYPE
MatrixSize(
const Storage & e)
const {
return (INMOST_DATA_ENUM_TYPE)unknown_tag[e].size();}
252 INMOST_DATA_ENUM_TYPE
Size()
const {
return 1;}
254 INMOST_DATA_ENUM_TYPE
Size(
const Storage & e)
const {
return e.
HaveData(unknown_tag) ? (INMOST_DATA_ENUM_TYPE)unknown_tag[e].size() : 0;}
256 INMOST_DATA_ENUM_TYPE
GetValueComp(INMOST_DATA_ENUM_TYPE unk)
const {(void)unk; assert(unk==0);
return ENUMUNDEF;}
270 std::vector<TagRealArray> unknown_tags;
271 std::vector<INMOST_DATA_ENUM_TYPE> unknown_comp;
273 std::vector< std::vector<bool> > status_tbl;
280 StatusBlockEntry(ElementType etype, MarkerType mask,
bool inverse,
TagInteger status_tag,
const std::vector< std::vector<bool> > & status_tbl) :
AbstractEntry(etype,mask,inverse), status_tag(status_tag), status_tbl(status_tbl) {}
282 void ClearTags() { unknown_tags.clear(); unknown_comp.clear(); }
286 void AddTag(
Tag value, INMOST_DATA_ENUM_TYPE comp = ENUMUNDEF);
288 void AddStatus(
const std::vector<bool> & stat) {status_tbl.push_back(stat);}
292 INMOST_DATA_REAL_TYPE
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const {
return unknown_tags[pos][e][unknown_comp[pos]];}
294 INMOST_DATA_REAL_TYPE &
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos) {
return unknown_tags[pos][e][unknown_comp[pos]];}
296 INMOST_DATA_ENUM_TYPE
Index(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const {
return isValid(e) && status_tbl[status_tag[e]][pos] ?
GetOffsetTag()[e]+pos : ENUMUNDEF;}
312 INMOST_DATA_ENUM_TYPE
Size()
const {
return (INMOST_DATA_ENUM_TYPE)unknown_tags.size();}
316 INMOST_DATA_ENUM_TYPE
GetValueComp(INMOST_DATA_ENUM_TYPE unk)
const {
return unknown_comp[unk];}
332 std::vector<AbstractEntry *> entries;
337 ~MultiEntry() {
for(
unsigned k = 0; k < entries.size(); ++k)
delete entries[k];}
345 INMOST_DATA_ENUM_TYPE
NumEntries()
const {
return (INMOST_DATA_ENUM_TYPE)entries.size();}
347 INMOST_DATA_REAL_TYPE
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const;
349 INMOST_DATA_REAL_TYPE &
Value(
const Storage & e, INMOST_DATA_ENUM_TYPE pos);
351 INMOST_DATA_ENUM_TYPE
Index(
const Storage & e, INMOST_DATA_ENUM_TYPE pos)
const;
367 INMOST_DATA_ENUM_TYPE
Size()
const {INMOST_DATA_ENUM_TYPE ret = 0;
for(
unsigned k = 0; k < entries.size(); ++k) ret += entries[k]->
Size();
return ret;}
369 INMOST_DATA_ENUM_TYPE
Size(
const Storage & e)
const {INMOST_DATA_ENUM_TYPE ret = 0;
for(
unsigned k = 0; k < entries.size(); ++k) ret += entries[k]->
Size(e);
return ret;}
375 Mesh *
GetMeshLink()
const {assert(!entries.empty());
return entries.back()->GetMeshLink();}
394 typedef std::vector<AbstractEntry *> blk_enum;
395 typedef std::vector<INMOST_DATA_ENUM_TYPE> del_enum;
396 typedef std::vector<bool> act_enum;
402 INMOST_DATA_ENUM_TYPE first_num;
403 INMOST_DATA_ENUM_TYPE last_num;
423 __INLINE INMOST_DATA_ENUM_TYPE
GetLastIndex()
const {
return last_num; }
431 INMOST_DATA_ENUM_TYPE
RegisterTag(
Tag t, ElementType typemask, MarkerType domain_mask = 0,
bool inverse =
false);
458 __INLINE
bool isRegisteredEntry(INMOST_DATA_ENUM_TYPE ind)
const {
return reg_blocks[ind] != NULL;}
460 INMOST_DATA_ENUM_TYPE
GetIndex(
const Storage & e, INMOST_DATA_ENUM_TYPE reg_index, INMOST_DATA_ENUM_TYPE pos = 0)
const {
return GetEntry(reg_index).
Index(e,pos);}
462 INMOST_DATA_REAL_TYPE
GetValue(
const Storage & e, INMOST_DATA_ENUM_TYPE reg_index, INMOST_DATA_ENUM_TYPE pos = 0)
const {
return GetEntry(reg_index).
Value(e,pos);}
This class is used to organize unknowns in abstract way, it should be registered with and managed by ...
virtual uMatrix Unknown(const Storage &e) const =0
Return vector filled with unknowns of the block with their derivatives.
virtual Mesh * GetMeshLink() const =0
Retrieve mesh pointer.
virtual unknown Unknown(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const =0
Return unknown in vector of variables of the block at certain position.
void SetMask(MarkerType _mask, bool inverse=false)
Set mask for the block.
INMOST_DATA_ENUM_TYPE GetRegistrationIndex() const
Retrieve a registration index.
virtual INMOST_DATA_REAL_TYPE Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const =0
Return value in vector of unknowns of the block at certain position.
virtual INMOST_DATA_ENUM_TYPE Size(const Storage &e) const =0
Total number of entries that this block expands to on given element, count variable-sized entries.
virtual INMOST_DATA_ENUM_TYPE MatrixSize(const Storage &e) const =0
The intended size of the matrix for this entry.
virtual ~AbstractEntry()
Destructor.
virtual AbstractEntry * Copy() const =0
Make a copy of the object.
ElementType GetElementType() const
Retrieve element type of the block.
virtual iMatrix Index(const Storage &e) const =0
Return vector filled with indices of unknowns of the block.
void SetOffsetTag(TagInteger tag)
Retrieve tag that stores enumeration offset on each element.
Matrix< typename Demote< T >::type > Access(const Storage &e) const
Return vector filled with either values or indices or unknowns of the block, depending on the templat...
virtual INMOST_DATA_ENUM_TYPE GetValueComp(INMOST_DATA_ENUM_TYPE unk) const =0
Retrieve component of the tag related to unknown.
bool isValid(const Storage &e) const
Check that the block is valid on given element.
void SynchronizeData()
Update variables contained in block on ghost elements of the grid.
virtual Matrix< value_reference > Value(const Storage &e)=0
Return vector filled with references to values of unknowns of the block.
TagInteger GetOffsetTag() const
Retrieve tag that stores enumeration offset on each element.
virtual TagRealArray GetValueTag(INMOST_DATA_ENUM_TYPE unk) const =0
Retrieve tag related to unknown value.
virtual INMOST_DATA_REAL_TYPE & Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos)=0
Return value in vector of unknowns of the block at certain position.
void SetElementType(ElementType _etype)
Set element type for the block.
virtual uMatrix operator[](const Storage &e) const =0
Return vector filled with unknowns of the block with their derivatives.
virtual rMatrix Value(const Storage &e) const =0
Return vector filled with values of unknowns of the block.
virtual INMOST_DATA_ENUM_TYPE Size() const =0
Number of tags in block.
Demote< T >::type Access(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return either value or index or unknown at specified position of the block, depending on the template...
MarkerType GetMask() const
Retrieve mask of the block.
bool GetMaskInverse() const
Retrieve if the mask is inverted.
virtual INMOST_DATA_ENUM_TYPE Index(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const =0
Return index in vector of indices of the block at certain position.
The Automatizator class helps in defining primary unknowns of the model and enhances user experience ...
AbstractEntry & GetEntry(INMOST_DATA_ENUM_TYPE ind)
Retrieve the block from automatizator by index.
Automatizator(const Automatizator &b)
Make a copy.
void EnumerateEntries(bool blocks=false)
Set index for every data entry of dynamic tag.
__INLINE bool isRegisteredEntry(INMOST_DATA_ENUM_TYPE ind) const
Check whether the tag is still registered.
void DeactivateEntry(INMOST_DATA_ENUM_TYPE ind)
Swith a registered tag to be non-active, in this case it's unknowns are considered to be constant.
void ActivateEntry(INMOST_DATA_ENUM_TYPE ind)
Swith a registered tag to be active, in this case it's unknowns are considered to be variable.
__INLINE INMOST_DATA_ENUM_TYPE GetFirstIndex() const
Retrieve first index of unknowns, local to the processor.
INMOST_DATA_ENUM_TYPE RegisterEntry(const AbstractEntry &e)
Register block with the automatizator.
__INLINE INMOST_DATA_ENUM_TYPE GetLastIndex() const
Retrieve last index of unknowns, local to the processor.
INMOST_DATA_ENUM_TYPE GetIndex(const Storage &e, INMOST_DATA_ENUM_TYPE reg_index, INMOST_DATA_ENUM_TYPE pos=0) const
Get index of the unknown associated with the entry on element.
void SynchronizeData()
Update variables contained in all block of automatizator on ghost elements of the grid.
void UnregisterEntry(INMOST_DATA_ENUM_TYPE ind)
Erase a registered tag.
INMOST_DATA_REAL_TYPE GetValue(const Storage &e, INMOST_DATA_ENUM_TYPE reg_index, INMOST_DATA_ENUM_TYPE pos=0) const
Get value of the unknown associated with the entry on element.
~Automatizator()
Destructor for the automatizator, deletes all the tags corresponding to indices from respective meshe...
Automatizator & operator=(Automatizator const &b)
Performs assignment.
unknown GetUnknown(const Storage &e, INMOST_DATA_ENUM_TYPE reg_index, INMOST_DATA_ENUM_TYPE pos=0) const
Get unknown associated with the entry on element.
const AbstractEntry & GetEntry(INMOST_DATA_ENUM_TYPE ind) const
Retrieve the block from automatizator by index.
std::vector< INMOST_DATA_ENUM_TYPE > ListRegisteredEntries() const
Lists all the indices of registered tags.
Automatizator(std::string name="")
Makes an empty Automatizator.
INMOST_DATA_ENUM_TYPE RegisterTag(Tag t, ElementType typemask, MarkerType domain_mask=0, bool inverse=false)
Set data of tag t defined on domain_mask to be dynamic data.
This class is used to organize unknowns into blocks, blocks enumeration are managed by class Automati...
uMatrix operator[](const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
rMatrix Value(const Storage &e) const
Return vector filled with values of unknowns of the block.
INMOST_DATA_ENUM_TYPE GetValueComp(INMOST_DATA_ENUM_TYPE unk) const
Retrieve component of the tag related to unknown.
BlockEntry(ElementType etype=NONE, MarkerType mask=0, bool inverse=false)
Default constructor.
Matrix< value_reference > Value(const Storage &e)
Return vector filled with references to values of unknowns of the block.
uMatrix Unknown(const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
void AddTag(Tag value, INMOST_DATA_ENUM_TYPE comp=ENUMUNDEF)
Add a component of the tag as unknown, by default all components of the tag are added.
iMatrix Index(const Storage &e) const
Return vector filled with indices of unknowns of the block.
INMOST_DATA_REAL_TYPE & Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos)
Return value in vector of unknowns of the block at certain position.
INMOST_DATA_ENUM_TYPE Size() const
Number of tags in block.
TagRealArray GetValueTag(INMOST_DATA_ENUM_TYPE unk) const
Retrieve tag related to unknown value.
void ClearTags()
Remove all existing tags.
AbstractEntry * Copy() const
Make a copy of the object.
INMOST_DATA_ENUM_TYPE MatrixSize(const Storage &e) const
The intended size of the matrix for this entry.
INMOST_DATA_REAL_TYPE Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return value in vector of unknowns of the block at certain position.
unknown Unknown(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return unknown in vector of variables of the block at certain position.
INMOST_DATA_ENUM_TYPE Size(const Storage &e) const
Number of entries for each tag in the block.
Mesh * GetMeshLink() const
Retrieve mesh pointer.
INMOST_DATA_ENUM_TYPE Index(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return index in vector of indices of the block at certain position.
Class for linear algebra operations on dense matrices.
A class to organize a model.
Stack together multiple objects of AbstractEntry class.
unknown Unknown(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return unknown in vector of variables of the block at certain position.
TagRealArray GetValueTag(INMOST_DATA_ENUM_TYPE unk) const
Retrieve tag related to unknown value.
uMatrix operator[](const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
uMatrix Unknown(const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
const AbstractEntry & GetEntry(INMOST_DATA_ENUM_TYPE k) const
Retrieve entry from block of entries.
INMOST_DATA_REAL_TYPE & Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos)
Return value in vector of unknowns of the block at certain position.
INMOST_DATA_ENUM_TYPE Index(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return index in vector of indices of the block at certain position.
INMOST_DATA_ENUM_TYPE NumEntries() const
Total number of entries.
AbstractEntry * Copy() const
Make a copy of the object.
INMOST_DATA_ENUM_TYPE GetValueComp(INMOST_DATA_ENUM_TYPE unk) const
Retrieve component of the tag related to unknown.
Matrix< value_reference > Value(const Storage &e)
Return vector filled with references to values of unknowns of the block.
rMatrix Value(const Storage &e) const
Return vector filled with values of unknowns of the block.
INMOST_DATA_ENUM_TYPE Size(const Storage &e) const
Number of entries for each tag in the block.
AbstractEntry & GetEntry(INMOST_DATA_ENUM_TYPE k)
Retrieve entry from block of entries.
Mesh * GetMeshLink() const
Retrieve mesh pointer.
INMOST_DATA_ENUM_TYPE Size() const
Number of tags in block.
void AddEntry(const AbstractEntry &entry)
Add entry into block of entries.
INMOST_DATA_REAL_TYPE Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return value in vector of unknowns of the block at certain position.
iMatrix Index(const Storage &e) const
Return vector filled with indices of unknowns of the block.
INMOST_DATA_ENUM_TYPE MatrixSize(const Storage &e) const
The intended size of the matrix for this entry.
MultiEntry(ElementType etype=NONE, MarkerType mask=0, bool inverse=false)
Default constructor.
This class is used to organize a single unknown.
INMOST_DATA_ENUM_TYPE MatrixSize(const Storage &e) const
The intended size of the matrix for this entry.
INMOST_DATA_ENUM_TYPE Size() const
Number of tags in block.
unknown Unknown(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return unknown in vector of variables of the block at certain position.
TagRealArray GetValueTag(INMOST_DATA_ENUM_TYPE unk) const
Retrieve tag related to unknown value.
INMOST_DATA_REAL_TYPE Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return value in vector of unknowns of the block at certain position.
INMOST_DATA_REAL_TYPE & Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos)
Return value in vector of unknowns of the block at certain position.
INMOST_DATA_ENUM_TYPE GetValueComp(INMOST_DATA_ENUM_TYPE unk) const
Retrieve component of the tag related to unknown.
AbstractEntry * Copy() const
Make a copy of the object.
Mesh * GetMeshLink() const
Retrieve mesh pointer.
rMatrix Value(const Storage &e) const
Return vector filled with values of unknowns of the block.
SingleEntry(ElementType etype=NONE, MarkerType mask=0, bool inverse=false)
Default constructor.
iMatrix Index(const Storage &e) const
Return vector filled with indices of unknowns of the block.
INMOST_DATA_ENUM_TYPE Size(const Storage &e) const
Number of entries for each tag in the block.
uMatrix Unknown(const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
SingleEntry(ElementType etype, MarkerType mask, bool inverse, Tag unknown_tag, INMOST_DATA_ENUM_TYPE unknown_comp=0)
Constructor with tag.
void SetTag(Tag unknown_tag_in, INMOST_DATA_ENUM_TYPE unknown_comp_in=0)
Provide tag.
INMOST_DATA_ENUM_TYPE Index(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return index in vector of indices of the block at certain position.
uMatrix operator[](const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
Matrix< value_reference > Value(const Storage &e)
Return vector filled with references to values of unknowns of the block.
This class is used to organize unknowns into blocks and provides mechanisms to change activation stat...
StatusBlockEntry(ElementType etype, MarkerType mask, bool inverse, TagInteger status_tag, const std::vector< std::vector< bool > > &status_tbl)
Constructor with status tag and status table.
uMatrix operator[](const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
StatusBlockEntry(ElementType etype, MarkerType mask, bool inverse, TagInteger status_tag)
Constructor with status tag.
unknown Unknown(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return unknown in vector of variables of the block at certain position.
AbstractEntry * Copy() const
Make a copy of the object.
TagRealArray GetValueTag(INMOST_DATA_ENUM_TYPE unk) const
Retrieve tag related to unknown value.
INMOST_DATA_ENUM_TYPE GetValueComp(INMOST_DATA_ENUM_TYPE unk) const
Retrieve component of the tag related to unknown.
INMOST_DATA_REAL_TYPE & Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos)
Return value in vector of unknowns of the block at certain position.
INMOST_DATA_REAL_TYPE Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return value in vector of unknowns of the block at certain position.
void AddStatus(const std::vector< bool > &stat)
Add status into table.
void AddTag(Tag value, INMOST_DATA_ENUM_TYPE comp=ENUMUNDEF)
Add a component of the tag as unknown, by default all components of the tag are added.
iMatrix Index(const Storage &e) const
Return vector filled with indices of unknowns of the block.
INMOST_DATA_ENUM_TYPE Size(const Storage &e) const
Number of entries for each tag in the block.
INMOST_DATA_ENUM_TYPE Index(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return index in vector of indices of the block at certain position.
uMatrix Unknown(const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
void SetStatusTag(TagInteger input)
Set status tag.
rMatrix Value(const Storage &e) const
Return vector filled with values of unknowns of the block.
void ClearTags()
Remove all existing tags.
INMOST_DATA_ENUM_TYPE Size() const
Number of tags in block.
Mesh * GetMeshLink() const
Retrieve mesh pointer.
StatusBlockEntry(ElementType etype=NONE, MarkerType mask=0, bool inverse=false)
Default constructor.
Matrix< value_reference > Value(const Storage &e)
Return vector filled with references to values of unknowns of the block.
INMOST_DATA_ENUM_TYPE MatrixSize(const Storage &e) const
The intended size of the matrix for this entry.
Base class for Mesh, Element, and ElementSet classes.
__INLINE bool HaveData(const Tag &tag) const
Check if any data is associated with Tag.
This class provides the access to the individual mesh datum and general information about it.
This class is used to organize multiple unknowns resided on single tag of variable or static size.
iMatrix Index(const Storage &e) const
Return vector filled with indices of unknowns of the block.
AbstractEntry * Copy() const
Make a copy of the object.
Mesh * GetMeshLink() const
Retrieve mesh pointer.
INMOST_DATA_REAL_TYPE Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return value in vector of unknowns of the block at certain position.
Matrix< value_reference > Value(const Storage &e)
Return vector filled with references to values of unknowns of the block.
rMatrix Value(const Storage &e) const
Return vector filled with values of unknowns of the block.
unknown Unknown(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return unknown in vector of variables of the block at certain position.
TagRealArray GetValueTag(INMOST_DATA_ENUM_TYPE unk) const
Retrieve tag related to unknown value.
INMOST_DATA_ENUM_TYPE Size(const Storage &e) const
Number of entries for each tag in the block.
VectorEntry(ElementType etype=NONE, MarkerType mask=0, bool inverse=false)
Default constructor.
INMOST_DATA_ENUM_TYPE MatrixSize(const Storage &e) const
The intended size of the matrix for this entry.
INMOST_DATA_REAL_TYPE & Value(const Storage &e, INMOST_DATA_ENUM_TYPE pos)
Return value in vector of unknowns of the block at certain position.
uMatrix operator[](const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
uMatrix Unknown(const Storage &e) const
Return vector filled with unknowns of the block with their derivatives.
VectorEntry(ElementType etype, MarkerType mask, bool inverse, Tag unknown_tag)
Constructor with tag.
void SetTag(Tag unknown_tag_in)
Provide tag.
INMOST_DATA_ENUM_TYPE Size() const
Number of tags in block.
INMOST_DATA_ENUM_TYPE GetValueComp(INMOST_DATA_ENUM_TYPE unk) const
Retrieve component of the tag related to unknown.
INMOST_DATA_ENUM_TYPE Index(const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
Return index in vector of indices of the block at certain position.
A class that represents a variable with multiple first order and second order variations.
A class that represents a variable with multiple first order variations.