23#include <blockforest/StructuredBlockForest.h>
24#include <field/vtk/VTKWriter.h>
25#include <vtk/VTKOutput.h>
32 int delta_N,
int initial_count,
int flag_observables,
33 units_map const &units_conversion, std::string
const &identifier,
34 std::string
const &base_folder, std::string
const &prefix) {
36 using walberla::uint_c;
39 std::stringstream unique_identifier;
40 unique_identifier << base_folder <<
"/" << identifier;
41 std::string
const vtk_uid = unique_identifier.str();
49 auto const write_freq = (delta_N) ?
static_cast<unsigned int>(delta_N) : 1u;
50 auto vtk_obj = walberla::vtk::createVTKOutput_BlockData(
51 blocks, identifier, uint_c(write_freq), uint_c(0),
false, base_folder,
52 prefix,
true,
true,
true,
true, uint_c(initial_count));
60 auto vtk_handle = std::make_shared<VTKHandle>(vtk_obj, initial_count,
true);
77 walberla::vtk::writeFiles(vtk_handle->ptr)();
78 vtk_handle->execution_count++;
std::map< std::string, std::shared_ptr< VTKHandle > > m_vtk_auto
VTK writers that are executed automatically.
std::shared_ptr< VTKHandle > create_vtk(int delta_N, int initial_count, int flag_observables, units_map const &units_conversion, std::string const &identifier, std::string const &base_folder, std::string const &prefix)
Create a VTK observable.
virtual void register_vtk_field_writers(walberla::vtk::VTKOutput &vtk_obj, units_map const &units_conversion, int flag_observables)=0
Register VTK writers.
virtual void register_vtk_field_filters(walberla::vtk::VTKOutput &vtk_obj)=0
std::map< std::string, std::shared_ptr< VTKHandle > > m_vtk_manual
VTK writers that are executed manually.
std::unordered_map< std::string, double > units_map
void switch_vtk(std::string const &vtk_uid, bool status)
Toggle a VTK observable on/off.
void write_vtk(std::string const &vtk_uid)
Write a VTK observable to disk.
virtual LatticeWalberla const & get_lattice() const noexcept=0
Get the underlying lattice.