![]() |
OGS
|
|
The ProjectData Object contains all the data needed for a certain project, i.e. all geometric data (stored in a GEOObjects-object), all the meshes, processes, and process variables.
#include <Project.h>
Public Member Functions | |
| Project ()=default | |
| Constructor. | |
| Project (Project &)=delete | |
| ~Project ()=default | |
| GeoLib::GEOObjects & | getGEOObjects () |
| Returns the GEOObjects containing all points, polylines and surfaces. | |
| void | addMesh (std::unique_ptr< MeshLib::Mesh > mesh) |
| const MeshLib::Mesh * | getMesh (const std::string &name) const |
| const std::vector< std::unique_ptr< MeshLib::Mesh > > & | getMeshObjects () const |
| Returns all the meshes with their respective names. | |
| bool | removeMesh (const std::string &name) |
| void | addBoundaryCondition (std::unique_ptr< BoundaryCondition > bc) |
| Adds a boundary condition to the project. | |
| void | addSourceTerm (std::unique_ptr< SourceTerm > st) |
| Adds a source term to the project. | |
| std::vector< std::unique_ptr< BoundaryCondition > > const & | getBoundaryConditions () const |
| Returns the vector of boundary conditions. | |
| std::vector< std::unique_ptr< SourceTerm > > const & | getSourceTerms () const |
| Returns the vector of source terms. | |
| void | removePrimaryVariable (std::string const &primary_var_name) |
| Removes a primary variable incl. all associated conditions. | |
| void | removeBoundaryCondition (std::string const &primary_var_name, std::string const ¶m_name) |
| Removes one boundary condition. | |
| void | removeSourceTerm (std::string const &primary_var_name, std::string const ¶m_name) |
| Remove one source term. | |
Private Member Functions | |
| bool | getUniqueName (std::string &name) const |
| std::vector< std::unique_ptr< MeshLib::Mesh > >::const_iterator | findMeshByName (std::string const &name) const |
| Returns an iterator to the first found mesh with the given name. | |
| std::vector< std::unique_ptr< MeshLib::Mesh > >::iterator | findMeshByName (std::string const &name) |
Private Attributes | |
| GeoLib::GEOObjects | _geoObjects |
| std::vector< std::unique_ptr< MeshLib::Mesh > > | _mesh_vec |
| std::vector< std::unique_ptr< BoundaryCondition > > | _boundary_conditions |
| std::vector< std::unique_ptr< SourceTerm > > | _source_terms |
|
default |
Constructor.
Referenced by Project(), and findMeshByName().
|
default |
|
inline |
Adds a boundary condition to the project.
Definition at line 61 of file Project.h.
References _boundary_conditions.
| void DataHolderLib::Project::addMesh | ( | std::unique_ptr< MeshLib::Mesh > | mesh | ) |
Adds a new mesh under a (possibly new) unique name.
Definition at line 14 of file Project.cpp.
References _mesh_vec, and getUniqueName().
|
inline |
Adds a source term to the project.
Definition at line 67 of file Project.h.
References _source_terms.
|
private |
Definition at line 28 of file Project.cpp.
References _mesh_vec.
|
private |
Returns an iterator to the first found mesh with the given name.
Definition at line 23 of file Project.cpp.
References Project().
Referenced by getMesh(), and removeMesh().
|
inline |
Returns the vector of boundary conditions.
Definition at line 74 of file Project.h.
References _boundary_conditions.
|
inline |
Returns the GEOObjects containing all points, polylines and surfaces.
Definition at line 39 of file Project.h.
References _geoObjects.
| const MeshLib::Mesh * DataHolderLib::Project::getMesh | ( | const std::string & | name | ) | const |
Returns the mesh with the given name or a nullptr if the mesh was not found.
Definition at line 36 of file Project.cpp.
References _mesh_vec, and findMeshByName().
|
inline |
|
inline |
Returns the vector of source terms.
Definition at line 80 of file Project.h.
References _source_terms.
|
private |
Checks if a mesh with the same name exists and provides a unique name in case of already existing mesh. Returns true if the mesh name is unique. Returns false and changes the provided name to a unique name otherwise.
Definition at line 54 of file Project.cpp.
References _mesh_vec.
Referenced by addMesh().
| void DataHolderLib::Project::removeBoundaryCondition | ( | std::string const & | primary_var_name, |
| std::string const & | param_name ) |
Removes one boundary condition.
Definition at line 116 of file Project.cpp.
References _boundary_conditions.
Referenced by removePrimaryVariable().
| bool DataHolderLib::Project::removeMesh | ( | const std::string & | name | ) |
Deletes all meshes with the given name and removes them from the list of saved meshes. If any mesh was found for removal, true is returned and false otherwise.
Definition at line 42 of file Project.cpp.
References _mesh_vec, and findMeshByName().
| void DataHolderLib::Project::removePrimaryVariable | ( | std::string const & | primary_var_name | ) |
Removes a primary variable incl. all associated conditions.
Definition at line 93 of file Project.cpp.
References _boundary_conditions, _source_terms, removeBoundaryCondition(), and removeSourceTerm().
| void DataHolderLib::Project::removeSourceTerm | ( | std::string const & | primary_var_name, |
| std::string const & | param_name ) |
Remove one source term.
Definition at line 132 of file Project.cpp.
References _source_terms.
Referenced by removePrimaryVariable().
|
private |
Definition at line 110 of file Project.h.
Referenced by addBoundaryCondition(), getBoundaryConditions(), removeBoundaryCondition(), and removePrimaryVariable().
|
private |
Definition at line 108 of file Project.h.
Referenced by getGEOObjects().
|
private |
Definition at line 109 of file Project.h.
Referenced by addMesh(), findMeshByName(), getMesh(), getMeshObjects(), getUniqueName(), and removeMesh().
|
private |
Definition at line 111 of file Project.h.
Referenced by addSourceTerm(), getSourceTerms(), removePrimaryVariable(), and removeSourceTerm().