4#ifndef lethe_visualization_h
5#define lethe_visualization_h
9#include <deal.II/base/data_out_base.h>
11#include <deal.II/particles/particle_handler.h>
26template <
int dim,
typename PropertiesIndex>
44 build_patches(Particles::ParticleHandler<dim> &particle_handler,
45 const std::vector<std::pair<std::string, int>> &properties);
54 print_xyz(dealii::Particles::ParticleHandler<dim> &particle_handler,
55 const MPI_Comm &mpi_communicator,
56 const ConditionalOStream &pcout);
68 const DoFHandler<dim> &background_dh,
69 const MPI_Comm &mpi_communicator,
70 const ConditionalOStream &pcout);
78 virtual const std::vector<DataOutBase::Patch<0, dim>> &
84 virtual std::vector<std::string>
88 std::tuple<
unsigned int,
91 DataComponentInterpretation::DataComponentInterpretation>>
98 std::vector<DataOutBase::Patch<0, dim>>
patches;
109 std::tuple<
unsigned int,
112 DataComponentInterpretation::DataComponentInterpretation>>
void print_intermediate_format(const Vector< float > &data_to_print, const DoFHandler< dim > &background_dh, const MPI_Comm &mpi_communicator, const ConditionalOStream &pcout)
Print the data of particles in the deal.II intermediate format.
virtual std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > get_nonscalar_data_ranges() const override
std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > vector_datasets
Store which of the data fields are vectors.
void build_patches(Particles::ParticleHandler< dim > &particle_handler, const std::vector< std::pair< std::string, int > > &properties)
Build the patches of properties of particles for visualization.
std::vector< std::pair< std::string, int > > properties_to_write
Particle properties that are written in output files.
virtual std::vector< std::string > get_dataset_names() const override
Implementation of the corresponding function of the base class.
std::vector< DataOutBase::Patch< 0, dim > > patches
Output information that is filled by build_patches() and written by the write function of the base cl...
virtual const std::vector< DataOutBase::Patch< 0, dim > > & get_patches() const override
Implementation of the corresponding function of the base class.
std::vector< std::string > dataset_names
A list of field names for all data components stored in patches.
void print_xyz(dealii::Particles::ParticleHandler< dim > &particle_handler, const MPI_Comm &mpi_communicator, const ConditionalOStream &pcout)
Print the data of particles in the xyz format.