![]() |
OGS
|
Implementation of OpenGeoSys simulation application python module.
Definition in file ogs_python_module.cpp.
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <spdlog/spdlog.h>
#include <tclap/CmdLine.h>
#include <algorithm>
#include "../ogs.OGSMesh/OGSMesh.h"
#include "Applications/ApplicationsLib/Simulation.h"
#include "Applications/ApplicationsLib/TestDefinition.h"
#include "BaseLib/DateTools.h"
#include "BaseLib/Error.h"
#include "BaseLib/FileTools.h"
#include "BaseLib/Logging.h"
#include "BaseLib/RunTime.h"
#include "CommandLineArgumentParser.h"
#include "InfoLib/GitInfo.h"
#include "ogs_embedded_python.h"
Go to the source code of this file.
Classes | |
class | OGSSimulation |
Functions | |
int | checkCommandLineArguments (std::vector< std::string > &argv_str) |
PYBIND11_MODULE (OGSSimulator, m) | |
Variables | |
static constexpr int | EXIT_ARGPARSE_FAILURE = 3 |
static constexpr int | EXIT_ARGPARSE_EXIT_OK = 2 |
int checkCommandLineArguments | ( | std::vector< std::string > & | argv_str | ) |
Definition at line 37 of file ogs_python_module.cpp.
References ERR(), EXIT_ARGPARSE_EXIT_OK, EXIT_ARGPARSE_FAILURE, INFO(), parseCommandLineArguments(), and BaseLib::unsetProjectDirectory().
Referenced by PYBIND11_MODULE().
PYBIND11_MODULE | ( | OGSSimulator | , |
m | ) |
To use this module import dependencies first: import ogs.mesh as mesh import ogs.OGSSimulator as sim
See also https://github.com/pybind/pybind11/issues/1391#issuecomment-912642979
Definition at line 267 of file ogs_python_module.cpp.
References checkCommandLineArguments(), OGSSimulation::currentTime(), OGSSimulation::endTime(), OGSSimulation::executeSimulation(), OGSSimulation::executeTimeStep(), OGSSimulation::finalize(), OGSSimulation::getMesh(), OGSSimulation::getMeshNames(), and BaseLib::initOGSLogger().
|
staticconstexpr |
Definition at line 33 of file ogs_python_module.cpp.
Referenced by checkCommandLineArguments().
|
staticconstexpr |
Definition at line 32 of file ogs_python_module.cpp.
Referenced by checkCommandLineArguments().