Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Phantom2Shamrock.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
24#include <cstdlib>
25#include <optional>
26
27namespace shammodels::sph {
28
39 template<class Tvec>
40 EOSConfig<Tvec> get_shamrock_eosconfig(PhantomDump &phdump, bool bypass_error);
41
43 template<class Tvec>
45 EOSConfig<Tvec> &cfg, PhantomDump &dump, bool bypass_error);
46
54 template<class Tvec>
55 AVConfig<Tvec> get_shamrock_avconfig(PhantomDump &phdump);
56
64 template<class Tscal>
66
68 template<class Tscal>
70 std::optional<shamunits::UnitSystem<Tscal>> &units, PhantomDump &dump, bool bypass_error);
71
79 template<class Tvec>
80 BCConfig<Tvec> get_shamrock_boundary_config(PhantomDump &phdump);
81
82 template<class Tvec>
83 void write_shamrock_boundaries_in_phantom_dump(
84 BCConfig<Tvec> &cfg, std::tuple<Tvec, Tvec> box_size, PhantomDump &dump, bool bypass_error);
85
86} // namespace shammodels::sph
Defines a unit system.
namespace for the sph model
BCConfig< Tvec > get_shamrock_boundary_config(PhantomDump &phdump)
Generate an Shamrock boundary configuration from a PhantomDump object.
AVConfig< Tvec > get_shamrock_avconfig(PhantomDump &phdump)
Generate an Shamrock artificial viscosity configuration from a PhantomDump object.
EOSConfig< Tvec > get_shamrock_eosconfig(PhantomDump &phdump, bool bypass_error)
Generate a Shamrock EOS configuration from a PhantomDump object.
void write_shamrock_units_in_phantom_dump(std::optional< shamunits::UnitSystem< Tscal > > &units, PhantomDump &dump, bool bypass_error)
Write shamrock units config into the phantom dump.
shamunits::UnitSystem< Tscal > get_shamrock_units(PhantomDump &phdump)
Get the shamrock units object.
void write_shamrock_eos_in_phantom_dump(EOSConfig< Tvec > &cfg, PhantomDump &dump, bool bypass_error)
Write the eos config to th phantom dump header.