![]() |
Shamrock 2025.10.0
Astrophysical Code
|
namespace for the sph model More...
Namespaces | |
| namespace | modules |
| namespace for the sph model modules | |
Classes | |
| class | BasicSPHGhostHandler |
| struct | AVConfig_None |
| No artificial viscosity: \( q^a_ab = 0\). More... | |
| struct | AVConfig_Constant |
| Constant artificial viscosity: \( \alpha = cte\). More... | |
| struct | AVConfig_VaryingMM97 |
| Morris & Monaghan 1997. More... | |
| struct | AVConfig_VaryingCD10 |
| Cullen & Dehnen 2010. More... | |
| struct | AVConfig_ConstantDisc |
| Constant artificial viscosity for alpha disc viscosity. More... | |
| struct | AVConfig |
| Configuration for the Artificial Viscosity (AV). More... | |
| struct | BCConfig |
| Boundary conditions configuration. More... | |
| struct | MHDConfig |
| struct | PhantomDumpTableHeader |
| Phantom dump table header for a specific type. More... | |
| struct | PhantomDumpBlockArray |
| A helper class to represent a single block of data in a Phantom dump. More... | |
| struct | PhantomDumpBlock |
| A class to represent a single block of data in a Phantom dump. More... | |
| struct | PhantomDump |
| Class representing a Phantom dump file. More... | |
| class | Model |
| The shamrock SPH model. More... | |
| class | SolverStorage |
| struct | SinkEdges |
| struct | SinkParticle |
| struct | TimestepLog |
| struct | EvolveUntilResults |
| struct | WalltimeLimiter |
| Tracks the wall-clock budget for Solver::evolve_until(): decides when the next walltime check is due, and whether the limit has been exceeded. More... | |
| class | Solver |
| The shamrock SPH model. More... | |
| struct | SolverConfig |
| The configuration for a sph solver. More... | |
| struct | CFLConfig |
| The configuration for the CFL condition. More... | |
| struct | ParticleKillingConfig |
| struct | DustEvolCoalaCoag |
| struct | DustConfig |
| struct | SmoothingLengthConfig |
| struct | SelfGravConfig |
| struct | Debug_ph_dump |
Typedefs | |
| template<class T> | |
| using | Component = shambase::StorageComponent<T> |
Functions | |
| template<class Tscal> | |
| void | to_json (nlohmann::json &j, const AVConfig_None< Tscal > &p) |
| template<class Tscal> | |
| void | from_json (const nlohmann::json &j, AVConfig_None< Tscal > &p) |
| template<class Tscal> | |
| void | to_json (nlohmann::json &j, const AVConfig_Constant< Tscal > &p) |
| template<class Tscal> | |
| void | from_json (const nlohmann::json &j, AVConfig_Constant< Tscal > &p) |
| template<class Tscal> | |
| void | to_json (nlohmann::json &j, const AVConfig_VaryingMM97< Tscal > &p) |
| template<class Tscal> | |
| void | from_json (const nlohmann::json &j, AVConfig_VaryingMM97< Tscal > &p) |
| template<class Tscal> | |
| void | to_json (nlohmann::json &j, const AVConfig_VaryingCD10< Tscal > &p) |
| template<class Tscal> | |
| void | from_json (const nlohmann::json &j, AVConfig_VaryingCD10< Tscal > &p) |
| template<class Tscal> | |
| void | to_json (nlohmann::json &j, const AVConfig_ConstantDisc< Tscal > &p) |
| template<class Tscal> | |
| void | from_json (const nlohmann::json &j, AVConfig_ConstantDisc< Tscal > &p) |
| template<class Tvec> | |
| void | to_json (nlohmann::json &j, const AVConfig< Tvec > &p) |
| Convert an AVConfig to a json object. | |
| template<class Tvec> | |
| void | from_json (const nlohmann::json &j, AVConfig< Tvec > &p) |
| Convert a json object to an AVConfig. | |
| template<class Tvec> | |
| void | to_json (nlohmann::json &j, const BCConfig< Tvec > &p) |
| Serialize a BCConfig to a JSON object. | |
| template<class Tvec> | |
| void | from_json (const nlohmann::json &j, BCConfig< Tvec > &p) |
| Deserialize a JSON object into a BCConfig. | |
| template<class Tvec> | |
| void | to_json (nlohmann::json &j, const MHDConfig< Tvec > &p) |
| Serialize a MHDConfig to a JSON object. | |
| template<class Tvec> | |
| void | from_json (const nlohmann::json &j, MHDConfig< Tvec > &p) |
| Deserialize a JSON object into a MHDConfig. | |
| template<class Tvec> | |
| EOSConfig< Tvec > | get_shamrock_eosconfig (PhantomDump &phdump, bool bypass_error) |
| Generate a Shamrock EOS configuration from a PhantomDump object. | |
| template<class Tvec> | |
| void | write_shamrock_eos_in_phantom_dump (EOSConfig< Tvec > &cfg, PhantomDump &dump, bool bypass_error) |
| Write the eos config to th phantom dump header. | |
| template<class Tvec> | |
| AVConfig< Tvec > | get_shamrock_avconfig (PhantomDump &phdump) |
| Generate an Shamrock artificial viscosity configuration from a PhantomDump object. | |
| template<class Tscal> | |
| shamunits::UnitSystem< Tscal > | get_shamrock_units (PhantomDump &phdump) |
| Get the shamrock units object. | |
| template<class Tscal> | |
| void | write_shamrock_units_in_phantom_dump (std::optional< shamunits::UnitSystem< Tscal > > &units, PhantomDump &dump, bool bypass_error) |
| Write shamrock units config into the phantom dump. | |
| template<class Tvec> | |
| BCConfig< Tvec > | get_shamrock_boundary_config (PhantomDump &phdump) |
| Generate an Shamrock boundary configuration from a PhantomDump object. | |
| template<class Tvec> | |
| void | write_shamrock_boundaries_in_phantom_dump (BCConfig< Tvec > &cfg, std::tuple< Tvec, Tvec > box_size, PhantomDump &dump, bool bypass_error) |
| bool | compare_phantom_dumps (PhantomDump &dump1, PhantomDump &dump2) |
| Compare two phantom dumps and report offenses. | |
| template<class Tvec> | |
| std::vector< Tvec > & | get_sink_pos (shamrock::solvergraph::SolverGraphSerializable &sync) |
| Named SoA getters (edges must already exist; registered by Solver::init_solver_graph). Prefer these when a function only needs a subset of sink fields. | |
| template<class Tvec> | |
| std::vector< Tvec > & | get_sink_vel (shamrock::solvergraph::SolverGraphSerializable &sync) |
| template<class Tvec> | |
| std::vector< Tvec > & | get_sink_acc_sph (shamrock::solvergraph::SolverGraphSerializable &sync) |
| template<class Tvec> | |
| std::vector< Tvec > & | get_sink_acc_ext (shamrock::solvergraph::SolverGraphSerializable &sync) |
| template<class Tvec> | |
| std::vector< shambase::VecComponent< Tvec > > & | get_sink_mass (shamrock::solvergraph::SolverGraphSerializable &sync) |
| template<class Tvec> | |
| std::vector< Tvec > & | get_sink_angular_momentum (shamrock::solvergraph::SolverGraphSerializable &sync) |
| template<class Tvec> | |
| std::vector< shambase::VecComponent< Tvec > > & | get_sink_accretion_radius (shamrock::solvergraph::SolverGraphSerializable &sync) |
| bool | has_sink_accreted_dust_mass (shamrock::solvergraph::SolverGraphSerializable &sync) |
| Whether the per species accreted dust mass sink edge is registered. | |
| template<class Tvec> | |
| std::vector< shambase::VecComponent< Tvec > > & | get_sink_accreted_dust_mass (shamrock::solvergraph::SolverGraphSerializable &sync) |
| template<class Tscal> | |
| void | resize_sink_accreted_dust_mass (std::vector< Tscal > &accreted_dust_mass, size_t sink_count, u32 ndust) |
| Resize the flattened per species accreted dust mass to sink_count * ndust. | |
| template<class Tvec> | |
| bool | has_sinks (shamrock::solvergraph::SolverGraphSerializable &sync) |
| Check whether any sinks are present by inspecting sink_pos only. | |
| template<class Tvec> | |
| SinkEdges< Tvec > | get_sink_edges (shamrock::solvergraph::SolverGraphSerializable &sync) |
| Fetch mutable references to the sink SoA synchronized edges. | |
| template<class Tvec> | |
| std::vector< SinkParticle< Tvec > > | to_sink_particles (const SinkEdges< Tvec > &e) |
| Build an AoS sink list from the current SoA edges (Python API / dump helpers). | |
| template<class Tvec> | |
| void | set_sink_particles (SinkEdges< Tvec > &e, const std::vector< SinkParticle< Tvec > > &sinks) |
| Replace SoA sink edge contents from an AoS sink list (legacy dump migration). | |
| template<class Tvec> | |
| void | add_sink (SinkEdges< Tvec > &e, typename SinkEdges< Tvec >::Tscal mass, Tvec pos, Tvec velocity, typename SinkEdges< Tvec >::Tscal accretion_radius) |
| Append one sink to the SoA edges. | |
| template<class Tvec> | |
| void | to_json (nlohmann::json &j, const SinkParticle< Tvec > &p) |
| template<class Tvec> | |
| void | from_json (const nlohmann::json &j, SinkParticle< Tvec > &p) |
| template<class Tscal> | |
| void | to_json (nlohmann::json &j, const CFLConfig< Tscal > &p) |
| Converts a CFLConfig object to a JSON object. | |
| template<class Tscal> | |
| void | from_json (const nlohmann::json &j, CFLConfig< Tscal > &p) |
| Deserializes a CFLConfig object from a JSON object. | |
| template<class Tvec> | |
| void | to_json (nlohmann::json &j, const ParticleKillingConfig< Tvec > &p) |
| template<class Tvec> | |
| void | from_json (const nlohmann::json &j, ParticleKillingConfig< Tvec > &p) |
| void | to_json (nlohmann::json &j, const SmoothingLengthConfig &p) |
| void | from_json (const nlohmann::json &j, SmoothingLengthConfig &p) |
| void | to_json (nlohmann::json &j, const SelfGravConfig &p) |
| JSON serialization for SelfGravConfig. | |
| void | from_json (const nlohmann::json &j, SelfGravConfig &p) |
| JSON deserialization for SelfGravConfig. | |
| template<class Tvec> | |
| void | to_json (nlohmann::json &j, const DustConfig< Tvec > &p) |
| template<class Tvec> | |
| void | from_json (const nlohmann::json &j, DustConfig< Tvec > &p) |
| template<class Tvec, template< class > class SPHKernel> | |
| void | to_json (nlohmann::json &j, const SolverConfig< Tvec, SPHKernel > &p) |
| Serializes a SolverConfig object to a JSON object. | |
| template<class Tvec, template< class > class SPHKernel> | |
| void | from_json (const nlohmann::json &j, SolverConfig< Tvec, SPHKernel > &p) |
| Deserializes a SolverConfig object from a JSON object. | |
| template EOSConfig< f32_3 > | get_shamrock_eosconfig< f32_3 > (PhantomDump &phdump, bool bypass_error) |
| explicit instanciation for f32_3 | |
| template EOSConfig< f64_3 > | get_shamrock_eosconfig< f64_3 > (PhantomDump &phdump, bool bypass_error) |
| explicit instanciation for f64_3 | |
| template void | write_shamrock_eos_in_phantom_dump< f32_3 > (EOSConfig< f32_3 > &cfg, PhantomDump &dump, bool bypass_error) |
| explicit instanciation for f32_3 | |
| template void | write_shamrock_eos_in_phantom_dump< f64_3 > (EOSConfig< f64_3 > &cfg, PhantomDump &dump, bool bypass_error) |
| explicit instanciation for f64_3 | |
| template AVConfig< f32_3 > | get_shamrock_avconfig< f32_3 > (PhantomDump &phdump) |
| explicit instanciation for f32_3 | |
| template AVConfig< f64_3 > | get_shamrock_avconfig< f64_3 > (PhantomDump &phdump) |
| explicit instanciation for f64_3 | |
| template shamunits::UnitSystem< f32 > | get_shamrock_units< f32 > (PhantomDump &phdump) |
| explicit instanciation for f32_3 | |
| template shamunits::UnitSystem< f64 > | get_shamrock_units< f64 > (PhantomDump &phdump) |
| explicit instanciation for f64_3 | |
| template void | write_shamrock_units_in_phantom_dump< f64 > (std::optional< shamunits::UnitSystem< f64 > > &units, PhantomDump &dump, bool bypass_error) |
| template BCConfig< f32_3 > | get_shamrock_boundary_config< f32_3 > (PhantomDump &phdump) |
| explicit instanciation for f32_3 | |
| template BCConfig< f64_3 > | get_shamrock_boundary_config< f64_3 > (PhantomDump &phdump) |
| explicit instanciation for f64_3 | |
| template void | write_shamrock_boundaries_in_phantom_dump< f32_3 > (BCConfig< f32_3 > &cfg, std::tuple< f32_3, f32_3 > box_size, PhantomDump &dump, bool bypass_error) |
| explicit instanciation for f32_3 | |
| template void | write_shamrock_boundaries_in_phantom_dump< f64_3 > (BCConfig< f64_3 > &cfg, std::tuple< f64_3, f64_3 > box_size, PhantomDump &dump, bool bypass_error) |
| explicit instanciation for f64_3 | |
| template<class Tvec> | |
| void | fill_blocks (PhantomDumpBlock &block, Debug_ph_dump< Tvec > &info) |
| template<class Tvec> | |
| shammodels::sph::PhantomDump | make_interface_debug_phantom_dump (Debug_ph_dump< Tvec > info) |
namespace for the sph model
| using shammodels::sph::Component = shambase::StorageComponent<T> |
Definition at line 45 of file SolverStorage.hpp.
|
inline |
Append one sink to the SoA edges.
Definition at line 240 of file sink_edges_helper.hpp.
| bool shammodels::sph::compare_phantom_dumps | ( | PhantomDump & | dump1, |
| PhantomDump & | dump2 ) |
Compare two phantom dumps and report offenses.
Definition at line 396 of file PhantomDump.cpp.
| void shammodels::sph::fill_blocks | ( | PhantomDumpBlock & | block, |
| Debug_ph_dump< Tvec > & | info ) |
Definition at line 1436 of file Solver.cpp.
|
inline |
Convert a json object to an AVConfig.
| j | the json object to be used |
| p | the AVConfig object to be filled |
Definition at line 370 of file AVConfig.hpp.
|
inline |
Definition at line 67 of file AVConfig.hpp.
|
inline |
Definition at line 165 of file AVConfig.hpp.
|
inline |
Definition at line 41 of file AVConfig.hpp.
|
inline |
Definition at line 135 of file AVConfig.hpp.
|
inline |
Definition at line 100 of file AVConfig.hpp.
|
inline |
Deserialize a JSON object into a BCConfig.
| [in] | j | The JSON object to read from |
| [out] | p | The BCConfig to deserialize |
Definition at line 188 of file BCConfig.hpp.
|
inline |
Deserializes a CFLConfig object from a JSON object.
| j | The JSON object to deserialize from. |
| p | The CFLConfig object to populate. |
Definition at line 1303 of file SolverConfig.hpp.
|
inline |
Definition at line 1483 of file SolverConfig.hpp.
|
inline |
Deserialize a JSON object into a MHDConfig.
| [in] | j | The JSON object to read from |
| [out] | p | The MHDConfig to deserialize |
Definition at line 182 of file MHDConfig.hpp.
|
inline |
Definition at line 1332 of file SolverConfig.hpp.
|
inline |
JSON deserialization for SelfGravConfig.
Definition at line 1433 of file SolverConfig.hpp.
|
inline |
Definition at line 57 of file SinkPartStruct.hpp.
|
inline |
Definition at line 1373 of file SolverConfig.hpp.
|
inline |
Deserializes a SolverConfig object from a JSON object.
| j | The JSON object to deserialize from. |
| p | The SolverConfig object to populate. |
Definition at line 1563 of file SolverConfig.hpp.
| AVConfig< Tvec > shammodels::sph::get_shamrock_avconfig | ( | PhantomDump & | phdump | ) |
Generate an Shamrock artificial viscosity configuration from a PhantomDump object.
| phdump | Reference to the PhantomDump object. |
Definition at line 144 of file Phantom2Shamrock.cpp.
| BCConfig< Tvec > shammodels::sph::get_shamrock_boundary_config | ( | PhantomDump & | phdump | ) |
Generate an Shamrock boundary configuration from a PhantomDump object.
| phdump | Reference to the PhantomDump object. |
Definition at line 229 of file Phantom2Shamrock.cpp.
| EOSConfig< Tvec > shammodels::sph::get_shamrock_eosconfig | ( | PhantomDump & | phdump, |
| bool | bypass_error ) |
Generate a Shamrock EOS configuration from a PhantomDump object.
| phdump | Reference to the PhantomDump object. |
| bypass_error | Flag to bypass error handling. |
| std::runtime_error | If an error occurs during configuration retrieval. |
Definition at line 25 of file Phantom2Shamrock.cpp.
| shamunits::UnitSystem< Tscal > shammodels::sph::get_shamrock_units | ( | PhantomDump & | phdump | ) |
Get the shamrock units object.
| Tscal |
| phdump |
Definition at line 175 of file Phantom2Shamrock.cpp.
|
inline |
Definition at line 86 of file sink_edges_helper.hpp.
|
inline |
Definition at line 80 of file sink_edges_helper.hpp.
|
inline |
Definition at line 120 of file sink_edges_helper.hpp.
|
inline |
Definition at line 104 of file sink_edges_helper.hpp.
|
inline |
Definition at line 98 of file sink_edges_helper.hpp.
|
inline |
Fetch mutable references to the sink SoA synchronized edges.
Edges must already exist (registered by Solver::init_solver_graph). Prefer named getters when only a subset of fields is needed.
Definition at line 169 of file sink_edges_helper.hpp.
|
inline |
Definition at line 92 of file sink_edges_helper.hpp.
|
inline |
Named SoA getters (edges must already exist; registered by Solver::init_solver_graph). Prefer these when a function only needs a subset of sink fields.
Definition at line 70 of file sink_edges_helper.hpp.
|
inline |
Definition at line 75 of file sink_edges_helper.hpp.
|
inline |
Whether the per species accreted dust mass sink edge is registered.
Only registered with monofluid TVA dust. Flattened as [i_sink * ndust + j_dust].
Definition at line 115 of file sink_edges_helper.hpp.
|
inline |
Check whether any sinks are present by inspecting sink_pos only.
Prefer this for early-exit checks instead of fetching the full SinkEdges struct. Edges must already exist (registered by Solver::init_solver_graph).
Definition at line 158 of file sink_edges_helper.hpp.
| shammodels::sph::PhantomDump shammodels::sph::make_interface_debug_phantom_dump | ( | Debug_ph_dump< Tvec > | info | ) |
Definition at line 1473 of file Solver.cpp.
|
inline |
Resize the flattened per species accreted dust mass to sink_count * ndust.
Only pads with zeros the sinks that have no entry yet (sinks added since the last call, or loaded from a dump that predates the tracking). Throws if the stored layout does not match ndust, e.g. if the number of dust species changed after dust has been tracked.
Definition at line 134 of file sink_edges_helper.hpp.
|
inline |
Replace SoA sink edge contents from an AoS sink list (legacy dump migration).
Definition at line 207 of file sink_edges_helper.hpp.
|
inline |
Convert an AVConfig to a json object.
| j | the json object to be filled |
| p | the AVConfig object |
Definition at line 355 of file AVConfig.hpp.
|
inline |
Definition at line 58 of file AVConfig.hpp.
|
inline |
Definition at line 156 of file AVConfig.hpp.
|
inline |
Definition at line 38 of file AVConfig.hpp.
|
inline |
Definition at line 124 of file AVConfig.hpp.
|
inline |
Definition at line 89 of file AVConfig.hpp.
|
inline |
Serialize a BCConfig to a JSON object.
| [out] | j | The JSON object to write to |
| [in] | p | The BCConfig to serialize |
Definition at line 152 of file BCConfig.hpp.
|
inline |
Converts a CFLConfig object to a JSON object.
| j | The JSON object to be populated. |
| p | The CFLConfig object to be converted. |
Definition at line 1288 of file SolverConfig.hpp.
|
inline |
Definition at line 1473 of file SolverConfig.hpp.
|
inline |
Serialize a MHDConfig to a JSON object.
| [out] | j | The JSON object to write to |
| [in] | p | The MHDConfig to serialize |
Definition at line 142 of file MHDConfig.hpp.
|
inline |
Definition at line 1319 of file SolverConfig.hpp.
|
inline |
JSON serialization for SelfGravConfig.
Definition at line 1387 of file SolverConfig.hpp.
|
inline |
Definition at line 40 of file SinkPartStruct.hpp.
|
inline |
Definition at line 1347 of file SolverConfig.hpp.
|
inline |
Serializes a SolverConfig object to a JSON object.
| j | The JSON object to serialize to. |
| p | The SolverConfig object to serialize. |
Definition at line 1499 of file SolverConfig.hpp.
|
inline |
Build an AoS sink list from the current SoA edges (Python API / dump helpers).
Definition at line 185 of file sink_edges_helper.hpp.
| void shammodels::sph::write_shamrock_boundaries_in_phantom_dump | ( | BCConfig< Tvec > & | cfg, |
| std::tuple< Tvec, Tvec > | box_size, | ||
| PhantomDump & | dump, | ||
| bool | bypass_error ) |
Definition at line 243 of file Phantom2Shamrock.cpp.
| void shammodels::sph::write_shamrock_eos_in_phantom_dump | ( | EOSConfig< Tvec > & | cfg, |
| PhantomDump & | dump, | ||
| bool | bypass_error ) |
Write the eos config to th phantom dump header.
Definition at line 80 of file Phantom2Shamrock.cpp.
| void shammodels::sph::write_shamrock_units_in_phantom_dump | ( | std::optional< shamunits::UnitSystem< Tscal > > & | units, |
| PhantomDump & | dump, | ||
| bool | bypass_error ) |
Write shamrock units config into the phantom dump.
Definition at line 192 of file Phantom2Shamrock.cpp.