Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel > Class Template Reference

GSPH derivative update module. More...

#include <shammodels/gsph/include/shammodels/gsph/modules/UpdateDerivs.hpp>

Collaboration diagram for shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >:

Public Types

using Tscal = shambase::VecComponent<Tvec>
using Kernel = SPHKernel<Tscal>
using Config = SolverConfig<Tvec, SPHKernel>
using Storage = SolverStorage<Tvec, u32>

Public Member Functions

 UpdateDerivs (ShamrockCtx &context, Config &solver_config, Storage &storage)
void update_derivs ()
 Update all derivatives using GSPH Riemann solver approach.

Public Attributes

ShamrockCtxcontext
Config & solver_config
Storage & storage

Static Public Attributes

static constexpr u32 dim = shambase::VectorProperties<Tvec>::dimension

Detailed Description

template<class Tvec, template< class > class SPHKernel>
class shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >

GSPH derivative update module.

Computes the acceleration (dv/dt) and energy rate (du/dt) for all particles using the GSPH formulation. For each particle pair:

  1. Extract left/right states (rho, v, P)
  2. Solve 1D Riemann problem along pair axis to get (p*, v*)
  3. Compute force contribution using p* instead of artificial viscosity
Template Parameters
TvecVector type (e.g., f64_3)
SPHKernelKernel type (e.g., M4, M6, C2, C4, C6 for Wendland)

Definition at line 52 of file UpdateDerivs.hpp.

Member Typedef Documentation

◆ Config

template<class Tvec, template< class > class SPHKernel>
using shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::Config = SolverConfig<Tvec, SPHKernel>

Definition at line 58 of file UpdateDerivs.hpp.

◆ Kernel

template<class Tvec, template< class > class SPHKernel>
using shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::Kernel = SPHKernel<Tscal>

Definition at line 56 of file UpdateDerivs.hpp.

◆ Storage

template<class Tvec, template< class > class SPHKernel>
using shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::Storage = SolverStorage<Tvec, u32>

Definition at line 59 of file UpdateDerivs.hpp.

◆ Tscal

template<class Tvec, template< class > class SPHKernel>
using shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::Tscal = shambase::VecComponent<Tvec>

Definition at line 54 of file UpdateDerivs.hpp.

Constructor & Destructor Documentation

◆ UpdateDerivs()

template<class Tvec, template< class > class SPHKernel>
shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::UpdateDerivs ( ShamrockCtx & context,
Config & solver_config,
Storage & storage )
inline

Definition at line 65 of file UpdateDerivs.hpp.

Member Function Documentation

◆ update_derivs()

template<class Tvec, template< class > class SPHKernel>
void shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::update_derivs ( )

Update all derivatives using GSPH Riemann solver approach.

Dispatches to the appropriate implementation based on RiemannConfig.

Definition at line 40 of file UpdateDerivs.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ context

template<class Tvec, template< class > class SPHKernel>
ShamrockCtx& shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::context

Definition at line 61 of file UpdateDerivs.hpp.

◆ dim

template<class Tvec, template< class > class SPHKernel>
u32 shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::dim = shambase::VectorProperties<Tvec>::dimension
staticconstexpr

Definition at line 55 of file UpdateDerivs.hpp.

◆ solver_config

template<class Tvec, template< class > class SPHKernel>
Config& shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::solver_config

Definition at line 62 of file UpdateDerivs.hpp.

◆ storage

template<class Tvec, template< class > class SPHKernel>
Storage& shammodels::gsph::modules::UpdateDerivs< Tvec, SPHKernel >::storage

Definition at line 63 of file UpdateDerivs.hpp.


The documentation for this class was generated from the following files: