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.
List of all members
Kratos::UnaryCombineExpression Class Reference

Use to create an expression which combines given input expressions list in the order given. More...

#include <unary_combine_expression.h>

Inheritance diagram for Kratos::UnaryCombineExpression:
Collaboration diagram for Kratos::UnaryCombineExpression:

Public Types

Type definitions
using IndexType = std::size_t
 
- 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

Life cycle
template<class TIteratorType >
 UnaryCombineExpression (TIteratorType Begin, TIteratorType End)
 
- Public Member Functions inherited from Kratos::Expression
 Expression (const IndexType NumberOfEntities)
 
virtual ~Expression ()=default
 
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

Private member variables
const std::vector< Expression::ConstPointermSourceExpressions
 
std::vector< IndexTypemStrides
 

Public operations

double Evaluate (const IndexType EntityIndex, const IndexType EntityDataBeginIndex, const IndexType ComponentIndex) const override
 Evalute the expression for the given entity data start index and component index and returns the value. More...
 
const std::vector< IndexTypeGetItemShape () const override
 Get the Shape of the expression. More...
 
IndexType GetMaxDepth () const override
 Get the Max Depth of the lazy expression tree. More...
 
std::string Info () const override
 
template<class TIteratorType >
static Expression::Pointer Create (TIteratorType Begin, TIteratorType End)
 

Detailed Description

Use to create an expression which combines given input expressions list in the order given.

Instances of this expression combines given list of expression in the given order. This combines the entity values wise, and not append one expressions all the values after another.

Note
All the expressions should have the same number of entities.

Member Typedef Documentation

◆ IndexType

Constructor & Destructor Documentation

◆ UnaryCombineExpression()

template<class TIteratorType >
Kratos::UnaryCombineExpression::UnaryCombineExpression ( TIteratorType  Begin,
TIteratorType  End 
)
inline

Member Function Documentation

◆ Create()

template<class TIteratorType >
static Expression::Pointer Kratos::UnaryCombineExpression::Create ( TIteratorType  Begin,
TIteratorType  End 
)
inlinestatic

◆ Evaluate()

double Kratos::UnaryCombineExpression::Evaluate ( const IndexType  EntityIndex,
const IndexType  EntityDataBeginIndex,
const IndexType  ComponentIndex 
) const
inlineoverridevirtual

Evalute the expression for the given entity data start index and component index and returns the value.

Parameters
EntityIndexIndex of the entity.
EntityDataBeginIndexIndex at which entity data starts.
ComponentIndexComponent index.
Returns
double Evaluated expression.
Todo:
Move to private.

Implements Kratos::Expression.

◆ GetItemShape()

const std::vector<IndexType> Kratos::UnaryCombineExpression::GetItemShape ( ) const
inlineoverridevirtual

Get the Shape of the expression.

Returns
const std::vector<IndexType> Size of each dimension is in the vector elements.

Implements Kratos::Expression.

◆ GetMaxDepth()

IndexType Kratos::UnaryCombineExpression::GetMaxDepth ( ) const
inlineoverridevirtual

Get the Max Depth of the lazy expression tree.

Returns the maximum depth of the lazy expression tree.

Warning
This is a recursive computation, hence this should not be done repeatedly unless necessary.
Returns
IndexType Max depth of the lazy expression tree.

Implements Kratos::Expression.

◆ Info()

std::string Kratos::UnaryCombineExpression::Info ( ) const
inlineoverridevirtual

Implements Kratos::Expression.

Member Data Documentation

◆ mSourceExpressions

const std::vector<Expression::ConstPointer> Kratos::UnaryCombineExpression::mSourceExpressions
protected

◆ mStrides

std::vector<IndexType> Kratos::UnaryCombineExpression::mStrides
protected

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