Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
BiCGSTABInit.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
22#include "shambackends/vec.hpp"
28
29#define NODE_EDGES(X_RO, X_RW) \
30 /* ------------------- inputs ------------------- */ \
31 X_RO(shamrock::solvergraph::Indexes<u32>, sizes) \
32 X_RO(CellGraphEdge, cell_neigh_graph) \
33 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, spans_block_cell_sizes) \
34 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, spans_phi) \
35 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, spans_rho) \
36 X_RO(shamrock::solvergraph::ScalarEdge<Tscal>, mean_rho) \
37 \
38 /* ------------------- outputs ------------------- */ \
39 X_RW(shamrock::solvergraph::IFieldSpan<Tscal>, spans_phi_res) \
40 X_RW(shamrock::solvergraph::IFieldSpan<Tscal>, spans_phi_res_bis) \
41 X_RW(shamrock::solvergraph::IFieldSpan<Tscal>, spans_phi_p) \
42 X_RW(shamrock::solvergraph::IFieldSpan<Tscal>, spans_rhs)
43
45
57 template<class Tvec, class TgridVec>
58 class BiCGSTABInit : public shamrock::solvergraph::INode {
59 using Tscal = shambase::VecComponent<Tvec>;
61
62 u32 block_size;
63 Tscal fourPiG;
64
65 public:
66 BiCGSTABInit(u32 block_size, Tscal fourPiG) : block_size(block_size), fourPiG(fourPiG) {}
67
68 EXPAND_NODE_EDGES(NODE_EDGES)
69
71
72 inline virtual std::string _impl_get_label() const { return "BiCGSTABInit"; };
73
74 virtual std::string _impl_get_tex() const;
75 };
76
77} // namespace shammodels::basegodunov::modules
78
79#undef NODE_EDGES
std::uint32_t u32
32 bit unsigned integer
virtual std::string _impl_get_tex() const
get the tex of the node
virtual std::string _impl_get_label() const
get the label of the node
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition INode.hpp:31
namespace for the basegodunov model modules