walberla::lbm::VTKOutput< LatticeModel, FlagFieldT > Class Template Reference

Detailed Description

template<typename LatticeModel, typename FlagFieldT>
class walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >

Default setup for VTK in LBM simulations.

This functor is to be used with vtk::initializeVTKOutput. It adds five VTK writers: "Velocity", "VelocityMagnitude", and "Density" which write the respective quantities in lattice units, and "FlagField" and "MappedFlagField" which can be used to visualize the flag field. Additionally, it adds the cell filter "DomainFilter" which can be used to write only the domain (a.k.a. fluid) parts of the simulation. It is also possible to add a vtk::VTKOutput::BeforeFunction to synchronize the ghost layers before writing VTK output. This before function will be registered as "PDFGhostLayerSync".

Template Parameters
LatticeModelThe lattice model used for the simulation
FlagFieldTType of the used flag field

#include <VTKOutput.h>

Public Types

typedef FlagFieldT::flag_t flag_t
 
typedef std::map< FlagUID, flag_tFlagMap
 

Public Member Functions

 VTKOutput (const ConstBlockDataID &pdfField, const ConstBlockDataID &flagField, const FlagUID &domainFlagUID, const vtk::VTKOutput::BeforeFunction &ghostLayerSyncFunction, const FlagMap &flagFieldMapping=FlagMap())
 
 VTKOutput (const ConstBlockDataID &pdfField, const ConstBlockDataID &flagField, const FlagUID &domainFlagUID, const FlagMap &flagFieldMapping=FlagMap())
 
virtual ~VTKOutput ()
 
virtual void operator() (std::vector< shared_ptr< vtk::BlockCellDataWriterInterface > > &writers, std::map< std::string, vtk::VTKOutput::CellFilter > &filters, std::map< std::string, vtk::VTKOutput::BeforeFunction > &beforeFunctions) const
 see vtk::initializeVTKOutput for details More...
 

Static Public Member Functions

static void addToTimeloop (Timeloop &timeloop, const shared_ptr< blockforest::StructuredBlockForest > &blocks, const shared_ptr< Config > &config, const std::string &configBlockName, const BlockDataID &pdfField, const ConstBlockDataID &flagField, const FlagUID &domainFlagUID, const FlagMap &flagFieldMapping=FlagMap())
 
static void addToTimeloop (Timeloop &timeloop, const shared_ptr< blockforest::StructuredBlockForest > &blocks, const shared_ptr< Config > &config, const BlockDataID &pdfField, const ConstBlockDataID &flagField, const FlagUID &domainFlagUID, const FlagMap &flagFieldMapping=FlagMap())
 

Protected Member Functions

virtual void addWriters (std::vector< shared_ptr< vtk::BlockCellDataWriterInterface > > &writers) const
 
virtual void addFilters (std::map< std::string, vtk::VTKOutput::CellFilter > &filters) const
 
virtual void addBeforeFunctions (std::map< std::string, vtk::VTKOutput::BeforeFunction > &beforeFunctions) const
 

Protected Attributes

BlockDataID pdfField_
 
ConstBlockDataID flagField_
 
FlagUID domainFlagUID_
 
vtk::VTKOutput::BeforeFunction ghostLayerSyncFunction_
 
FlagMap flagFieldMapping_
 

Member Typedef Documentation

template<typename LatticeModel , typename FlagFieldT >
typedef FlagFieldT::flag_t walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::flag_t
template<typename LatticeModel , typename FlagFieldT >
typedef std::map<FlagUID, flag_t> walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::FlagMap

Constructor & Destructor Documentation

template<typename LatticeModel , typename FlagFieldT >
walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::VTKOutput ( const ConstBlockDataID &  pdfField,
const ConstBlockDataID &  flagField,
const FlagUID &  domainFlagUID,
const vtk::VTKOutput< LatticeModel, FlagFieldT >::BeforeFunction &  ghostLayerSyncFunction,
const FlagMap flagFieldMapping = FlagMap() 
)
Parameters
pdfFieldBlockDataID of the PDF field used in the simulation
flagFieldBlockDataID of the flag field used in the simulation
domainFlagUIDFlagUID of the domain (a.k.a fluid) flag
ghostLayerSyncFunctionA function used to synchronize the ghost layers before the VTK output. It will be called once every time step, before the output is written.
flagFieldMappingA mapping of FlagUIDs to flag_ts. The mapping is used to create the MappedFlagField writer. If omitted, the MappedFlagField writer will not be available.
template<typename LatticeModel , typename FlagFieldT >
walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::VTKOutput ( const ConstBlockDataID &  pdfField,
const ConstBlockDataID &  flagField,
const FlagUID &  domainFlagUID,
const FlagMap flagFieldMapping = FlagMap() 
)
Parameters
pdfFieldBlockDataID of the PDF field used in the simulation
flagFieldBlockDataID of the flag field used in the simulation
domainFlagUIDFlagUID of the domain (a.k.a fluid) flag
flagFieldMappingA mapping of FlagUIDs to flag_ts. The mapping is used to create the MappedFlagField writer. If omitted, the MappedFlagField writer will not be available.
template<typename LatticeModel , typename FlagFieldT >
virtual walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::~VTKOutput ( )
inlinevirtual

Member Function Documentation

template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addBeforeFunctions ( std::map< std::string, vtk::VTKOutput< LatticeModel, FlagFieldT >::BeforeFunction > &  beforeFunctions) const
protectedvirtual
template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addFilters ( std::map< std::string, vtk::VTKOutput< LatticeModel, FlagFieldT >::CellFilter > &  filters) const
protectedvirtual
template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addToTimeloop ( Timeloop &  timeloop,
const shared_ptr< blockforest::StructuredBlockForest > &  blocks,
const shared_ptr< Config > &  config,
const std::string &  configBlockName,
const BlockDataID &  pdfField,
const ConstBlockDataID &  flagField,
const FlagUID &  domainFlagUID,
const FlagMap flagFieldMapping = FlagMap() 
)
static
template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addToTimeloop ( Timeloop &  timeloop,
const shared_ptr< blockforest::StructuredBlockForest > &  blocks,
const shared_ptr< Config > &  config,
const BlockDataID &  pdfField,
const ConstBlockDataID &  flagField,
const FlagUID &  domainFlagUID,
const FlagMap flagFieldMapping = FlagMap() 
)
static
template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::addWriters ( std::vector< shared_ptr< vtk::BlockCellDataWriterInterface > > &  writers) const
protectedvirtual
template<typename LatticeModel , typename FlagFieldT >
void walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::operator() ( std::vector< shared_ptr< vtk::BlockCellDataWriterInterface > > &  writers,
std::map< std::string, vtk::VTKOutput< LatticeModel, FlagFieldT >::CellFilter > &  filters,
std::map< std::string, vtk::VTKOutput< LatticeModel, FlagFieldT >::BeforeFunction > &  beforeFunctions 
) const
virtual

see vtk::initializeVTKOutput for details

Member Data Documentation

template<typename LatticeModel , typename FlagFieldT >
FlagUID walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::domainFlagUID_
protected
template<typename LatticeModel , typename FlagFieldT >
ConstBlockDataID walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::flagField_
protected
template<typename LatticeModel , typename FlagFieldT >
FlagMap walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::flagFieldMapping_
protected
template<typename LatticeModel , typename FlagFieldT >
vtk::VTKOutput::BeforeFunction walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::ghostLayerSyncFunction_
protected
template<typename LatticeModel , typename FlagFieldT >
BlockDataID walberla::lbm::VTKOutput< LatticeModel, FlagFieldT >::pdfField_
protected

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