Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | List of all members
alsfvm::io::QueueWriter Class Reference

The QueueWriter class writes the data to a blocking queue. More...

#include <alsfvm/io/QueueWriter.hpp>

Inheritance diagram for alsfvm::io::QueueWriter:
alsfvm::io::Writer

Public Member Functions

 QueueWriter (size_t queueLength, alsfvm::shared_ptr< volume::VolumeFactory > &volumeFactory)
 
virtual void write (const volume::Volume &conservedVariables, const grid::Grid &grid, const simulator::TimestepInformation &timestepInformation) override
 write writes the data to the queue More...
 
void pop (std::function< void(const volume::Volume &)> handler)
 
- Public Member Functions inherited from alsfvm::io::Writer
virtual ~Writer ()
 
virtual void finalize (const grid::Grid &grid, const simulator::TimestepInformation &timestepInformation)
 This method should be called at the end of the simulation. More...
 
void addAttributes (const std::string &nameOfAttributes, const boost::property_tree::ptree &attributes)
 

Additional Inherited Members

- Static Public Member Functions inherited from alsfvm::io::Writer
static std::string getClassName ()
 
- Protected Attributes inherited from alsfvm::io::Writer
std::map< std::string, boost::property_tree::ptree > attributesMap
 

Detailed Description

The QueueWriter class writes the data to a blocking queue.

This is ideal if you have two simulations that need to communicate with eachother.

Constructor & Destructor Documentation

◆ QueueWriter()

alsfvm::io::QueueWriter::QueueWriter ( size_t  queueLength,
alsfvm::shared_ptr< volume::VolumeFactory > &  volumeFactory 
)
Parameters
queueLengththe number of elements to hold in the queue.
volumeFactorythe volume factory to use to create new volumes.
Note
queueLength must be larger than 0

Member Function Documentation

◆ pop()

void alsfvm::io::QueueWriter::pop ( std::function< void(const volume::Volume &)>  handler)

◆ write()

void alsfvm::io::QueueWriter::write ( const volume::Volume conservedVariables,
const grid::Grid grid,
const simulator::TimestepInformation timestepInformation 
)
overridevirtual

write writes the data to the queue

Parameters
conservedVariablesthe conservedVariables to write
gridthe grid that is used (describes the whole domain)
timestepInformation

Implements alsfvm::io::Writer.


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