Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
ModifierApplyCustomWarp.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
26 template<class Tvec, template<class> class SPHKernel>
28 using Tscal = shambase::VecComponent<Tvec>;
30
32
33 ShamrockCtx &context;
34 SetupNodePtr parent;
35
36 std::function<Tscal(Tscal)> inc_profile;
37 std::function<Tscal(Tscal)> psi_profile;
38 std::function<Tvec(Tscal)> k_profile;
39
40 public:
42 ShamrockCtx &context,
43 Config &solver_config,
44 SetupNodePtr parent,
45 std::function<Tscal(Tscal)> inc_profile,
46 std::function<Tscal(Tscal)> psi_profile,
47 std::function<Tvec(Tscal)> k_profile)
48 : context(context), parent(parent), inc_profile(inc_profile), psi_profile(psi_profile),
49 k_profile(k_profile) {}
50
51 bool is_done() { return parent->is_done(); }
52
54
55 std::string get_name() { return "ApplyCustomWarp"; }
56
58 return ISPHSetupNode_Dot{get_name(), 2, {parent->get_dot_subgraph()}};
59 }
60 };
61} // namespace shammodels::sph::modules
std::uint32_t u32
32 bit unsigned integer
This class is an interface that all SPH setup nodes must implement. It describe an operation associat...
bool is_done()
This function return true if the setup is done.
ISPHSetupNode_Dot get_dot_subgraph()
Get a dot subgraph describing the node and its childrens (recursively)
shamrock::patch::PatchDataLayer next_n(u32 nmax)
This function generate patchdata with at most nmax per MPI ranks This function is always assumed as c...
PatchDataLayer container class, the layout is described in patchdata_layout.
namespace for the sph model modules
std::shared_ptr< ISPHSetupNode > SetupNodePtr
Alias for a shared pointer to an ISPHSetupNode.
The configuration for a sph solver.
This struct is used to generate a dot graph of the setup tree.