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.
|
delete |
|
default |
|
inline |
Adds a boundary condition to the project.
Definition at line 68 of file Project.h.
References _boundary_conditions.
Referenced by FileIO::XmlPrjInterface::readBoundaryConditions().
void DataHolderLib::Project::addMesh | ( | std::unique_ptr< MeshLib::Mesh > | mesh | ) |
Adds a new mesh under a (possibly new) unique name.
Definition at line 21 of file Project.cpp.
References _mesh_vec, and getUniqueName().
Referenced by MeshModel::addMesh(), MeshModel::addMesh(), and FileIO::XmlPrjInterface::readFile().
|
inline |
Adds a source term to the project.
Definition at line 74 of file Project.h.
References _source_terms.
Referenced by FileIO::XmlPrjInterface::readSourceTerms().
|
private |
Definition at line 35 of file Project.cpp.
References _mesh_vec.
|
private |
Returns an iterator to the first found mesh with the given name.
Definition at line 30 of file Project.cpp.
References findMeshByName().
Referenced by findMeshByName(), getMesh(), and removeMesh().
|
inline |
Returns the vector of boundary conditions.
Definition at line 81 of file Project.h.
References _boundary_conditions.
Referenced by FileIO::XmlPrjInterface::getPrimaryVariableVec(), ProcessModel::updateModel(), FileIO::XmlPrjInterface::write(), and FileIO::XmlPrjInterface::writeBoundaryConditions().
|
inline |
Returns the GEOObjects containing all points, polylines and surfaces.
Definition at line 46 of file Project.h.
References _geoObjects.
Referenced by MainWindow::MainWindow(), MainWindow::callGMSH(), MainWindow::convertMeshToGeometry(), MainWindow::convertPointsToStations(), MainWindow::exportBoreholesToGMS(), MainWindow::loadFile(), MainWindow::loadPetrelFiles(), MainWindow::mapGeometry(), FileIO::XmlPrjInterface::readFile(), MainWindow::save(), MainWindow::showGeoNameDialog(), MainWindow::showGMSHPrefsDialog(), MainWindow::showLineEditDialog(), MainWindow::showMergeGeometriesDialog(), MainWindow::showStationNameDialog(), FileIO::XmlPrjInterface::write(), MainWindow::writeGeometryToFile(), and MainWindow::writeStationListToFile().
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 43 of file Project.cpp.
References _mesh_vec, and findMeshByName().
Referenced by MeshElementRemovalDialog::accept(), MeshElementRemovalDialog::on_scalarArrayCheckBox_toggled(), and MeshElementRemovalDialog::on_scalarArrayComboBox_currentIndexChanged().
|
inline |
Returns all the meshes with their respective names.
Definition at line 57 of file Project.h.
References _mesh_vec.
Referenced by MeshElementRemovalDialog::MeshElementRemovalDialog(), MeshModel::addMesh(), MeshModel::addMesh(), MainWindow::mapGeometry(), MainWindow::showMeshAnalysisDialog(), MeshModel::updateModel(), and FileIO::XmlPrjInterface::write().
|
inline |
Returns the vector of source terms.
Definition at line 87 of file Project.h.
References _source_terms.
Referenced by FileIO::XmlPrjInterface::getPrimaryVariableVec(), ProcessModel::updateModel(), FileIO::XmlPrjInterface::write(), and FileIO::XmlPrjInterface::writeSourceTerms().
|
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 61 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 123 of file Project.cpp.
References _boundary_conditions.
Referenced by ProcessModel::removeCondition(), and 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 49 of file Project.cpp.
References _mesh_vec, and findMeshByName().
Referenced by MeshModel::removeMesh().
void DataHolderLib::Project::removePrimaryVariable | ( | std::string const & | primary_var_name | ) |
Removes a primary variable incl. all associated conditions.
Definition at line 100 of file Project.cpp.
References _boundary_conditions, _source_terms, removeBoundaryCondition(), and removeSourceTerm().
Referenced by ProcessModel::removeProcessVariable().
void DataHolderLib::Project::removeSourceTerm | ( | std::string const & | primary_var_name, |
std::string const & | param_name ) |
Remove one source term.
Definition at line 139 of file Project.cpp.
References _source_terms.
Referenced by ProcessModel::removeCondition(), and removePrimaryVariable().
|
private |
Definition at line 117 of file Project.h.
Referenced by addBoundaryCondition(), getBoundaryConditions(), removeBoundaryCondition(), and removePrimaryVariable().
|
private |
Definition at line 115 of file Project.h.
Referenced by getGEOObjects().
|
private |
Definition at line 116 of file Project.h.
Referenced by addMesh(), findMeshByName(), getMesh(), getMeshObjects(), getUniqueName(), and removeMesh().
|
private |
Definition at line 118 of file Project.h.
Referenced by addSourceTerm(), getSourceTerms(), removePrimaryVariable(), and removeSourceTerm().