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::Dof< TDataType > Class Template Reference

Dof represents a degree of freedom (DoF). More...

#include <dof.h>

Collaboration diagram for Kratos::Dof< TDataType >:

Public Types

Type Definitions
using Pointer = Dof *
 Pointer definition of Dof. More...
 
typedef std::size_t IndexType
 
typedef std::size_t EquationIdType
 
typedef VariablesListDataValueContainer SolutionStepsDataContainerType
 

Public Member Functions

Life Cycle
template<class TVariableType >
 Dof (NodalData *pThisNodalData, const TVariableType &rThisVariable)
 
template<class TVariableType , class TReactionType >
 Dof (NodalData *pThisNodalData, const TVariableType &rThisVariable, const TReactionType &rThisReaction)
 
 Dof ()
 
 Dof (Dof const &rOther)
 Copy constructor. More...
 
 ~Dof ()
 Destructor. More...
 
Operators
Dofoperator= (Dof const &rOther)
 Assignment operator. More...
 
template<class TVariableType >
TVariableType::Type & operator() (const TVariableType &rThisVariable, IndexType SolutionStepIndex=0)
 
template<class TVariableType >
TVariableType::Type const & operator() (const TVariableType &rThisVariable, IndexType SolutionStepIndex=0) const
 
TDataType & operator() (IndexType SolutionStepIndex=0)
 
TDataType const & operator() (IndexType SolutionStepIndex=0) const
 
TDataType & operator[] (IndexType SolutionStepIndex)
 
TDataType const & operator[] (IndexType SolutionStepIndex) const
 
Operations
TDataType & GetSolutionStepValue (IndexType SolutionStepIndex=0)
 
TDataType const & GetSolutionStepValue (IndexType SolutionStepIndex=0) const
 
template<class TVariableType >
TVariableType::Type & GetSolutionStepValue (const TVariableType &rThisVariable, IndexType SolutionStepIndex=0)
 
template<class TVariableType >
TVariableType::Type const & GetSolutionStepValue (const TVariableType &rThisVariable, IndexType SolutionStepIndex=0) const
 
TDataType & GetSolutionStepReactionValue (IndexType SolutionStepIndex=0)
 
TDataType const & GetSolutionStepReactionValue (IndexType SolutionStepIndex=0) const
 
Access
IndexType Id () const
 
IndexType GetId () const
 
const VariableDataGetVariable () const
 
const VariableDataGetReaction () const
 
template<class TReactionType >
void SetReaction (TReactionType const &rReaction)
 
EquationIdType EquationId () const
 
void SetEquationId (EquationIdType NewEquationId)
 
void FixDof ()
 
void FreeDof ()
 
SolutionStepsDataContainerTypeGetSolutionStepsData ()
 
void SetNodalData (NodalData *pNewNodalData)
 
bool HasReaction () const
 
Inquiry
bool IsFixed () const
 
bool IsFree () const
 
Input and output
std::string Info () const
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 

Serialization

class Serializer
 

Detailed Description

template<class TDataType>
class Kratos::Dof< TDataType >

Dof represents a degree of freedom (DoF).

It is a lightweight object which holds its variable, like TEMPERATURE, its state of freedom, and a reference to its value in the data structure. This class enables the system to work with different set of dofs and also represents the Dirichlet condition assigned to each dof.

Member Typedef Documentation

◆ EquationIdType

template<class TDataType >
typedef std::size_t Kratos::Dof< TDataType >::EquationIdType

◆ IndexType

template<class TDataType >
typedef std::size_t Kratos::Dof< TDataType >::IndexType

◆ Pointer

template<class TDataType >
using Kratos::Dof< TDataType >::Pointer = Dof*

Pointer definition of Dof.

◆ SolutionStepsDataContainerType

template<class TDataType >
typedef VariablesListDataValueContainer Kratos::Dof< TDataType >::SolutionStepsDataContainerType

Constructor & Destructor Documentation

◆ Dof() [1/4]

template<class TDataType >
template<class TVariableType >
Kratos::Dof< TDataType >::Dof ( NodalData pThisNodalData,
const TVariableType &  rThisVariable 
)
inline

Constructor. This constructor takes all necessary information to construct a degree of freedom. Also default values are used to make it easier to define for simple cases.

Parameters
rThisVariableVariable which this degree of freedom holds. This variable considered as unknown of problem to solved and fixing by Fix() method also applied to it. It must be a TDataType variable or component not a vector. For example DISPLACEMENT_X in structural element.
See also
Node
Variable

◆ Dof() [2/4]

template<class TDataType >
template<class TVariableType , class TReactionType >
Kratos::Dof< TDataType >::Dof ( NodalData pThisNodalData,
const TVariableType &  rThisVariable,
const TReactionType &  rThisReaction 
)
inline

Constructor. This constructor takes the same input as the previous one, but add the reaction on the DoF declaration

Parameters
rThisVariableVariable which this degree of freedom holds. This variable considered as unknown of problem to solved and fixing by Fix() method also applied to it. It must be a TDataType variable or component not a vector. For example DISPLACEMENT_X in structural element.
rThisReactionThis is the right hand side variable in the system of equation correspounding to variable this dof holding. For example THERMAL_FLOW in thermal element. It will be none as default.
See also
Node
Variable

◆ Dof() [3/4]

template<class TDataType >
Kratos::Dof< TDataType >::Dof ( )
inline

◆ Dof() [4/4]

template<class TDataType >
Kratos::Dof< TDataType >::Dof ( Dof< TDataType > const &  rOther)
inline

Copy constructor.

◆ ~Dof()

template<class TDataType >
Kratos::Dof< TDataType >::~Dof ( )
inline

Destructor.

Member Function Documentation

◆ EquationId()

template<class TDataType >
EquationIdType Kratos::Dof< TDataType >::EquationId ( ) const
inline

Return the Equation Id related to this degree eof freedom.

◆ FixDof()

template<class TDataType >
void Kratos::Dof< TDataType >::FixDof ( )
inline

Fixes the Dof

◆ FreeDof()

template<class TDataType >
void Kratos::Dof< TDataType >::FreeDof ( )
inline

Frees the degree of freedom

◆ GetId()

template<class TDataType >
IndexType Kratos::Dof< TDataType >::GetId ( ) const
inline

◆ GetReaction()

template<class TDataType >
const VariableData& Kratos::Dof< TDataType >::GetReaction ( ) const
inline

Returns reaction variable of this degree of freedom.

◆ GetSolutionStepReactionValue() [1/2]

template<class TDataType >
TDataType& Kratos::Dof< TDataType >::GetSolutionStepReactionValue ( IndexType  SolutionStepIndex = 0)
inline

◆ GetSolutionStepReactionValue() [2/2]

template<class TDataType >
TDataType const& Kratos::Dof< TDataType >::GetSolutionStepReactionValue ( IndexType  SolutionStepIndex = 0) const
inline

◆ GetSolutionStepsData()

template<class TDataType >
SolutionStepsDataContainerType* Kratos::Dof< TDataType >::GetSolutionStepsData ( )
inline

◆ GetSolutionStepValue() [1/4]

template<class TDataType >
template<class TVariableType >
TVariableType::Type& Kratos::Dof< TDataType >::GetSolutionStepValue ( const TVariableType &  rThisVariable,
IndexType  SolutionStepIndex = 0 
)
inline

◆ GetSolutionStepValue() [2/4]

template<class TDataType >
template<class TVariableType >
TVariableType::Type const& Kratos::Dof< TDataType >::GetSolutionStepValue ( const TVariableType &  rThisVariable,
IndexType  SolutionStepIndex = 0 
) const
inline

◆ GetSolutionStepValue() [3/4]

template<class TDataType >
TDataType& Kratos::Dof< TDataType >::GetSolutionStepValue ( IndexType  SolutionStepIndex = 0)
inline

◆ GetSolutionStepValue() [4/4]

template<class TDataType >
TDataType const& Kratos::Dof< TDataType >::GetSolutionStepValue ( IndexType  SolutionStepIndex = 0) const
inline

◆ GetVariable()

template<class TDataType >
const VariableData& Kratos::Dof< TDataType >::GetVariable ( ) const
inline

Returns variable assigned to this degree of freedom.

◆ HasReaction()

template<class TDataType >
bool Kratos::Dof< TDataType >::HasReaction ( ) const
inline

◆ Id()

template<class TDataType >
IndexType Kratos::Dof< TDataType >::Id ( ) const
inline

◆ Info()

template<class TDataType >
std::string Kratos::Dof< TDataType >::Info ( ) const
inline

Turn back information as a string.

◆ IsFixed()

template<class TDataType >
bool Kratos::Dof< TDataType >::IsFixed ( ) const
inline

◆ IsFree()

template<class TDataType >
bool Kratos::Dof< TDataType >::IsFree ( ) const
inline

◆ operator()() [1/4]

template<class TDataType >
template<class TVariableType >
TVariableType::Type& Kratos::Dof< TDataType >::operator() ( const TVariableType &  rThisVariable,
IndexType  SolutionStepIndex = 0 
)
inline

◆ operator()() [2/4]

template<class TDataType >
template<class TVariableType >
TVariableType::Type const& Kratos::Dof< TDataType >::operator() ( const TVariableType &  rThisVariable,
IndexType  SolutionStepIndex = 0 
) const
inline

◆ operator()() [3/4]

template<class TDataType >
TDataType& Kratos::Dof< TDataType >::operator() ( IndexType  SolutionStepIndex = 0)
inline

◆ operator()() [4/4]

template<class TDataType >
TDataType const& Kratos::Dof< TDataType >::operator() ( IndexType  SolutionStepIndex = 0) const
inline

◆ operator=()

template<class TDataType >
Dof& Kratos::Dof< TDataType >::operator= ( Dof< TDataType > const &  rOther)
inline

Assignment operator.

◆ operator[]() [1/2]

template<class TDataType >
TDataType& Kratos::Dof< TDataType >::operator[] ( IndexType  SolutionStepIndex)
inline

◆ operator[]() [2/2]

template<class TDataType >
TDataType const& Kratos::Dof< TDataType >::operator[] ( IndexType  SolutionStepIndex) const
inline

◆ PrintData()

template<class TDataType >
void Kratos::Dof< TDataType >::PrintData ( std::ostream &  rOStream) const
inline

Print object's data.

◆ PrintInfo()

template<class TDataType >
void Kratos::Dof< TDataType >::PrintInfo ( std::ostream &  rOStream) const
inline

Print information about this object.

◆ SetEquationId()

template<class TDataType >
void Kratos::Dof< TDataType >::SetEquationId ( EquationIdType  NewEquationId)
inline

Sets the Equation Id to the desired value

◆ SetNodalData()

template<class TDataType >
void Kratos::Dof< TDataType >::SetNodalData ( NodalData pNewNodalData)
inline

◆ SetReaction()

template<class TDataType >
template<class TReactionType >
void Kratos::Dof< TDataType >::SetReaction ( TReactionType const &  rReaction)
inline

Friends And Related Function Documentation

◆ Serializer

template<class TDataType >
friend class Serializer
friend

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