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::ResultDatabase Class Reference

This class stores the results of a simulation for a later comparison. More...

#include <result_dabatase.h>

Collaboration diagram for Kratos::ResultDatabase:

Public Member Functions

Life Cycle
 ResultDatabase ()
 Default constructor. More...
 
virtual ~ResultDatabase ()
 Destructor. More...
 
 ResultDatabase (ResultDatabase const &rOther)
 Copy constructor. More...
 
Operations
void Initialize (const std::vector< IndexType > &rVariablesIndexes, const std::vector< IndexType > &rValuesSizes, const SizeType NumberOfEntites, const SizeType NumberOfGP=1)
 This method initializes the database. More...
 
template<class TVariableType >
VariableDatabaseGetVariableData (const TVariableType &rVariable)
 This method retrieves the variable database. More...
 
template<class TVariableType >
const VariableDatabaseGetVariableData (const TVariableType &rVariable) const
 This method retrieves the variable database. More...
 
template<class TVariableType >
void SetValues (const Vector &rValuesX, const Vector &rValuesY, const TVariableType &rVariable, const IndexType EntityIndex, const SizeType ComponentIndex=0, const SizeType GPIndex=0)
 This method set the values into the tables. More...
 
void Clear ()
 This function is designed for clear all the databases. More...
 
int Check ()
 This function is designed for being called after ExecuteInitialize ONCE to verify that the input is correct. More...
 
Access
VectorGetCommonColumn ()
 This method returns the common column vector. More...
 
void SetCommonColumn (const Vector &rCommonColumn)
 This method sets the common column. More...
 
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...
 

Protected Attributes

Protected member Variables
std::unordered_map< IndexType, VariableDatabasemData
 
Vector mCommonColumn
 

Type Definitions

typedef std::size_t IndexType
 The definition of the index type. More...
 
typedef std::size_t SizeType
 The definition of the sizetype. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (ResultDatabase)
 Pointer definition of ResultDatabase. More...
 

Detailed Description

This class stores the results of a simulation for a later comparison.

The results are stored in a map which stores the results in tables. The following structure is followed:

Member Typedef Documentation

◆ IndexType

typedef std::size_t Kratos::ResultDatabase::IndexType

The definition of the index type.

◆ SizeType

typedef std::size_t Kratos::ResultDatabase::SizeType

The definition of the sizetype.

Constructor & Destructor Documentation

◆ ResultDatabase() [1/2]

Kratos::ResultDatabase::ResultDatabase ( )
inline

Default constructor.

◆ ~ResultDatabase()

virtual Kratos::ResultDatabase::~ResultDatabase ( )
inlinevirtual

Destructor.

◆ ResultDatabase() [2/2]

Kratos::ResultDatabase::ResultDatabase ( ResultDatabase const &  rOther)
inline

Copy constructor.

Member Function Documentation

◆ Check()

int Kratos::ResultDatabase::Check ( )

This function is designed for being called after ExecuteInitialize ONCE to verify that the input is correct.

◆ Clear()

void Kratos::ResultDatabase::Clear ( )

This function is designed for clear all the databases.

◆ GetCommonColumn()

Vector& Kratos::ResultDatabase::GetCommonColumn ( )
inline

This method returns the common column vector.

Returns
The common column vector

◆ GetVariableData() [1/2]

template<class TVariableType >
VariableDatabase& Kratos::ResultDatabase::GetVariableData ( const TVariableType &  rVariable)
inline

This method retrieves the variable database.

Parameters
rVariableThe variable to be retrieved
Template Parameters
TVariableTypeThe variable type considered

◆ GetVariableData() [2/2]

template<class TVariableType >
const VariableDatabase& Kratos::ResultDatabase::GetVariableData ( const TVariableType &  rVariable) const
inline

This method retrieves the variable database.

Parameters
rVariableThe variable to be retrieved
Template Parameters
TVariableTypeThe variable type considered

◆ Info()

virtual std::string Kratos::ResultDatabase::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ Initialize()

void Kratos::ResultDatabase::Initialize ( const std::vector< IndexType > &  rVariablesIndexes,
const std::vector< IndexType > &  rValuesSizes,
const SizeType  NumberOfEntites,
const SizeType  NumberOfGP = 1 
)

This method initializes the database.

Parameters
rVariablesIndexesThe list of indexes of the variables
NumberOfEntitesThe number of entities considered

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::ResultDatabase::KRATOS_CLASS_POINTER_DEFINITION ( ResultDatabase  )

Pointer definition of ResultDatabase.

◆ PrintData()

virtual void Kratos::ResultDatabase::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintInfo()

virtual void Kratos::ResultDatabase::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ SetCommonColumn()

void Kratos::ResultDatabase::SetCommonColumn ( const Vector rCommonColumn)
inline

This method sets the common column.

Parameters
rCommonColumnThe common column (time) vector

◆ SetValues()

template<class TVariableType >
void Kratos::ResultDatabase::SetValues ( const Vector rValuesX,
const Vector rValuesY,
const TVariableType &  rVariable,
const IndexType  EntityIndex,
const SizeType  ComponentIndex = 0,
const SizeType  GPIndex = 0 
)
inline

This method set the values into the tables.

Parameters
rValuesXThe values of the X axis
rValuesYThe values of the Y axis
rVariableThe variable to be retrieved
EntityIndexThe index of the entity (not the entity Id, the index in the database)
ComponentIndexThe component index of the vector/array
GPIndexThe GP index
Template Parameters
TVariableTypeThe variable type considered

Member Data Documentation

◆ mCommonColumn

Vector Kratos::ResultDatabase::mCommonColumn
protected

◆ mData

std::unordered_map<IndexType, VariableDatabase> Kratos::ResultDatabase::mData
protected

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