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::KratosComponents< VariableData > Class Reference

#include <kratos_components.h>

Collaboration diagram for Kratos::KratosComponents< VariableData >:

Public Member Functions

Life Cycle
 KratosComponents ()=default
 Default constructor. More...
 
virtual ~KratosComponents ()=default
 Destructor. 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...
 

Static Public Member Functions

Operations
static void Add (const std::string &rName, VariableData &rComponent)
 Adds a new element to the msComponents map. More...
 
static void Remove (const std::string &rName)
 Remove a component from the list by name. More...
 
static std::size_t Size ()
 Get the size of the components. More...
 
static VariableDataGet (const std::string &rName)
 Retrieves the VariableData with the specified name. More...
 
static VariableDatapGet (const std::string &rName)
 Retrieves the variable data associated with the given name. More...
 
static void Register ()
 Registers the function. More...
 
Access
static ComponentsContainerTypeGetComponents ()
 Retrieves the ComponentsContainer. More...
 
static ComponentsContainerTypepGetComponents ()
 Returns a pointer to the ComponentsContainerType object. More...
 
Inquiry
static bool Has (const std::string &rName)
 Checks if the specified name exists in the set of components. More...
 

Type Definitions

using ComponentsContainerType = std::map< std::string, VariableData * >
 The map type used to store the components // TODO: Replace std::map with faster alternative. More...
 
using ValueType = ComponentsContainerType::value_type
 Component type. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (KratosComponents)
 Pointer definition of KratosComponents. More...
 

Member Typedef Documentation

◆ ComponentsContainerType

The map type used to store the components // TODO: Replace std::map with faster alternative.

◆ ValueType

using Kratos::KratosComponents< VariableData >::ValueType = ComponentsContainerType::value_type

Component type.

Constructor & Destructor Documentation

◆ KratosComponents()

Default constructor.

◆ ~KratosComponents()

virtual Kratos::KratosComponents< VariableData >::~KratosComponents ( )
virtualdefault

Destructor.

Member Function Documentation

◆ Add()

static void Kratos::KratosComponents< VariableData >::Add ( const std::string &  rName,
VariableData rComponent 
)
inlinestatic

Adds a new element to the msComponents map.

Parameters
rNamethe name of the element to add
rComponentthe VariableData object to add

◆ Get()

static VariableData& Kratos::KratosComponents< VariableData >::Get ( const std::string &  rName)
inlinestatic

Retrieves the VariableData with the specified name.

This function retrieves the VariableData associated with the provided name from the msComponents container.

Parameters
rNameThe name of the VariableData to retrieve.
Returns
A reference to the retrieved VariableData.
Note
If the VariableData is not found in debug, an error message will be printed and the program may terminate.

◆ GetComponents()

static ComponentsContainerType& Kratos::KratosComponents< VariableData >::GetComponents ( )
inlinestatic

Retrieves the ComponentsContainer.

This function returns a reference to the ComponentsContainer, which stores all the components.

Returns
A reference to the ComponentsContainer.

◆ Has()

static bool Kratos::KratosComponents< VariableData >::Has ( const std::string &  rName)
inlinestatic

Checks if the specified name exists in the set of components.

Parameters
rNamethe name to check
Returns
true if the name exists in the set, false otherwise

◆ Info()

virtual std::string Kratos::KratosComponents< VariableData >::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::KratosComponents< VariableData >::KRATOS_CLASS_POINTER_DEFINITION ( KratosComponents< VariableData )

Pointer definition of KratosComponents.

◆ pGet()

static VariableData* Kratos::KratosComponents< VariableData >::pGet ( const std::string &  rName)
inlinestatic

Retrieves the variable data associated with the given name.

Parameters
rNamethe name of the variable
Returns
a pointer to the variable data, or nullptr if not found

◆ pGetComponents()

static ComponentsContainerType* Kratos::KratosComponents< VariableData >::pGetComponents ( )
inlinestatic

Returns a pointer to the ComponentsContainerType object.

Returns
a pointer to the ComponentsContainerType object

◆ PrintData()

virtual void Kratos::KratosComponents< VariableData >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintInfo()

virtual void Kratos::KratosComponents< VariableData >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ Register()

static void Kratos::KratosComponents< VariableData >::Register ( )
inlinestatic

Registers the function.

◆ Remove()

static void Kratos::KratosComponents< VariableData >::Remove ( const std::string &  rName)
inlinestatic

Remove a component from the list by name.

Parameters
rNamethe name of the component to remove

◆ Size()

static std::size_t Kratos::KratosComponents< VariableData >::Size ( )
inlinestatic

Get the size of the components.

Returns
The size of the components.

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