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::Model Class Referencefinal

This class aims to manage different model parts across multi-physics simulations. More...

#include <model.h>

Collaboration diagram for Kratos::Model:

Public Member Functions

Life Cycle
 Model ()
 Default constructor. More...
 
 ~Model ()
 Destructor. More...
 
 Model (const Model &)=delete
 
Operators
Modeloperator= (const Model &)=delete
 
Operations
void Reset ()
 This method clears the database of modelparts. More...
 
ModelPartCreateModelPart (const std::string &ModelPartName, IndexType NewBufferSize=1)
 This method creates a new model part contained in the current Model with a given name and buffer size. More...
 
void DeleteModelPart (const std::string &ModelPartName)
 This method deletes a modelpart with a given name. More...
 
void RenameModelPart (const std::string &OldName, const std::string &NewName)
 This method renames a modelpart with a given name. More...
 
ModelPartGetModelPart (const std::string &rFullModelPartName)
 This method returns a model part given a certain name. More...
 
const ModelPartGetModelPart (const std::string &rFullModelPartName) const
 This method returns a model part given a certain name. More...
 
bool HasModelPart (const std::string &rFullModelPartName) const
 This method checks if a certain a model part exists given a certain name. More...
 
std::vector< std::string > GetModelPartNames () const
 This returns a vector containing a list of model parts names contained on the model. More...
 
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...
 

Type Definitions

typedef ModelPart::IndexType IndexType
 Definition of the index type. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (Model)
 Pointer definition of Model. More...
 

Serialization

class Serializer
 

Detailed Description

This class aims to manage different model parts across multi-physics simulations.

The class behaves as a manager of the different model parts. It uses unordered_maps of the variables and the model parts for that purpose

Author
Riccardo Rossi

Member Typedef Documentation

◆ IndexType

Definition of the index type.

Constructor & Destructor Documentation

◆ Model() [1/2]

Kratos::Model::Model ( )
inline

Default constructor.

◆ ~Model()

Kratos::Model::~Model ( )
inline

Destructor.

◆ Model() [2/2]

Kratos::Model::Model ( const Model )
delete

Member Function Documentation

◆ CreateModelPart()

ModelPart & Kratos::Model::CreateModelPart ( const std::string &  ModelPartName,
ModelPart::IndexType  NewBufferSize = 1 
)

This method creates a new model part contained in the current Model with a given name and buffer size.

Parameters
ModelPartNameThe name of the new model part to be created
NewBufferSizeThe size of the buffer of the new model part created

◆ DeleteModelPart()

void Kratos::Model::DeleteModelPart ( const std::string &  ModelPartName)

This method deletes a modelpart with a given name.

Raises a warning in case the model part does not exists

Parameters
ModelPartNameThe name of the model part to be removed

◆ GetModelPart() [1/2]

ModelPart & Kratos::Model::GetModelPart ( const std::string &  rFullModelPartName)

This method returns a model part given a certain name.

Iterates over the list of submodelparts of the root model part

Parameters
rFullModelPartNameThe name of the model part to be returned
Returns
Reference to the model part of interest

◆ GetModelPart() [2/2]

const ModelPart & Kratos::Model::GetModelPart ( const std::string &  rFullModelPartName) const

This method returns a model part given a certain name.

Iterates over the list of submodelparts of the root model part

Parameters
rFullModelPartNameThe name of the model part to be returned
Returns
Reference to the model part of interest

◆ GetModelPartNames()

std::vector< std::string > Kratos::Model::GetModelPartNames ( ) const

This returns a vector containing a list of model parts names contained on the model.

Iterates over the list of submodelparts of the root model part

Returns
A vector of strings containing the model parts names

◆ HasModelPart()

bool Kratos::Model::HasModelPart ( const std::string &  rFullModelPartName) const

This method checks if a certain a model part exists given a certain name.

Iterates over the list of submodelparts of the root model part

Parameters
rFullModelPartNameThe name of the model part to be checked
Returns
True if the model part exists, false otherwise

◆ Info()

std::string Kratos::Model::Info ( ) const

Turn back information as a string.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::Model::KRATOS_CLASS_POINTER_DEFINITION ( Model  )

Pointer definition of Model.

◆ operator=()

Model& Kratos::Model::operator= ( const Model )
delete

◆ PrintData()

void Kratos::Model::PrintData ( std::ostream &  rOStream) const

Print object's data.

◆ PrintInfo()

void Kratos::Model::PrintInfo ( std::ostream &  rOStream) const

Print information about this object.

◆ RenameModelPart()

void Kratos::Model::RenameModelPart ( const std::string &  OldName,
const std::string &  NewName 
)

This method renames a modelpart with a given name.

Raises an error in case the model part does not exists as root model part

Parameters
OldNameThe name of the model part to be renamed
NewNameThe new name for the model part to be renamed

◆ Reset()

void Kratos::Model::Reset ( )

This method clears the database of modelparts.

Executes a clear on the model part map

Friends And Related Function Documentation

◆ Serializer

friend class Serializer
friend

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