walberla::mesa_pd::vtk::ParticleVtkOutput Class Reference

#include <ParticleVtkOutput.h>

+ Inheritance diagram for walberla::mesa_pd::vtk::ParticleVtkOutput:

Public Types

using ParticleSelectorFunc = std::function< bool(const data::ParticleStorage::iterator &pIt)>
 

Public Member Functions

 ParticleVtkOutput (const std::shared_ptr< data::ParticleStorage > &ps)
 
std::vector< AttributesgetAttributes () const override
 
void configure () override
 
std::vector< Vector3< real_t > > getPoints () override
 
void push (std::ostream &os, const uint_t data, const uint_t point, const uint_t component) override
 For the documentation of this function, please refer to the documentation/general description of this class. More...
 
void push (walberla::vtk::Base64Writer &b64, const uint_t data, const uint_t point, const uint_t component) override
 For the documentation of this function, please refer to the documentation/general description of this class. More...
 
template<typename T >
void addOutput (const std::string &name)
 
void addOutput (const std::string &name, const std::shared_ptr< IOutputSelector > &selector)
 
void setParticleSelector (const ParticleSelectorFunc &func)
 sets a function which decides which particles should be written to file More...
 
size_t getParticlesWritten () const
 returns the number of particles written during the last write More...
 
- Public Member Functions inherited from walberla::vtk::PointDataSource
virtual ~PointDataSource ()=default
 

Private Attributes

const std::shared_ptr< data::ParticleStorage > & ps_
 
std::vector< size_tparticleIndices_
 stores indices of particles which got selected by particleSelector_ More...
 
std::vector< std::pair< std::string, std::shared_ptr< IOutputSelector > > > selectors_
 
ParticleSelectorFunc particleSelector_ = [](const data::ParticleStorage::iterator& ){return true;}
 

Member Typedef Documentation

◆ ParticleSelectorFunc

Constructor & Destructor Documentation

◆ ParticleVtkOutput()

walberla::mesa_pd::vtk::ParticleVtkOutput::ParticleVtkOutput ( const std::shared_ptr< data::ParticleStorage > &  ps)
inline

Member Function Documentation

◆ addOutput() [1/2]

template<typename T >
void walberla::mesa_pd::vtk::ParticleVtkOutput::addOutput ( const std::string &  name)
inline

◆ addOutput() [2/2]

void walberla::mesa_pd::vtk::ParticleVtkOutput::addOutput ( const std::string &  name,
const std::shared_ptr< IOutputSelector > &  selector 
)

◆ configure()

void walberla::mesa_pd::vtk::ParticleVtkOutput::configure ( )
inlineoverridevirtual

◆ getAttributes()

std::vector< ParticleVtkOutput::Attributes > walberla::mesa_pd::vtk::ParticleVtkOutput::getAttributes ( ) const
overridevirtual

◆ getParticlesWritten()

size_t walberla::mesa_pd::vtk::ParticleVtkOutput::getParticlesWritten ( ) const
inline

returns the number of particles written during the last write

◆ getPoints()

std::vector< math::Vector3< real_t > > walberla::mesa_pd::vtk::ParticleVtkOutput::getPoints ( )
overridevirtual

◆ push() [1/2]

void walberla::mesa_pd::vtk::ParticleVtkOutput::push ( std::ostream &  os,
const uint_t  data,
const uint_t  point,
const uint_t  component 
)
overridevirtual

For the documentation of this function, please refer to the documentation/general description of this class.

Implements walberla::vtk::PointDataSource.

◆ push() [2/2]

void walberla::mesa_pd::vtk::ParticleVtkOutput::push ( walberla::vtk::Base64Writer b64,
const uint_t  data,
const uint_t  point,
const uint_t  component 
)
overridevirtual

For the documentation of this function, please refer to the documentation/general description of this class.

Implements walberla::vtk::PointDataSource.

◆ setParticleSelector()

void walberla::mesa_pd::vtk::ParticleVtkOutput::setParticleSelector ( const ParticleSelectorFunc func)
inline

sets a function which decides which particles should be written to file

Member Data Documentation

◆ particleIndices_

std::vector<size_t> walberla::mesa_pd::vtk::ParticleVtkOutput::particleIndices_
private

stores indices of particles which got selected by particleSelector_

◆ particleSelector_

ParticleSelectorFunc walberla::mesa_pd::vtk::ParticleVtkOutput::particleSelector_ = [](const data::ParticleStorage::iterator& ){return true;}
private

◆ ps_

const std::shared_ptr<data::ParticleStorage>& walberla::mesa_pd::vtk::ParticleVtkOutput::ps_
private

◆ selectors_

std::vector<std::pair<std::string, std::shared_ptr<IOutputSelector> > > walberla::mesa_pd::vtk::ParticleVtkOutput::selectors_
private

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