Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
sink_edges_helper.hpp File Reference

Helpers to access SPH sink particles stored as SoA synchronized data edges. More...

Include dependency graph for sink_edges_helper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  shambase::TypeNameInfo< std::vector< T > >
struct  shammodels::sph::SinkEdges< Tvec >

Namespaces

namespace  shambase
 namespace for basic c++ utilities
namespace  shammodels
 namespace for models
namespace  shammodels::sph
 namespace for the sph model

Functions

template<class T>
void shammodels::sph::details::ensure_sync_data_edge (shamrock::solvergraph::SolverGraphSerializable &sync_data, const std::string &name, const std::string &tex_symbol, T init_value)
template<class T>
T & shammodels::sph::details::get_sync_data (shamrock::solvergraph::SolverGraphSerializable &sync, const std::string &name)
template<class Tvec>
void shammodels::sph::ensure_sink_edges (shamrock::solvergraph::SolverGraphSerializable &sync)
 Register sink SoA synchronized edges if missing (idempotent).
template<class Tvec>
std::vector< Tvec > & shammodels::sph::get_sink_pos (shamrock::solvergraph::SolverGraphSerializable &sync)
 Named SoA getters (edges must already exist; call ensure_sink_edges first). Prefer these when a function only needs a subset of sink fields.
template<class Tvec>
std::vector< Tvec > & shammodels::sph::get_sink_vel (shamrock::solvergraph::SolverGraphSerializable &sync)
template<class Tvec>
std::vector< Tvec > & shammodels::sph::get_sink_acc_sph (shamrock::solvergraph::SolverGraphSerializable &sync)
template<class Tvec>
std::vector< Tvec > & shammodels::sph::get_sink_acc_ext (shamrock::solvergraph::SolverGraphSerializable &sync)
template<class Tvec>
std::vector< shambase::VecComponent< Tvec > > & shammodels::sph::get_sink_mass (shamrock::solvergraph::SolverGraphSerializable &sync)
template<class Tvec>
std::vector< Tvec > & shammodels::sph::get_sink_angular_momentum (shamrock::solvergraph::SolverGraphSerializable &sync)
template<class Tvec>
std::vector< shambase::VecComponent< Tvec > > & shammodels::sph::get_sink_accretion_radius (shamrock::solvergraph::SolverGraphSerializable &sync)
template<class Tvec>
bool shammodels::sph::has_sinks (shamrock::solvergraph::SolverGraphSerializable &sync)
 Check whether any sinks are present by inspecting sink_pos only.
template<class Tvec>
SinkEdges< Tvec > shammodels::sph::get_sink_edges (shamrock::solvergraph::SolverGraphSerializable &sync)
 Fetch mutable references to the sink SoA synchronized edges.
template<class Tvec>
std::vector< SinkParticle< Tvec > > shammodels::sph::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 shammodels::sph::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 shammodels::sph::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.

Detailed Description

Helpers to access SPH sink particles stored as SoA synchronized data edges.

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file sink_edges_helper.hpp.

Function Documentation

◆ ensure_sync_data_edge()

template<class T>
void shammodels::sph::details::ensure_sync_data_edge ( shamrock::solvergraph::SolverGraphSerializable & sync_data,
const std::string & name,
const std::string & tex_symbol,
T init_value )
inline

Definition at line 55 of file sink_edges_helper.hpp.

◆ get_sync_data()

template<class T>
T & shammodels::sph::details::get_sync_data ( shamrock::solvergraph::SolverGraphSerializable & sync,
const std::string & name )
inline

Definition at line 69 of file sink_edges_helper.hpp.