INMOST
A toolkit for distributed mathematical modeling
INMOST::StatusBlockEntry Class Reference

This class is used to organize unknowns into blocks and provides mechanisms to change activation statuses of individual unknowns, blocks enumeration are managed by class Automatizator. More...

#include <inmost_autodiff.h>

Inheritance diagram for INMOST::StatusBlockEntry:
Collaboration diagram for INMOST::StatusBlockEntry:

Public Member Functions

 StatusBlockEntry (ElementType etype=NONE, MarkerType mask=0, bool inverse=false)
 Default constructor.
 
 StatusBlockEntry (ElementType etype, MarkerType mask, bool inverse, TagInteger status_tag)
 Constructor with status tag.
 
 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.
 
void ClearTags ()
 Remove all existing tags.
 
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. More...
 
void AddStatus (const std::vector< bool > &stat)
 Add status into table.
 
void SetStatusTag (TagInteger input)
 Set status tag.
 
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 Index (const Storage &e, INMOST_DATA_ENUM_TYPE pos) const
 Return index in vector of indices 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.
 
Matrix< value_referenceValue (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.
 
iMatrix Index (const Storage &e) const
 Return vector filled with indices of unknowns of the block.
 
uMatrix Unknown (const Storage &e) const
 Return vector filled with unknowns of the block with their derivatives.
 
uMatrix operator[] (const Storage &e) const
 Return vector filled with unknowns of the block with their derivatives.
 
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.
 
INMOST_DATA_ENUM_TYPE Size (const Storage &e) const
 Number of entries for each tag in the block.
 
INMOST_DATA_ENUM_TYPE GetValueComp (INMOST_DATA_ENUM_TYPE unk) const
 Retrieve component of the tag related to unknown.
 
TagRealArray GetValueTag (INMOST_DATA_ENUM_TYPE unk) const
 Retrieve tag related to unknown value.
 
MeshGetMeshLink () const
 Retrieve mesh pointer.
 
AbstractEntryCopy () const
 Make a copy of the object.
 
- Public Member Functions inherited from INMOST::AbstractEntry
 AbstractEntry (ElementType etype=NONE, MarkerType mask=0, bool inverse=false)
 
MarkerType GetMask () const
 Retrieve mask of the block.
 
bool GetMaskInverse () const
 Retrieve if the mask is inverted.
 
void SetMask (MarkerType _mask, bool inverse=false)
 Set mask for the block.
 
ElementType GetElementType () const
 Retrieve element type of the block.
 
void SetElementType (ElementType _etype)
 Set element type for the block.
 
TagInteger GetOffsetTag () const
 Retrieve tag that stores enumeration offset on each element.
 
void SetOffsetTag (TagInteger tag)
 Retrieve tag that stores enumeration offset on each element.
 
bool isValid (const Storage &e) const
 Check that the block is valid on given element.
 
template<typename T >
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 template parameter.
 
template<typename T >
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 parameter. More...
 
INMOST_DATA_ENUM_TYPE GetRegistrationIndex () const
 Retrieve a registration index.
 
void SynchronizeData ()
 Update variables contained in block on ghost elements of the grid. More...
 
virtual ~AbstractEntry ()
 Destructor.
 

Detailed Description

This class is used to organize unknowns into blocks and provides mechanisms to change activation statuses of individual unknowns, blocks enumeration are managed by class Automatizator.

This is less efficient then BlockEntry for single status.

Todo:
  1. Check it works

Definition at line 268 of file inmost_autodiff.h.

Member Function Documentation

◆ AddTag()

void INMOST::StatusBlockEntry::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.

Adding all components of variable-sized tags is not supported.

Warning
Tags should belong to the same mesh and should be defined on the elements indicated in etype.

The documentation for this class was generated from the following file: