INMOST
A toolkit for distributed mathematical modeling
INMOST::AbstractEntry Class Referenceabstract

This class is used to organize unknowns in abstract way, it should be registered with and managed by class Automatizator. More...

#include <inmost_autodiff.h>

Inheritance diagram for INMOST::AbstractEntry:

Public Member Functions

 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.
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual Matrix< value_referenceValue (const Storage &e)=0
 Return vector filled with references to values of unknowns of the block.
 
virtual rMatrix Value (const Storage &e) const =0
 Return vector filled with values of unknowns of the block.
 
virtual iMatrix Index (const Storage &e) const =0
 Return vector filled with indices of unknowns of the block.
 
virtual uMatrix Unknown (const Storage &e) const =0
 Return vector filled with unknowns of the block with their derivatives.
 
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...
 
virtual uMatrix operator[] (const Storage &e) const =0
 Return vector filled with unknowns of the block with their derivatives.
 
virtual INMOST_DATA_ENUM_TYPE MatrixSize (const Storage &e) const =0
 The intended size of the matrix for this entry.
 
virtual INMOST_DATA_ENUM_TYPE Size () const =0
 Number of tags in block.
 
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. More...
 
virtual INMOST_DATA_ENUM_TYPE GetValueComp (INMOST_DATA_ENUM_TYPE unk) const =0
 Retrieve component of the tag related to unknown.
 
virtual TagRealArray GetValueTag (INMOST_DATA_ENUM_TYPE unk) const =0
 Retrieve tag related to unknown value.
 
virtual MeshGetMeshLink () const =0
 Retrieve mesh pointer.
 
virtual AbstractEntryCopy () const =0
 Make a copy of the object.
 
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.
 

Friends

class Automatizator
 
class Model
 

Detailed Description

This class is used to organize unknowns in abstract way, it should be registered with and managed by class Automatizator.

Todo:
  1. Is there a need for layout on how matrices are returned?
  2. Is there a need for layout on how unknowns and equations are arranged?
  3. Function for update of variables.
  4. Function for synchronization of variables.

Definition at line 29 of file inmost_autodiff.h.

Member Function Documentation

◆ Access()

template<typename T >
Demote<T>::type INMOST::AbstractEntry::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.

Parameters
posPosition in the block, should be no larger then MatrixSize.

◆ Index()

virtual INMOST_DATA_ENUM_TYPE INMOST::AbstractEntry::Index ( const Storage e,
INMOST_DATA_ENUM_TYPE  pos 
) const
pure virtual

Return index in vector of indices of the block at certain position.

The index may be ENUMUNDEF if the unknown is inactive.

Parameters
posPosition for which to extract the index, should be no larger then MatrixSize.

Implemented in INMOST::MultiEntry, INMOST::StatusBlockEntry, INMOST::VectorEntry, INMOST::SingleEntry, and INMOST::BlockEntry.

◆ Size()

virtual INMOST_DATA_ENUM_TYPE INMOST::AbstractEntry::Size ( const Storage e) const
pure virtual

Total number of entries that this block expands to on given element, count variable-sized entries.

This is an important function since it determines offset of each block when enumerated by Automatizator::EnumerateEntries. See also MatrixSize.

Implemented in INMOST::MultiEntry, INMOST::StatusBlockEntry, INMOST::VectorEntry, INMOST::SingleEntry, and INMOST::BlockEntry.

◆ SynchronizeData()

void INMOST::AbstractEntry::SynchronizeData ( )

Update variables contained in block on ghost elements of the grid.

For synchronization of data in all blocks see Automatizator::SynchronizeData.

◆ Unknown()

virtual unknown INMOST::AbstractEntry::Unknown ( const Storage e,
INMOST_DATA_ENUM_TYPE  pos 
) const
pure virtual

Return unknown in vector of variables of the block at certain position.

Parameters
posPosition for which to extract the unknown, should be no larger then MatrixSize.

Implemented in INMOST::MultiEntry, INMOST::StatusBlockEntry, INMOST::VectorEntry, INMOST::SingleEntry, and INMOST::BlockEntry.

◆ Value() [1/2]

virtual INMOST_DATA_REAL_TYPE INMOST::AbstractEntry::Value ( const Storage e,
INMOST_DATA_ENUM_TYPE  pos 
) const
pure virtual

Return value in vector of unknowns of the block at certain position.

Parameters
posPosition for which to extract the value, should be no larger then MatrixSize.

Implemented in INMOST::MultiEntry, INMOST::StatusBlockEntry, INMOST::VectorEntry, INMOST::SingleEntry, and INMOST::BlockEntry.

◆ Value() [2/2]

virtual INMOST_DATA_REAL_TYPE& INMOST::AbstractEntry::Value ( const Storage e,
INMOST_DATA_ENUM_TYPE  pos 
)
pure virtual

Return value in vector of unknowns of the block at certain position.

Parameters
posPosition for which to extract the value, should be no larger then MatrixSize.

Implemented in INMOST::MultiEntry, INMOST::StatusBlockEntry, INMOST::VectorEntry, INMOST::SingleEntry, and INMOST::BlockEntry.


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