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::Table< TArgumentType, TResultType, TResultsColumns > Class Template Reference

This class represents the value of its variable depending to other variable. More...

#include <piecewize_linear_table.h>

Collaboration diagram for Kratos::Table< TArgumentType, TResultType, TResultsColumns >:

Public Member Functions

Life Cycle
 Table ()
 Default constructor. More...
 
 Table (XVariableType const &XVariable, YVariableType const &YVariable)
 Default constructor. More...
 
virtual ~Table ()
 Destructor. More...
 
Tableoperator= (Table const &rOther)
 Assignment operator. More...
 
virtual ~Table ()=default
 
Operators
TResultType operator() (TArgumentType const &X) const
 
TResultType const & operator[] (TArgumentType const &X) const
 
TResultType & operator[] (TArgumentType &X)
 
TResultType const & operator() (TArgumentType const &X) const
 
TResultType & operator() (TArgumentType const &X)
 
TResultType const & operator() (TArgumentType const &X, std::size_t J) const
 
TResultType & operator() (TArgumentType const &X, std::size_t J)
 
result_row_type const & operator[] (TArgumentType const &X) const
 
result_row_typeoperator[] (TArgumentType &X)
 
Operations
TResultType GetValue (TArgumentType const &X) const
 
result_array_typeGetNearestRow (TArgumentType const &X)
 
TResultType const & GetNearestValue (TArgumentType const &X) const
 
TResultType & Interpolate (TArgumentType const &X, TArgumentType const &X1, TResultType const &Y1, TArgumentType const &X2, TResultType const &Y2, TResultType &Result)
 
void PushBack (TArgumentType const &X, TResultType const &Y)
 
TResultType & GetNearestRow (TArgumentType const &X)
 
TResultType const & GetNearestRow (TArgumentType const &X) const
 
void insert (TArgumentType const &X, TResultType const &Y)
 
template<class TArrayType >
void insert (TArgumentType const &X, TArrayType const &Y)
 
void insert (TArgumentType const &X, result_row_type const &Y)
 
void PushBack (TArgumentType const &X, TResultType const &Y)
 
template<class TArrayType >
void PushBack (TArgumentType const &X, TArrayType const &Y)
 
template<class TArrayType >
void PushBack (TArgumentType const &X, result_row_type const &Y)
 
void Clear ()
 This method clears database. More...
 
Access
TableContainerTypeData ()
 
TableContainerType const & Data () const
 
XVariableTypeGetXVariable ()
 
YVariableTypeGetYVariable ()
 
TableContainerTypeData ()
 
TableContainerType const & Data () const
 
Input and output
virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
const std::string & NameOfX () const
 
const std::string & NameOfY () const
 
void SetNameOfX (const std::string &name)
 
void SetNameOfY (const std::string &name)
 

Type Definitions

typedef std::array< TResultType, TResultsColumns > result_array_type
 
typedef std::pair< TArgumentType, result_array_typeRecordType
 
typedef std::vector< RecordTypeTableContainerType
 
typedef Variable< TArgumentType > XVariableType
 
typedef Variable< TResultType > YVariableType
 
typedef std::array< TResultType, TResultsColumns > result_row_type
 
typedef std::pair< TArgumentType, result_row_typeRecordType
 
typedef std::vector< RecordTypeTableContainerType
 
 KRATOS_CLASS_POINTER_DEFINITION (Table)
 Pointer definition of Table. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (Table)
 Pointer definition of Table. More...
 

Serialization

class Serializer
 

Detailed Description

template<class TArgumentType, class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
class Kratos::Table< TArgumentType, TResultType, TResultsColumns >

This class represents the value of its variable depending to other variable.

Table class stores the value of its second variable respect to the value of its first variable. It also provides a piecewise linear interpolator/extrapolator for getting intermediate values.

Table class stores the value of its second variable respect to the value of its first variable. It also provides a double to double table with piecewise linear interpolator/extrapolator for getting intermediate values.

Author
Pooyan Dadvand
Riccardo Rossi
Template Parameters
TArgumentTypeThe type of argument considered
TResultTypeThe type of result obtained
TResultsColumnsThe number of columns considered

Member Typedef Documentation

◆ RecordType [1/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
typedef std::pair<TArgumentType, result_array_type> Kratos::Table< TArgumentType, TResultType, TResultsColumns >::RecordType

◆ RecordType [2/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
typedef std::pair<TArgumentType, result_row_type> Kratos::Table< TArgumentType, TResultType, TResultsColumns >::RecordType

◆ result_array_type

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
typedef std::array<TResultType, TResultsColumns> Kratos::Table< TArgumentType, TResultType, TResultsColumns >::result_array_type

◆ result_row_type

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
typedef std::array<TResultType, TResultsColumns> Kratos::Table< TArgumentType, TResultType, TResultsColumns >::result_row_type

◆ TableContainerType [1/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
typedef std::vector<RecordType> Kratos::Table< TArgumentType, TResultType, TResultsColumns >::TableContainerType

◆ TableContainerType [2/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
typedef std::vector<RecordType> Kratos::Table< TArgumentType, TResultType, TResultsColumns >::TableContainerType

◆ XVariableType

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
typedef Variable<TArgumentType> Kratos::Table< TArgumentType, TResultType, TResultsColumns >::XVariableType

◆ YVariableType

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
typedef Variable<TResultType> Kratos::Table< TArgumentType, TResultType, TResultsColumns >::YVariableType

Constructor & Destructor Documentation

◆ Table() [1/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Table ( )
inline

Default constructor.

◆ Table() [2/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Table ( XVariableType const &  XVariable,
YVariableType const &  YVariable 
)
inline

Default constructor.

◆ ~Table() [1/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
virtual Kratos::Table< TArgumentType, TResultType, TResultsColumns >::~Table ( )
inlinevirtual

Destructor.

◆ ~Table() [2/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
virtual Kratos::Table< TArgumentType, TResultType, TResultsColumns >::~Table ( )
virtualdefault

Member Function Documentation

◆ Clear()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Clear ( )
inline

This method clears database.

◆ Data() [1/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TableContainerType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Data ( )
inline

◆ Data() [2/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TableContainerType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Data ( )
inline

◆ Data() [3/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TableContainerType const& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Data ( ) const
inline

◆ Data() [4/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TableContainerType const& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Data ( ) const
inline

◆ GetNearestRow() [1/3]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
result_array_type& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::GetNearestRow ( TArgumentType const &  X)
inline

◆ GetNearestRow() [2/3]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::GetNearestRow ( TArgumentType const &  X)
inline

◆ GetNearestRow() [3/3]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType const& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::GetNearestRow ( TArgumentType const &  X) const
inline

◆ GetNearestValue()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType const& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::GetNearestValue ( TArgumentType const &  X) const
inline

◆ GetValue()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType Kratos::Table< TArgumentType, TResultType, TResultsColumns >::GetValue ( TArgumentType const &  X) const
inline

◆ GetXVariable()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
XVariableType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::GetXVariable ( )
inline

◆ GetYVariable()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
YVariableType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::GetYVariable ( )
inline

◆ Info() [1/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
virtual std::string Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ Info() [2/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
virtual std::string Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ insert() [1/3]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::insert ( TArgumentType const &  X,
result_row_type const &  Y 
)
inline

◆ insert() [2/3]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
template<class TArrayType >
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::insert ( TArgumentType const &  X,
TArrayType const &  Y 
)
inline

◆ insert() [3/3]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::insert ( TArgumentType const &  X,
TResultType const &  Y 
)
inline

◆ Interpolate()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::Interpolate ( TArgumentType const &  X,
TArgumentType const &  X1,
TResultType const &  Y1,
TArgumentType const &  X2,
TResultType const &  Y2,
TResultType &  Result 
)
inline

◆ KRATOS_CLASS_POINTER_DEFINITION() [1/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
Kratos::Table< TArgumentType, TResultType, TResultsColumns >::KRATOS_CLASS_POINTER_DEFINITION ( Table< TArgumentType, TResultType, TResultsColumns >  )

Pointer definition of Table.

◆ KRATOS_CLASS_POINTER_DEFINITION() [2/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
Kratos::Table< TArgumentType, TResultType, TResultsColumns >::KRATOS_CLASS_POINTER_DEFINITION ( Table< TArgumentType, TResultType, TResultsColumns >  )

Pointer definition of Table.

◆ NameOfX()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
const std::string& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::NameOfX ( ) const
inline

◆ NameOfY()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
const std::string& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::NameOfY ( ) const
inline

◆ operator()() [1/5]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator() ( TArgumentType const &  X)
inline

◆ operator()() [2/5]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator() ( TArgumentType const &  X) const
inline

◆ operator()() [3/5]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType const& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator() ( TArgumentType const &  X) const
inline

◆ operator()() [4/5]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator() ( TArgumentType const &  X,
std::size_t  J 
)
inline

◆ operator()() [5/5]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType const& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator() ( TArgumentType const &  X,
std::size_t  J 
) const
inline

◆ operator=()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
Table& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator= ( Table< TArgumentType, TResultType, TResultsColumns > const &  rOther)
inline

Assignment operator.

◆ operator[]() [1/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator[] ( TArgumentType &  X)
inline

◆ operator[]() [2/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
result_row_type& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator[] ( TArgumentType &  X)
inline

◆ operator[]() [3/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
TResultType const& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator[] ( TArgumentType const &  X) const
inline

◆ operator[]() [4/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
result_row_type const& Kratos::Table< TArgumentType, TResultType, TResultsColumns >::operator[] ( TArgumentType const &  X) const
inline

◆ PrintData() [1/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
virtual void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintData() [2/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
virtual void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintInfo() [1/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
virtual void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ PrintInfo() [2/2]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
virtual void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ PushBack() [1/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
template<class TArrayType >
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::PushBack ( TArgumentType const &  X,
result_row_type const &  Y 
)
inline

◆ PushBack() [2/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
template<class TArrayType >
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::PushBack ( TArgumentType const &  X,
TArrayType const &  Y 
)
inline

◆ PushBack() [3/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::PushBack ( TArgumentType const &  X,
TResultType const &  Y 
)
inline

◆ PushBack() [4/4]

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::PushBack ( TArgumentType const &  X,
TResultType const &  Y 
)
inline

◆ SetNameOfX()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::SetNameOfX ( const std::string &  name)
inline

◆ SetNameOfY()

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
void Kratos::Table< TArgumentType, TResultType, TResultsColumns >::SetNameOfY ( const std::string &  name)
inline

Friends And Related Function Documentation

◆ Serializer

template<class TArgumentType , class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
friend class Serializer
friend

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