Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
UpdateDerivs.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
32#include "shambackends/vec.hpp"
36
37namespace shammodels::gsph::modules {
38
51 template<class Tvec, template<class> class SPHKernel>
53 public:
54 using Tscal = shambase::VecComponent<Tvec>;
56 using Kernel = SPHKernel<Tscal>;
57
60
61 ShamrockCtx &context;
62 Config &solver_config;
63 Storage &storage;
64
65 UpdateDerivs(ShamrockCtx &context, Config &solver_config, Storage &storage)
66 : context(context), solver_config(solver_config), storage(storage) {}
67
73 void update_derivs();
74
75 private:
76 inline PatchScheduler &scheduler() { return shambase::get_check_ref(context.sched); }
77
78 using Cfg_Riemann = typename Config::RiemannConfig;
79 using Iterative = typename Cfg_Riemann::Iterative;
80 using HLLC = typename Cfg_Riemann::HLLC;
81
85 void update_derivs_iterative(Iterative cfg);
86
90 void update_derivs_hllc(HLLC cfg);
91 };
92
93} // namespace shammodels::gsph::modules
std::uint32_t u32
32 bit unsigned integer
The MPI scheduler.
GSPH derivative update module.
void update_derivs()
Update all derivatives using GSPH Riemann solver approach.
Configuration for the Godunov SPH (GSPH) solver.
Storage for GSPH solver runtime data.
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...
Definition memory.hpp:110
The configuration for a GSPH solver.
Runtime storage for GSPH solver.