![]() |
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.
Definition at line 49 of file ProjectData.h.
#include <ProjectData.h>
Public Member Functions | |
ProjectData () | |
ProjectData (BaseLib::ConfigTree const &project_config, std::string const &project_directory, std::string const &output_directory) | |
ProjectData (ProjectData &)=delete | |
std::vector< std::unique_ptr< ProcessLib::Process > > const & | getProcesses () const |
Provides read access to the process container. More... | |
ProcessLib::TimeLoop & | getTimeLoop () |
Private Member Functions | |
void | parseProcessVariables (BaseLib::ConfigTree const &process_variables_config) |
std::vector< std::string > | parseParameters (BaseLib::ConfigTree const ¶meters_config) |
void | parseMedia (std::optional< BaseLib::ConfigTree > const &media_config) |
Parses media configuration and saves them in an object. More... | |
void | parseProcesses (BaseLib::ConfigTree const &processes_config, std::string const &project_directory, std::string const &output_directory, std::unique_ptr< ChemistryLib::ChemicalSolverInterface > &&chemical_solver_interface) |
void | parseTimeLoop (BaseLib::ConfigTree const &config, const std::string &output_directory) |
Parses the time loop configuration. More... | |
void | parseLinearSolvers (BaseLib::ConfigTree const &config) |
void | parseNonlinearSolvers (BaseLib::ConfigTree const &config) |
void | parseCurves (std::optional< BaseLib::ConfigTree > const &config) |
std::unique_ptr< ChemistryLib::ChemicalSolverInterface > | parseChemicalSolverInterface (std::optional< BaseLib::ConfigTree > const &config, const std::string &output_directory) |
Private Attributes | |
std::vector< std::unique_ptr< MeshLib::Mesh > > | _mesh_vec |
std::vector< std::unique_ptr< ProcessLib::Process > > | _processes |
std::vector< ProcessLib::ProcessVariable > | _process_variables |
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > | _parameters |
Buffer for each parameter config passed to the process. More... | |
std::optional< ParameterLib::CoordinateSystem > | _local_coordinate_system |
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > | _media |
std::unique_ptr< ProcessLib::TimeLoop > | _time_loop |
The time loop used to solve this project's processes. More... | |
std::map< std::string, std::unique_ptr< GlobalLinearSolver > > | _linear_solvers |
std::map< std::string, std::unique_ptr< NumLib::NonlinearSolverBase > > | _nonlinear_solvers |
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > | _curves |
|
default |
The empty constructor used in the gui, for example, when the project's configuration is not loaded yet.
ProjectData::ProjectData | ( | BaseLib::ConfigTree const & | project_config, |
std::string const & | project_directory, | ||
std::string const & | output_directory | ||
) |
Constructs project data by parsing provided configuration.
project_config | Configuration as read from the prj file. |
project_directory | Where to look for files referenced in the config_tree . |
output_directory | Where to write simulation output files to. |
Definition at line 284 of file ProjectData.cpp.
References _local_coordinate_system, _parameters, BaseLib::copyPathToFileName(), BaseLib::ConfigTree::getConfigParameterOptional(), BaseLib::ConfigTree::getConfigSubtree(), BaseLib::ConfigTree::getConfigSubtreeOptional(), OGS_FATAL, parseChemicalSolverInterface(), parseCurves(), parseLinearSolvers(), anonymous_namespace{ProjectData.cpp}::parseLocalCoordinateSystem(), parseMedia(), parseNonlinearSolvers(), parseParameters(), parseProcesses(), parseProcessVariables(), parseTimeLoop(), and anonymous_namespace{FileTools.cpp}::project_directory.
|
delete |
|
inline |
Provides read access to the process container.
Definition at line 74 of file ProjectData.h.
References _processes.
Referenced by main().
|
inline |
Definition at line 80 of file ProjectData.h.
References _time_loop.
Referenced by main().
|
private |
Definition at line 513 of file ProjectData.cpp.
References _linear_solvers, _mesh_vec, ChemistryLib::createChemicalSolverInterface(), INFO(), OGS_FATAL, and ChemistryLib::Phreeqc.
Referenced by ProjectData().
|
private |
Definition at line 1176 of file ProjectData.cpp.
References _curves, MathLib::createPiecewiseLinearCurve(), DBUG(), BaseLib::insertIfKeyUniqueElseError(), and MaterialPropertyLib::name.
Referenced by ProjectData().
|
private |
Definition at line 1135 of file ProjectData.cpp.
References _linear_solvers, DBUG(), BaseLib::ConfigTree::getConfigSubtreeList(), BaseLib::insertIfKeyUniqueElseError(), and MaterialPropertyLib::name.
Referenced by ProjectData().
|
private |
Parses media configuration and saves them in an object.
Definition at line 450 of file ProjectData.cpp.
References _curves, _local_coordinate_system, _media, _mesh_vec, _parameters, MaterialPropertyLib::createMedium(), DBUG(), ERR(), anonymous_namespace{generateStructuredMesh.cpp}::getDimension(), OGS_FATAL, and splitMaterialIdString().
Referenced by ProjectData().
|
private |
Definition at line 1152 of file ProjectData.cpp.
References _linear_solvers, _nonlinear_solvers, NumLib::createNonlinearSolver(), DBUG(), BaseLib::ConfigTree::getConfigSubtreeList(), BaseLib::getOrError(), BaseLib::insertIfKeyUniqueElseError(), and MaterialPropertyLib::name.
Referenced by ProjectData().
|
private |
Parses the parameters configuration and saves them. Checks for double parameters' names. Returns names of vectors which are to be transformed using local coordinate system.
Definition at line 411 of file ProjectData.cpp.
References _curves, _mesh_vec, _parameters, ParameterLib::createParameter(), DBUG(), BaseLib::ConfigTree::getConfigSubtreeList(), OGS_FATAL, MathLib::p, and ProcessLib::DeactivatedSubdomain::zero_parameter_name.
Referenced by ProjectData().
|
private |
Parses the processes configuration and creates new processes for each process entry passing the corresponding subtree to the process constructor.
Definition at line 569 of file ProjectData.cpp.
References _curves, _local_coordinate_system, _media, _mesh_vec, _parameters, _process_variables, _processes, BaseLib::containsIf(), ProcessLib::ComponentTransport::createComponentTransportProcess(), ProcessLib::HeatConduction::createHeatConductionProcess(), ProcessLib::HeatTransportBHE::createHeatTransportBHEProcess(), ProcessLib::HT::createHTProcess(), ProcessLib::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::LIE::HydroMechanics::createHydroMechanicsProcess< 2 >(), ProcessLib::LIE::HydroMechanics::createHydroMechanicsProcess< 3 >(), ProcessLib::createJacobianAssembler(), ProcessLib::LiquidFlow::createLiquidFlowProcess(), ProcessLib::PhaseField::createPhaseFieldProcess< 2 >(), ProcessLib::PhaseField::createPhaseFieldProcess< 3 >(), ProcessLib::RichardsComponentTransport::createRichardsComponentTransportProcess(), ProcessLib::RichardsFlow::createRichardsFlowProcess(), ProcessLib::RichardsMechanics::createRichardsMechanicsProcess< 2 >(), ProcessLib::RichardsMechanics::createRichardsMechanicsProcess< 3 >(), ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess< 2 >(), ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess< 3 >(), ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess< 2 >(), ProcessLib::SmallDeformation::createSmallDeformationProcess< 2 >(), ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess< 3 >(), ProcessLib::SmallDeformation::createSmallDeformationProcess< 3 >(), ProcessLib::SteadyStateDiffusion::createSteadyStateDiffusion(), ProcessLib::StokesFlow::createStokesFlowProcess< 2 >(), ProcessLib::TES::createTESProcess(), ProcessLib::TH2M::createTH2MProcess< 2 >(), ProcessLib::TH2M::createTH2MProcess< 3 >(), ProcessLib::ThermalTwoPhaseFlowWithPP::createThermalTwoPhaseFlowWithPPProcess(), ProcessLib::ThermoHydroMechanics::createThermoHydroMechanicsProcess< 2 >(), ProcessLib::ThermoHydroMechanics::createThermoHydroMechanicsProcess< 3 >(), ProcessLib::ThermoMechanicalPhaseField::createThermoMechanicalPhaseFieldProcess< 2 >(), ProcessLib::ThermoMechanicalPhaseField::createThermoMechanicalPhaseFieldProcess< 3 >(), ProcessLib::ThermoMechanics::createThermoMechanicsProcess< 2 >(), ProcessLib::ThermoMechanics::createThermoMechanicsProcess< 3 >(), ProcessLib::ThermoRichardsFlow::createThermoRichardsFlowProcess(), ProcessLib::ThermoRichardsMechanics::createThermoRichardsMechanicsProcess< 2 >(), ProcessLib::ThermoRichardsMechanics::createThermoRichardsMechanicsProcess< 3 >(), ProcessLib::TwoPhaseFlowWithPP::createTwoPhaseFlowWithPPProcess(), ProcessLib::TwoPhaseFlowWithPrho::createTwoPhaseFlowWithPrhoProcess(), DBUG(), BaseLib::ConfigTree::getConfigSubtreeList(), anonymous_namespace{generateStructuredMesh.cpp}::getDimension(), MaterialPropertyLib::name, OGS_FATAL, MathLib::p, and anonymous_namespace{FileTools.cpp}::project_directory.
Referenced by ProjectData().
|
private |
Parses the process variables configuration and creates new variables for each variable entry passing the corresponding subtree to the process variable constructor.
Definition at line 376 of file ProjectData.cpp.
References _curves, _mesh_vec, _parameters, _process_variables, DBUG(), BaseLib::findElementOrError(), BaseLib::ConfigTree::getConfigSubtreeList(), and OGS_FATAL.
Referenced by ProjectData().
|
private |
Parses the time loop configuration.
Definition at line 1121 of file ProjectData.cpp.
References _mesh_vec, _nonlinear_solvers, _processes, _time_loop, ProcessLib::createTimeLoop(), DBUG(), and OGS_FATAL.
Referenced by ProjectData().
|
private |
Definition at line 142 of file ProjectData.h.
Referenced by parseCurves(), parseMedia(), parseParameters(), parseProcesses(), and parseProcessVariables().
|
private |
Definition at line 136 of file ProjectData.h.
Referenced by parseChemicalSolverInterface(), parseLinearSolvers(), and parseNonlinearSolvers().
|
private |
Definition at line 129 of file ProjectData.h.
Referenced by ProjectData(), parseMedia(), and parseProcesses().
|
private |
Definition at line 131 of file ProjectData.h.
Referenced by parseMedia(), and parseProcesses().
|
private |
Definition at line 122 of file ProjectData.h.
Referenced by parseChemicalSolverInterface(), parseMedia(), parseParameters(), parseProcesses(), parseProcessVariables(), and parseTimeLoop().
|
private |
Definition at line 139 of file ProjectData.h.
Referenced by parseNonlinearSolvers(), and parseTimeLoop().
|
private |
Buffer for each parameter config passed to the process.
Definition at line 127 of file ProjectData.h.
Referenced by ProjectData(), parseMedia(), parseParameters(), parseProcesses(), and parseProcessVariables().
|
private |
Definition at line 124 of file ProjectData.h.
Referenced by parseProcesses(), and parseProcessVariables().
|
private |
Definition at line 123 of file ProjectData.h.
Referenced by getProcesses(), parseProcesses(), and parseTimeLoop().
|
private |
The time loop used to solve this project's processes.
Definition at line 134 of file ProjectData.h.
Referenced by getTimeLoop(), and parseTimeLoop().