https://mooseframework.inl.gov
Classes | Namespaces | Functions
JsonIO.h File Reference

Go to the source code of this file.

Classes

class  libMesh::DenseVector< T >
 
class  libMesh::DenseMatrix< T >
 
class  libMesh::NumericVector< T >
 
struct  nlohmann::adl_serializer< std::unique_ptr< T > >
 

Namespaces

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

Functions

void to_json (nlohmann::json &json, const MooseApp &app)
 
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 22 of file JsonIO.C.

Referenced by libMesh::to_json().

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