![]() |
KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Expression to hold a literal with a flattened data structure. More...
#include <literal_flat_expression.h>
Classes | |
| class | Data |
| This class is used represent the flattened data array. More... | |
Public Types | |
Type definition | |
| using | Pointer = Kratos::intrusive_ptr< LiteralFlatExpression< TRawDataType > > |
| using | value_type = TRawDataType |
| using | size_type = std::size_t |
| using | iterator = TRawDataType * |
| using | const_iterator = TRawDataType const * |
Public Types inherited from Kratos::Expression | |
| using | Pointer = Kratos::intrusive_ptr< Expression > |
| using | ConstPointer = Kratos::intrusive_ptr< const Expression > |
| using | IndexType = std::size_t |
| using | value_type = double |
| using | size_type = IndexType |
| using | const_iterator = ExpressionIterator |
Public Member Functions | |
| std::string | Info () const |
| std::string | Info () const |
| std::string | Info () const |
Life cycle | |
| LiteralFlatExpression (const IndexType NumberOfEntities, const std::vector< IndexType > &rShape) | |
| LiteralFlatExpression (TRawDataType *pDataBegin, const IndexType NumberOfEntities, const std::vector< IndexType > &rShape) | |
Public Member Functions inherited from Kratos::Expression | |
| Expression (const IndexType NumberOfEntities) | |
| virtual | ~Expression ()=default |
| virtual double | Evaluate (const IndexType EntityIndex, const IndexType EntityDataBeginIndex, const IndexType ComponentIndex) const =0 |
| Evalute the expression for the given entity data start index and component index and returns the value. More... | |
| IndexType | NumberOfEntities () const |
| Get the maximum number of entities allowed for this expression. More... | |
| IndexType | GetItemComponentCount () const |
| Get the Local Size of the expression. More... | |
| IndexType | size () const |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
Protected Attributes | |
Protected member variables | |
| const std::vector< IndexType > | mShape |
| Data | mData |
Public operations | |
| void | SetData (const IndexType EntityDataBeginIndex, const IndexType ComponentIndex, const TRawDataType Value) |
| const std::vector< IndexType > | GetItemShape () const override |
| Get the Shape of the expression. More... | |
| IndexType | GetMaxDepth () const override |
| Get the Max Depth of the lazy expression tree. More... | |
| IndexType | size () const noexcept |
| iterator | begin () noexcept |
| iterator | end () noexcept |
| const_iterator | begin () const noexcept |
| const_iterator | end () const noexcept |
| const_iterator | cbegin () const noexcept |
| const_iterator | cend () const noexcept |
| std::string | Info () const override |
| static LiteralFlatExpression< TRawDataType >::Pointer | Create (const IndexType NumberOfEntities, const std::vector< IndexType > &rShape) |
| A specific create method is used in here to return a pointer to the LiteralFlatExpression. More... | |
| static LiteralFlatExpression< TRawDataType >::Pointer | Create (TRawDataType *pDataBegin, const IndexType NumberOfEntities, const std::vector< IndexType > &rShape) |
Expression to hold a literal with a flattened data structure.
This expression holds data of a literal with rShape by flattening the data structure to a vector. This allocates a Vector with large sizes.
| TRawDataType | Raw data type of the literal. Can be char, int or double |
| using Kratos::LiteralFlatExpression< TRawDataType >::const_iterator = TRawDataType const* |
| using Kratos::LiteralFlatExpression< TRawDataType >::iterator = TRawDataType* |
| using Kratos::LiteralFlatExpression< TRawDataType >::Pointer = Kratos::intrusive_ptr<LiteralFlatExpression<TRawDataType> > |
| using Kratos::LiteralFlatExpression< TRawDataType >::size_type = std::size_t |
| using Kratos::LiteralFlatExpression< TRawDataType >::value_type = TRawDataType |
| Kratos::LiteralFlatExpression< TRawDataType >::LiteralFlatExpression | ( | const IndexType | NumberOfEntities, |
| const std::vector< IndexType > & | rShape | ||
| ) |
| Kratos::LiteralFlatExpression< TRawDataType >::LiteralFlatExpression | ( | TRawDataType * | pDataBegin, |
| const IndexType | NumberOfEntities, | ||
| const std::vector< IndexType > & | rShape | ||
| ) |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
static |
A specific create method is used in here to return a pointer to the LiteralFlatExpression.
This method is used to return the derrived class LiteralFlatExpression pointer so that additional SetData method can be accessed to initialize the vector data.
| NumberOfEntities | Number of entities (eg. nodes, elements, etc.) in the container. |
| rShape | Shape of the data in each entity. |
|
static |
|
inlinenoexcept |
|
inlinenoexcept |
|
overridevirtual |
Get the Shape of the expression.
Implements Kratos::Expression.
|
inlineoverridevirtual |
Get the Max Depth of the lazy expression tree.
Returns the maximum depth of the lazy expression tree.
Implements Kratos::Expression.
|
virtual |
Implements Kratos::Expression.
|
virtual |
Implements Kratos::Expression.
|
virtual |
Implements Kratos::Expression.
|
overridevirtual |
Implements Kratos::Expression.
| void Kratos::LiteralFlatExpression< TRawDataType >::SetData | ( | const IndexType | EntityDataBeginIndex, |
| const IndexType | ComponentIndex, | ||
| const TRawDataType | Value | ||
| ) |
|
inlinenoexcept |
|
protected |
|
protected |