35 using Tscal = shambase::VecComponent<Tvec>;
36 static constexpr u32 dim = shambase::VectorProperties<Tvec>::dimension;
37 using Kernel = SPHKernel<Tscal>;
43 Config &solver_config;
46 SPHSetup(
ShamrockCtx &context, Config &solver_config, Storage &storage)
47 : context(context), solver_config(solver_config), storage(storage) {}
52 std::optional<u32> insert_step = std::nullopt);
57 std::optional<u32> gen_count_per_step = std::nullopt,
58 std::optional<u32> insert_count_per_step = std::nullopt,
59 std::optional<u64> max_msg_count_per_rank_per_step = std::nullopt,
60 std::optional<u64> max_data_count_per_rank_per_step = std::nullopt,
61 std::optional<u64> max_msg_size = std::nullopt,
62 bool do_setup_log =
false,
63 bool speculative_balancing =
false);
65 std::shared_ptr<ISPHSetupNode> make_generator_lattice_hcp(
67 std::pair<Tvec, Tvec> box,
68 bool discontinuous =
true,
71 std::shared_ptr<ISPHSetupNode> make_generator_lattice_fcc(
73 std::pair<Tvec, Tvec> box,
74 bool discontinuous =
true,
77 std::shared_ptr<ISPHSetupNode> make_generator_lattice_cubic(
78 Tscal dr, std::pair<Tvec, Tvec> box);
80 std::shared_ptr<ISPHSetupNode> make_generator_disc_mc(
85 std::function<Tscal(Tscal)> sigma_profile,
86 std::function<Tscal(Tscal)> H_profile,
87 std::function<Tvec(Tvec)> vel_profile,
88 std::function<Tscal(Tvec)> cs_profile,
92 std::shared_ptr<ISPHSetupNode> make_generator_from_context(
ShamrockCtx &context_other);
94 std::shared_ptr<ISPHSetupNode> make_combiner_add(
97 std::shared_ptr<ISPHSetupNode> make_modifier_warp_disc(
98 SetupNodePtr parent, Tscal Rwarp, Tscal Hwarp, Tscal inclination, Tscal posangle);
100 std::shared_ptr<ISPHSetupNode> make_modifier_custom_warp(
102 std::function<Tscal(Tscal)> inc_profile,
103 std::function<Tscal(Tscal)> psi_profile,
104 std::function<Tvec(Tscal)> k_profile);
106 std::shared_ptr<ISPHSetupNode> make_modifier_add_offset(
107 SetupNodePtr parent, Tvec offset_postion, Tvec offset_velocity);
109 std::shared_ptr<ISPHSetupNode> make_modifier_filter(
112 std::shared_ptr<ISPHSetupNode> make_modifier_split_part(
118 u64 injected_parts = 0;