Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
VTKDump.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#include "shambackends/vec.hpp"
24
26
32 template<class Tvec, template<class> class SPHKernel>
33 class VTKDump {
34 public:
35 using Tscal = shambase::VecComponent<Tvec>;
37 using Kernel = SPHKernel<Tscal>;
38
41
42 ShamrockCtx &context;
43 Config &solver_config;
44
45 VTKDump(ShamrockCtx &context, Config &solver_config)
46 : context(context), solver_config(solver_config) {}
47
49 void do_dump(std::string filename, bool add_patch_world_id);
50
51 private:
52 inline PatchScheduler &scheduler() { return shambase::get_check_ref(context.sched); }
53 };
54
55} // namespace shammodels::sph::modules
std::uint32_t u32
32 bit unsigned integer
The MPI scheduler.
Module for writing VTK format output files.
Definition VTKDump.hpp:33
void do_dump(std::string filename, bool add_patch_world_id)
Writes particle data to VTK file for visualization.
Definition VTKDump.cpp:37
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...
Definition memory.hpp:110
namespace for the sph model modules
The configuration for a sph solver.