Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
Visualization< dim, PropertiesIndex > Class Template Reference

#include <visualization.h>

Inheritance diagram for Visualization< dim, PropertiesIndex >:
[legend]

Public Member Functions

 Visualization ()
void build_patches (Particles::ParticleHandler< dim > &particle_handler, const std::vector< std::pair< std::string, int > > &properties)
void print_xyz (dealii::Particles::ParticleHandler< dim > &particle_handler, const MPI_Comm &mpi_communicator, const ConditionalOStream &pcout)
void print_intermediate_format (const Vector< float > &data_to_print, const DoFHandler< dim > &background_dh, const MPI_Comm &mpi_communicator, const ConditionalOStream &pcout)
 ~Visualization ()

Private Member Functions

virtual const std::vector< DataOutBase::Patch< 0, dim > > & get_patches () const override
virtual std::vector< std::string > get_dataset_names () const override
virtual std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > get_nonscalar_data_ranges () const override

Private Attributes

std::vector< DataOutBase::Patch< 0, dim > > patches
std::vector< std::string > dataset_names
std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > vector_datasets
std::vector< std::pair< std::string, int > > properties_to_write

Detailed Description

template<int dim, typename PropertiesIndex>
class Visualization< dim, PropertiesIndex >

Building patches of particle properties for visualization. This function is taken from Aspect and deal.ii and implemented here.

Template Parameters
dimAn integer that denotes the number of spatial dimensions.
PropertiesIndexIndex of the properties used within the ParticleHandler.

Definition at line 27 of file visualization.h.

Constructor & Destructor Documentation

◆ Visualization()

template<int dim, typename PropertiesIndex>
Visualization< dim, PropertiesIndex >::Visualization ( )
default

◆ ~Visualization()

template<int dim, typename PropertiesIndex>
Visualization< dim, PropertiesIndex >::~Visualization ( )
default

Member Function Documentation

◆ build_patches()

template<int dim, typename PropertiesIndex>
void Visualization< dim, PropertiesIndex >::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.

Parameters
particle_handlerThe particle handler of active particles for visualization.
propertiesProperties of particles for visualization. This is a vector of pairs and each pair contains the property name as the first element and the size of the property as the second element. For vectors only the size of the first element of the vector is defined equal to the dimension.

Definition at line 15 of file visualization.cc.

References dataset_names, patches, and vector_datasets.

◆ get_dataset_names()

template<int dim, typename PropertiesIndex>
std::vector< std::string > Visualization< dim, PropertiesIndex >::get_dataset_names ( ) const
overrideprivatevirtual

Implementation of the corresponding function of the base class.

Definition at line 209 of file visualization.cc.

References dataset_names.

◆ get_nonscalar_data_ranges()

template<int dim, typename PropertiesIndex>
std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > Visualization< dim, PropertiesIndex >::get_nonscalar_data_ranges ( ) const
overrideprivatevirtual

Definition at line 220 of file visualization.cc.

References vector_datasets.

◆ get_patches()

template<int dim, typename PropertiesIndex>
const std::vector< DataOutBase::Patch< 0, dim > > & Visualization< dim, PropertiesIndex >::get_patches ( ) const
overrideprivatevirtual

Implementation of the corresponding function of the base class.

Definition at line 202 of file visualization.cc.

References patches.

◆ print_intermediate_format()

template<int dim, typename PropertiesIndex>
void Visualization< dim, PropertiesIndex >::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.

Parameters
data_to_printThe vector of data to be printed.
background_dhThe DoFHandler of the background grid.
mpi_communicatorThe MPI communicator.
pcoutPrinting in parallel.

Definition at line 151 of file visualization.cc.

◆ print_xyz()

template<int dim, typename PropertiesIndex>
void Visualization< dim, PropertiesIndex >::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.

Parameters
particle_handlerThe particle handler of active particles.
pcoutPrinting in parallel.

Definition at line 90 of file visualization.cc.

References DEM::has_thermal_properties.

Member Data Documentation

◆ dataset_names

template<int dim, typename PropertiesIndex>
std::vector<std::string> Visualization< dim, PropertiesIndex >::dataset_names
private

A list of field names for all data components stored in patches.

Definition at line 103 of file visualization.h.

◆ patches

template<int dim, typename PropertiesIndex>
std::vector<DataOutBase::Patch<0, dim> > Visualization< dim, PropertiesIndex >::patches
private

Output information that is filled by build_patches() and written by the write function of the base class.

Definition at line 98 of file visualization.h.

◆ properties_to_write

template<int dim, typename PropertiesIndex>
std::vector<std::pair<std::string, int> > Visualization< dim, PropertiesIndex >::properties_to_write
private

Particle properties that are written in output files.

Definition at line 118 of file visualization.h.

◆ vector_datasets

template<int dim, typename PropertiesIndex>
std::vector< std::tuple<unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation> > Visualization< dim, PropertiesIndex >::vector_datasets
private

Store which of the data fields are vectors.

Definition at line 113 of file visualization.h.


The documentation for this class was generated from the following files: