https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Namespaces | Functions
JsonIO.C File Reference

Go to the source code of this file.

Namespaces

namespace  libMesh
 The following methods are specializations for using the libMesh::Parallel::packed_range_* routines for std::strings.
 

Functions

void to_json (nlohmann::json &json, const MooseApp &app)
 
void libMesh::to_json (nlohmann::json &json, const BoundingBox &p)
 
void libMesh::to_json (nlohmann::json &json, const Point &p)
 
void libMesh::to_json (nlohmann::json &json, const DenseVector< Real > &vector)
 
void libMesh::to_json (nlohmann::json &json, const DenseMatrix< Real > &matrix)
 
void libMesh::to_json (nlohmann::json &json, const std::unique_ptr< NumericVector< Number > > &vector)
 

Function Documentation

◆ to_json()

void to_json ( nlohmann::json &  json,
const MooseApp app 
)

Definition at line 23 of file JsonIO.C.

24{
25 json["app_name"] = app.name();
26 json["current_time"] = app.getSystemInfo().getTimeStamp();
27 json["executable"] = app.getSystemInfo().getExecutable();
28 json["executable_time"] = app.getSystemInfo().getExecutableTimeStamp(json["executable"]);
29
30 json["moose_version"] = MOOSE_REVISION;
31 json["libmesh_version"] = LIBMESH_BUILD_VERSION;
32#ifdef LIBMESH_DETECTED_PETSC_VERSION_MAJOR
33 json["petsc_version"] = std::to_string(LIBMESH_DETECTED_PETSC_VERSION_MAJOR) + "." +
34 std::to_string(LIBMESH_DETECTED_PETSC_VERSION_MINOR) + "." +
35 std::to_string(LIBMESH_DETECTED_PETSC_VERSION_SUBMINOR);
36#endif
37#ifdef LIBMESH_DETECTED_SLEPC_VERSION_MAJOR
38 json["slepc_version"] = std::to_string(LIBMESH_DETECTED_SLEPC_VERSION_MAJOR) + "." +
39 std::to_string(LIBMESH_DETECTED_SLEPC_VERSION_MINOR) + "." +
40 std::to_string(LIBMESH_DETECTED_SLEPC_VERSION_SUBMINOR);
41#endif
42}
const SystemInfo & getSystemInfo() const
Get SystemInfo object.
Definition MooseApp.h:567
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
std::string getExecutableTimeStamp() const
Definition SystemInfo.C:145
std::string getExecutable() const
Definition SystemInfo.C:139
std::string getTimeStamp(std::time_t *time_stamp=NULL) const
Definition SystemInfo.C:66

Referenced by to_json().