![]() |
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.
|
This class aims to manage different model parts across multi-physics simulations. More...
#include <model.h>
Public Member Functions | |
Life Cycle | |
| Model () | |
| Default constructor. More... | |
| ~Model () | |
| Destructor. More... | |
| Model (const Model &)=delete | |
Operators | |
| Model & | operator= (const Model &)=delete |
Operations | |
| void | Reset () |
| This method clears the database of modelparts. More... | |
| ModelPart & | CreateModelPart (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... | |
| ModelPart & | GetModelPart (const std::string &rFullModelPartName) |
| This method returns a model part given a certain name. More... | |
| const ModelPart & | GetModelPart (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 |
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
Definition of the index type.
|
inline |
Default constructor.
|
inline |
Destructor.
|
delete |
| 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.
| ModelPartName | The name of the new model part to be created |
| NewBufferSize | The size of the buffer of the new model part created |
| 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
| ModelPartName | The name of the model part to be removed |
| 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
| rFullModelPartName | The name of the model part to be returned |
| 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
| rFullModelPartName | The name of the model part to be returned |
| 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
| 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
| rFullModelPartName | The name of the model part to be checked |
| std::string Kratos::Model::Info | ( | ) | const |
Turn back information as a string.
| void Kratos::Model::PrintData | ( | std::ostream & | rOStream | ) | const |
Print object's data.
| void Kratos::Model::PrintInfo | ( | std::ostream & | rOStream | ) | const |
Print information about this object.
| 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
| OldName | The name of the model part to be renamed |
| NewName | The new name for the model part to be renamed |
| void Kratos::Model::Reset | ( | ) |
This method clears the database of modelparts.
Executes a clear on the model part map
|
friend |