Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
AnalysisSodTube.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
19#include "shambackends/vec.hpp"
21#include "shamphys/SodTube.hpp"
23
24 template<class Tvec, class TgridVec>
26 public:
27 using Tscal = shambase::VecComponent<Tvec>;
28 using Tgridscal = shambase::VecComponent<TgridVec>;
30
33 using AMRBlock = typename Config::AMRBlock;
34
35 ShamrockCtx &context;
36 Config &solver_config;
37 Storage &storage;
38
39 shamphys::SodTube solution;
40 Tvec direction;
41 Tscal time_val;
42 Tscal x_ref; // shock centered on x_ref
43 Tscal x_min, x_max; // check only between [x_min, x_max ]
44
46 ShamrockCtx &context,
47 Config &solver_config,
48 Storage &storage,
49 shamphys::SodTube &solution,
50 Tvec direction,
51 Tscal time_val,
52 Tscal x_ref,
53 Tscal x_min,
54 Tscal x_max)
55 : context(context), solver_config(solver_config), storage(storage), solution(solution),
56 direction(direction), time_val(time_val), x_ref(x_ref), x_min(x_min), x_max(x_max) {}
57
58 struct field_val {
59 Tscal rho;
60 Tvec v;
61 Tscal P;
62 };
63
64 field_val compute_L2_dist();
65
66 private:
67 inline PatchScheduler &scheduler() { return shambase::get_check_ref(context.sched); }
68 };
69} // namespace shammodels::zeus::modules
std::uint32_t u32
32 bit unsigned integer
The MPI scheduler.
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
namespace for the zeus model modules
Definition AMRTree.hpp:23
utility class to handle AMR blocks
Definition AMRBlock.hpp:35