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.
|
Base class or all the expression types. More...
#include <expression.h>
Classes | |
class | ExpressionIterator |
Public Types | |
Type definitions | |
using | Pointer = Kratos::intrusive_ptr< Expression > |
using | ConstPointer = Kratos::intrusive_ptr< const Expression > |
using | IndexType = std::size_t |
Iterator type definitions | |
using | value_type = double |
using | size_type = IndexType |
using | const_iterator = ExpressionIterator |
Public Member Functions | |
Life cycle | |
Expression (const IndexType NumberOfEntities) | |
virtual | ~Expression ()=default |
Public operations | |
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... | |
virtual const std::vector< IndexType > | GetItemShape () const =0 |
Get the Shape of the expression. 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... | |
virtual IndexType | GetMaxDepth () const =0 |
Get the Max Depth of the lazy expression tree. More... | |
Input and output | |
IndexType | size () const |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
virtual std::string | Info () const =0 |
Friends | |
class | ExpressionInput |
class | ExpressionOutput |
Private operations | |
void | intrusive_ptr_add_ref (const Expression *x) |
void | intrusive_ptr_release (const Expression *x) |
Base class or all the expression types.
This is used to represent an expression for arithmetic evaluation
using Kratos::Expression::ConstPointer = Kratos::intrusive_ptr<const Expression> |
using Kratos::Expression::IndexType = std::size_t |
using Kratos::Expression::Pointer = Kratos::intrusive_ptr<Expression> |
using Kratos::Expression::value_type = double |
|
inline |
|
virtualdefault |
Expression::ExpressionIterator Kratos::Expression::begin | ( | ) | const |
Expression::ExpressionIterator Kratos::Expression::cbegin | ( | ) | const |
Expression::ExpressionIterator Kratos::Expression::cend | ( | ) | const |
Expression::ExpressionIterator Kratos::Expression::end | ( | ) | const |
|
pure virtual |
Evalute the expression for the given entity data start index and component index and returns the value.
EntityIndex | Index of the entity. |
EntityDataBeginIndex | Index at which entity data starts. |
ComponentIndex | Component index. |
Implemented in Kratos::Python::Detail::ExpressionTrampoline, Kratos::UnaryStatisticsExpression< TOperationType >, Kratos::UnarySliceExpression, Kratos::UnaryReshapeExpression, Kratos::UnaryCombineExpression, Kratos::UnaryAbsExpression, Kratos::LiteralNonScalarFlatExpression< TRawDataType >, Kratos::LiteralScalarFlatExpression< TRawDataType >, Kratos::LiteralExpression< TDataType >, Kratos::BinaryExpression< TOperationType >, Kratos::LiteralExpression< TDataType >, Kratos::LiteralExpression< TDataType >, and Kratos::LiteralExpression< TDataType >.
std::size_t Kratos::Expression::GetItemComponentCount | ( | ) | const |
Get the Local Size of the expression.
|
pure virtual |
Get the Shape of the expression.
Implemented in Kratos::Python::Detail::ExpressionTrampoline, Kratos::UnaryStatisticsExpression< TOperationType >, Kratos::UnarySliceExpression, Kratos::UnaryReshapeExpression, Kratos::UnaryCombineExpression, Kratos::UnaryAbsExpression, Kratos::LiteralFlatExpression< TRawDataType >, Kratos::LiteralFlatExpression< double >, Kratos::LiteralExpression< TDataType >, and Kratos::BinaryExpression< TOperationType >.
|
pure virtual |
Get the Max Depth of the lazy expression tree.
Returns the maximum depth of the lazy expression tree.
Implemented in Kratos::Python::Detail::ExpressionTrampoline, Kratos::UnaryStatisticsExpression< TOperationType >, Kratos::UnarySliceExpression, Kratos::UnaryReshapeExpression, Kratos::UnaryCombineExpression, Kratos::UnaryAbsExpression, Kratos::LiteralFlatExpression< TRawDataType >, Kratos::LiteralFlatExpression< double >, Kratos::LiteralExpression< TDataType >, and Kratos::BinaryExpression< TOperationType >.
|
pure virtual |
Implemented in Kratos::Python::Detail::ExpressionTrampoline, Kratos::UnaryStatisticsExpression< TOperationType >, Kratos::UnarySliceExpression, Kratos::UnaryReshapeExpression, Kratos::UnaryCombineExpression, Kratos::UnaryAbsExpression, Kratos::LiteralFlatExpression< TRawDataType >, Kratos::LiteralFlatExpression< double >, Kratos::LiteralExpression< TDataType >, Kratos::BinaryExpression< TOperationType >, Kratos::LiteralFlatExpression< TRawDataType >, Kratos::LiteralFlatExpression< double >, Kratos::LiteralFlatExpression< TRawDataType >, Kratos::LiteralFlatExpression< double >, Kratos::LiteralFlatExpression< TRawDataType >, and Kratos::LiteralFlatExpression< double >.
|
inline |
Get the maximum number of entities allowed for this expression.
std::size_t Kratos::Expression::size | ( | ) | const |
|
friend |
|
friend |
|
friend |
|
friend |