Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
SolverConfig.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
20#include "shambase/string.hpp"
21#include "shambackends/vec.hpp"
27
28namespace shammodels::zeus {
29
30 template<class Tvec, class TgridVec>
31 struct SolverConfig {
32
33 using Tscal = shambase::VecComponent<Tvec>;
34
35 Tscal eos_gamma = 5. / 3.;
36
37 Tscal grid_coord_to_pos_fact = 1;
38
39 static constexpr u32 NsideBlockPow = 1;
41
42 inline void set_eos_gamma(Tscal gamma) { eos_gamma = gamma; }
43
44 bool use_consistent_transport = false;
45 bool use_van_leer = true;
46
47 PatchSchedulerConfig scheduler_conf = {};
48
49 inline void check_config() {
50 if (grid_coord_to_pos_fact <= 0) {
52 "grid_coord_to_pos_fact must be > 0, got {}", grid_coord_to_pos_fact));
53 }
54 }
55 };
56
57} // namespace shammodels::zeus
utility to manipulate AMR blocks
MPI scheduler.
std::uint32_t u32
32 bit unsigned integer
This header file contains utility functions related to exception handling in the code.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
namespace for the zeus model
utility class to handle AMR blocks
Definition AMRBlock.hpp:35