Alsvinn
0.5.3
The fast FVM simulator with UQ support
|
#include <alsfvm/io/DLLWriter.hpp>
Public Member Functions | |
DLLWriter (const std::string &basename, const Parameters ¶meters, alsutils::mpi::ConfigurationPtr mpiConfigration=nullptr) | |
virtual void | write (const volume::Volume &conservedVariables, const grid::Grid &grid, const simulator::TimestepInformation ×tepInformation) |
write writes the data to disk More... | |
virtual void | finalize (const grid::Grid &grid, const simulator::TimestepInformation ×tepInformation) |
This method should be called at the end of the simulation. More... | |
![]() | |
virtual | ~Writer () |
void | addAttributes (const std::string &nameOfAttributes, const boost::property_tree::ptree &attributes) |
Additional Inherited Members | |
![]() | |
static std::string | getClassName () |
![]() | |
std::map< std::string, boost::property_tree::ptree > | attributesMap |
The DLLWriter forwards the volume to an external DLL, loaded via boost::dll
The parameters you need to supply are
parameter name | description |
---|---|
library | filename of dll |
create_function | name of the create/init function, should have the following signature use NONE if it is not supplied |
delete_function | the function to delete any data created, if create_function is NONE, this is ignored assumes signature void delete_function(void* data); |
write_function | the name of the write function assumes signature where gpu_number is the gpu id where the data lives (-1 if the data is on the CPU). The domain is The total number of cells is |
make_parameters_function | Name of the function to create the parameter struct assumes the signature void* make_parameters_function(); |
delete_parameters_function | name of the function to delete the parameter struct assumes the signature |
needs_data_on_host_function | should the data be on host? If this function returns true, alsvinn will first copy the data to host before calling the write function can be NONE, then it is assumed this function returns false. |
set_parameter_function | set the parameter, assumes the signature |
set_mpi_comm_function | set mpi communicator, assumes the signature can be set to NONE |
new_timestep_function | called when at the beginning of a new timestep to be written |
end_timestep_function | called when at the end of a new timestep after all variables have been written |
alsfvm::io::DLLWriter::DLLWriter | ( | const std::string & | basename, |
const Parameters & | parameters, | ||
alsutils::mpi::ConfigurationPtr | mpiConfigration = nullptr |
||
) |
|
virtual |
This method should be called at the end of the simulation.
Reimplemented from alsfvm::io::Writer.
|
virtual |
write writes the data to disk
conservedVariables | the conservedVariables to write |
grid | the grid that is used (describes the whole domain) |
timestepInformation |
Implements alsfvm::io::Writer.