Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
LoopSmoothingLengthIter.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
18
19#include "shambackends/vec.hpp"
23#include <memory>
24
25#define NODE_EDGES(X_RO, X_RW) \
26 X_RO(shamrock::solvergraph::IFieldRefs<Tscal>, eps_h) \
27 \
28 X_RW(shamrock::solvergraph::IDataEdge<bool>, is_converged)
29
31
32 template<class Tvec>
33 class LoopSmoothingLengthIter : public shamrock::solvergraph::INode {
34
35 std::shared_ptr<INode> iterate_smth_length_once_ptr;
36
37 using Tscal = shambase::VecComponent<Tvec>;
38
39 Tscal epsilon_h;
40 u32 h_iter_per_subcycles;
41 bool print_info;
42
43 public:
44 LoopSmoothingLengthIter(
45 std::shared_ptr<INode> iterate_smth_length_once_ptr,
46 Tscal epsilon_h,
47 u32 h_iter_per_subcycles,
48 bool print_info)
49 : iterate_smth_length_once_ptr(std::move(iterate_smth_length_once_ptr)),
50 epsilon_h(epsilon_h), h_iter_per_subcycles(h_iter_per_subcycles),
51 print_info(print_info) {}
52
53 EXPAND_NODE_EDGES(NODE_EDGES)
54
56
57 inline virtual std::string _impl_get_label() const { return "LoopSmoothingLengthIter"; };
58
59 virtual std::string _impl_get_tex() const;
60 };
61} // namespace shammodels::sph::modules
62
63#undef NODE_EDGES
64
std::uint32_t u32
32 bit unsigned integer
virtual std::string _impl_get_label() const
get the label of the node
virtual std::string _impl_get_tex() const
get the tex of the node
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition INode.hpp:31
namespace for the sph model modules