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::LiteralFlatExpression< TRawDataType >::Data Class Reference

This class is used represent the flattened data array. More...

#include <literal_flat_expression.h>

Collaboration diagram for Kratos::LiteralFlatExpression< TRawDataType >::Data:

Public Member Functions

Life cycle
 Data (const IndexType Size)
 Construct a new Data object where the array memory is managed by the object. More...
 
 Data (TRawDataType *pBegin, const IndexType Size)
 Construct a new Data object, where the underlying array memory is not managed by the object. More...
 
 ~Data ()
 
Operators
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
 
IndexType size () const noexcept
 

Detailed Description

template<class TRawDataType = double>
class Kratos::LiteralFlatExpression< TRawDataType >::Data

This class is used represent the flattened data array.

Instances of this class used to represent the data in the flat array. This representation can be done in two ways:

 1) If the data is moved, then this instance will hold a pointer
    to the TRawDataType flattened data array. In this case it is important to
    make sure that the TRawDataType flattened data array lives until this expression
    is destructed. In this case mIsManaged will be false.
 2) If the data is copied, then a flattened array for the required size is
    created at the construction in the heap, and will be destructed when the
    @ref Data instance is destructed. Hence, the copy of the data is stored
    and life time is managed by this instance.

Constructor & Destructor Documentation

◆ Data() [1/2]

template<class TRawDataType = double>
Kratos::LiteralFlatExpression< TRawDataType >::Data::Data ( const IndexType  Size)
inline

Construct a new Data object where the array memory is managed by the object.

Parameters
SizeSize of the allocated array.

◆ Data() [2/2]

template<class TRawDataType = double>
Kratos::LiteralFlatExpression< TRawDataType >::Data::Data ( TRawDataType *  pBegin,
const IndexType  Size 
)
inline

Construct a new Data object, where the underlying array memory is not managed by the object.

Parameters
pBeginPointer to the memory array.

◆ ~Data()

template<class TRawDataType = double>
Kratos::LiteralFlatExpression< TRawDataType >::Data::~Data ( )
inline

Member Function Documentation

◆ begin() [1/2]

template<class TRawDataType = double>
const_iterator Kratos::LiteralFlatExpression< TRawDataType >::Data::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

template<class TRawDataType = double>
iterator Kratos::LiteralFlatExpression< TRawDataType >::Data::begin ( )
inlinenoexcept

◆ cbegin()

template<class TRawDataType = double>
const_iterator Kratos::LiteralFlatExpression< TRawDataType >::Data::cbegin ( ) const
inlinenoexcept

◆ cend()

template<class TRawDataType = double>
const_iterator Kratos::LiteralFlatExpression< TRawDataType >::Data::cend ( ) const
inlinenoexcept

◆ end() [1/2]

template<class TRawDataType = double>
const_iterator Kratos::LiteralFlatExpression< TRawDataType >::Data::end ( ) const
inlinenoexcept

◆ end() [2/2]

template<class TRawDataType = double>
iterator Kratos::LiteralFlatExpression< TRawDataType >::Data::end ( )
inlinenoexcept

◆ size()

template<class TRawDataType = double>
IndexType Kratos::LiteralFlatExpression< TRawDataType >::Data::size ( ) const
inlinenoexcept

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