Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels
zeus
include
shammodels
zeus
modules
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
"
20
#include "
shammodels/zeus/SolverConfig.hpp
"
21
#include "
shamphys/SodTube.hpp
"
22
namespace
shammodels::zeus::modules
{
23
24
template
<
class
Tvec,
class
Tgr
id
Vec>
25
class
AnalysisSodTube
{
26
public
:
27
using
Tscal = shambase::VecComponent<Tvec>;
28
using
Tgridscal = shambase::VecComponent<TgridVec>;
29
static
constexpr
u32
dim =
shambase::VectorProperties<Tvec>::dimension
;
30
31
using
Config
=
SolverConfig<Tvec, TgridVec>
;
32
using
Storage
=
SolverStorage<Tvec, TgridVec, u64>
;
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
45
AnalysisSodTube
(
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
SodTube.hpp
u32
std::uint32_t u32
32 bit unsigned integer
Definition
aliases_int.hpp:27
PatchScheduler
The MPI scheduler.
Definition
PatchScheduler.hpp:85
ShamrockCtx
Definition
ShamrockCtx.hpp:42
shammodels::zeus::SolverStorage
Definition
SolverStorage.hpp:37
shammodels::zeus::modules::AnalysisSodTube
Definition
AnalysisSodTube.hpp:25
shamphys::SodTube
Definition
SodTube.hpp:22
shambase::get_check_ref
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
shammodels::zeus::modules
namespace for the zeus model modules
Definition
AMRTree.hpp:23
sham::VectorProperties
Definition
vec.hpp:25
shammodels::amr::AMRBlock
utility class to handle AMR blocks
Definition
AMRBlock.hpp:35
shammodels::zeus::SolverConfig
Definition
SolverConfig.hpp:31
shammodels::zeus::modules::AnalysisSodTube::field_val
Definition
AnalysisSodTube.hpp:58
vec.hpp
SolverConfig.hpp
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8