OGS
Simulation.h
Go to the documentation of this file.
1
13#include <optional>
14#ifdef USE_PETSC
15#include <vtkMPIController.h>
16#include <vtkSmartPointer.h>
17#endif
18
22
23class ProjectData;
24namespace MeshLib
25{
26class Mesh;
27}
28
29class Simulation final
30{
31public:
32 OGS_EXPORT_SYMBOL Simulation(int argc, char* argv[]);
33
35 std::string const& project,
36 std::vector<std::string> const& xml_patch_file_names,
37 bool reference_path_is_set, std::string const& reference_path,
38 bool nonfatal, std::string const& outdir, std::string const& mesh_dir,
39 std::string const& script_dir, bool write_prj);
40
41 OGS_EXPORT_SYMBOL double currentTime() const;
42 OGS_EXPORT_SYMBOL double endTime() const;
46 OGS_EXPORT_SYMBOL MeshLib::Mesh& getMesh(std::string const& name);
47
48 OGS_EXPORT_SYMBOL std::optional<ApplicationsLib::TestDefinition>
49 getTestDefinition() const;
50
52
53private:
55#if defined(USE_PETSC)
56 vtkSmartPointer<vtkMPIController> controller;
57#endif
58 std::unique_ptr<ProjectData> project_data;
59 std::optional<ApplicationsLib::TestDefinition> test_definition;
60#if defined(OGS_USE_INSITU)
61 bool isInsituConfigured = false;
62#endif
63};
#define OGS_EXPORT_SYMBOL
OGS_EXPORT_SYMBOL double currentTime() const
OGS_EXPORT_SYMBOL bool executeSimulation()
OGS_EXPORT_SYMBOL std::optional< ApplicationsLib::TestDefinition > getTestDefinition() const
std::unique_ptr< ProjectData > project_data
Definition Simulation.h:58
bool isInsituConfigured
Definition Simulation.h:61
std::optional< ApplicationsLib::TestDefinition > test_definition
Definition Simulation.h:59
OGS_EXPORT_SYMBOL MeshLib::Mesh & getMesh(std::string const &name)
OGS_EXPORT_SYMBOL double endTime() const
OGS_EXPORT_SYMBOL ~Simulation()
OGS_EXPORT_SYMBOL void initializeDataStructures(std::string const &project, std::vector< std::string > const &xml_patch_file_names, bool reference_path_is_set, std::string const &reference_path, bool nonfatal, std::string const &outdir, std::string const &mesh_dir, std::string const &script_dir, bool write_prj)
ApplicationsLib::LinearSolverLibrarySetup linear_solver_library_setup
Definition Simulation.h:54
OGS_EXPORT_SYMBOL bool executeTimeStep()
vtkSmartPointer< vtkMPIController > controller
Definition Simulation.h:56
OGS_EXPORT_SYMBOL void outputLastTimeStep() const
OGS_EXPORT_SYMBOL Simulation(int argc, char *argv[])