Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Classes | Functions
shammodels Namespace Reference

namespace for models More...

Namespaces

namespace  basegodunov
 namespace for the basegodunov model
 
namespace  sph
 namespace for the sph model
 
namespace  zeus
 namespace for the zeus model
 

Classes

struct  EOSConfig
 Configuration struct for the equation of state used in the hydrodynamic models. More...
 
struct  ExtForceConfig
 
struct  ExtForceVariant
 

Functions

template<class Tvec >
void to_json (nlohmann::json &j, const EOSConfig< Tvec > &p)
 Serialize EOSConfig to json.
 
template<class Tvec >
void from_json (const nlohmann::json &j, EOSConfig< Tvec > &p)
 Deserializes an EOSConfig<Tvec> from a JSON object.
 
template<class Tvec >
void to_json (nlohmann::json &j, const ExtForceVariant< Tvec > &p)
 
template<class Tvec >
void from_json (const nlohmann::json &j, ExtForceVariant< Tvec > &p)
 
template<class Tvec >
void to_json (nlohmann::json &j, const ExtForceConfig< Tvec > &p)
 
template<class Tvec >
void from_json (const nlohmann::json &j, ExtForceConfig< Tvec > &p)
 
std::string report_perf_timestep (f64 rate, u64 nobj, u64 npatch, f64 tcompute, f64 mpi_timer, f64 alloc_time_device, f64 alloc_time_host, size_t max_mem_device, size_t max_mem_host, shamsys::SystemMetrics system_metrics={}, bool report_power_usage=false)
 
template void to_json< f64_3 > (nlohmann::json &j, const EOSConfig< f64_3 > &p)
 
template void from_json< f64_3 > (const nlohmann::json &j, EOSConfig< f64_3 > &p)
 

Detailed Description

namespace for models

Function Documentation

◆ from_json() [1/3]

template<class Tvec >
void shammodels::from_json ( const nlohmann::json &  j,
EOSConfig< Tvec > &  p 
)

Deserializes an EOSConfig<Tvec> from a JSON object.

Template Parameters
TvecThe vector type of the EOSConfig<Tvec>
Parameters
jThe JSON object to deserialize
pThe EOSConfig<Tvec> to deserialize to
See also
shammodels::to_json(nlohmann::json &j, const EOSConfig<Tvec> &p) for details of the format

Throws an std::runtime_error if the JSON object is not in the expected format

Definition at line 121 of file EOSConfig.cpp.

+ Here is the call graph for this function:

◆ from_json() [2/3]

template<class Tvec >
void shammodels::from_json ( const nlohmann::json &  j,
ExtForceConfig< Tvec > &  p 
)
inline

Definition at line 240 of file ExtForceConfig.hpp.

◆ from_json() [3/3]

template<class Tvec >
void shammodels::from_json ( const nlohmann::json &  j,
ExtForceVariant< Tvec > &  p 
)
inline

Definition at line 183 of file ExtForceConfig.hpp.

◆ report_perf_timestep()

std::string shammodels::report_perf_timestep ( f64  rate,
u64  nobj,
u64  npatch,
f64  tcompute,
f64  mpi_timer,
f64  alloc_time_device,
f64  alloc_time_host,
size_t  max_mem_device,
size_t  max_mem_host,
shamsys::SystemMetrics  system_metrics = {},
bool  report_power_usage = false 
)

Definition at line 34 of file timestep_report.cpp.

◆ to_json() [1/3]

template<class Tvec >
void shammodels::to_json ( nlohmann::json &  j,
const EOSConfig< Tvec > &  p 
)

Serialize EOSConfig to json.

This function serializes an EOSConfig to a json object with the following format:

{
"Tvec": "f32_3"|"f64_3",
"eos_type": "adiabatic"|"locally_isothermal"|"locally_isothermal_lp07",
"gamma"?: number,
"cs0"?: number,
"q"?: number,
"r0"?: number
}
Parameters
jjson object
pEOSConfig to serialize

Definition at line 43 of file EOSConfig.cpp.

+ Here is the call graph for this function:

◆ to_json() [2/3]

template<class Tvec >
void shammodels::to_json ( nlohmann::json &  j,
const ExtForceConfig< Tvec > &  p 
)
inline

Definition at line 233 of file ExtForceConfig.hpp.

◆ to_json() [3/3]

template<class Tvec >
void shammodels::to_json ( nlohmann::json &  j,
const ExtForceVariant< Tvec > &  p 
)
inline

Definition at line 141 of file ExtForceConfig.hpp.