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.
Public Types | Public Member Functions | List of all members
Kratos::LiteralScalarFlatExpression< TRawDataType > Class Template Reference

#include <literal_flat_expression.h>

Inheritance diagram for Kratos::LiteralScalarFlatExpression< TRawDataType >:
Collaboration diagram for Kratos::LiteralScalarFlatExpression< TRawDataType >:

Public Types

using IndexType = std::size_t
 
- Public Types inherited from Kratos::LiteralFlatExpression< double >
using Pointer = Kratos::intrusive_ptr< LiteralFlatExpression< double > >
 
using value_type = double
 
using size_type = std::size_t
 
using iterator = double *
 
using const_iterator = double 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

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...
 
- Public Member Functions inherited from Kratos::LiteralFlatExpression< double >
std::string Info () const
 
std::string Info () const
 
std::string Info () const
 
 LiteralFlatExpression (const IndexType NumberOfEntities, const std::vector< IndexType > &rShape)
 
 LiteralFlatExpression (double *pDataBegin, const IndexType NumberOfEntities, const std::vector< IndexType > &rShape)
 
void SetData (const IndexType EntityDataBeginIndex, const IndexType ComponentIndex, const double Value)
 
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...
 
IndexType size () const noexcept
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
std::string Info () const override
 
- 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
 

Additional Inherited Members

- Static Public Member Functions inherited from Kratos::LiteralFlatExpression< double >
static LiteralFlatExpression< double >::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< double >::Pointer Create (double *pDataBegin, const IndexType NumberOfEntities, const std::vector< IndexType > &rShape)
 
- Protected Attributes inherited from Kratos::LiteralFlatExpression< double >
const std::vector< IndexTypemShape
 
Data mData
 

Member Typedef Documentation

◆ IndexType

template<class TRawDataType = double>
using Kratos::LiteralScalarFlatExpression< TRawDataType >::IndexType = std::size_t

Member Function Documentation

◆ Evaluate()

template<class TRawDataType >
double Kratos::LiteralScalarFlatExpression< TRawDataType >::Evaluate ( const IndexType  EntityIndex,
const IndexType  EntityDataBeginIndex,
const IndexType  ComponentIndex 
) const
overridevirtual

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.


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