AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
FileWriterBase Class Reference

Base class for filewriters. More...

#include <FileWriterBase.hpp>

Inherits FileWriterInterface.

Inherited by BackupWriter< SystemVector >, GmshWriter< GV >, and VTKWriter< GV, GF >.

Public Member Functions

 FileWriterBase (std::string const &base)
 Constructor. Reads common parameters.
 
bool doWrite (AdaptInfo &adaptInfo) const
 Return whether to write the current timestep or not.
 
std::string const & filename () const
 
std::string const & dir () const
 
std::string const & name () const
 
- Public Member Functions inherited from FileWriterInterface
virtual ~FileWriterInterface ()=default
 Virtual destructor.
 
virtual void write (AdaptInfo &adaptInfo, bool force)=0
 Pure virtual method to be implemented by derived classes. More...
 

Protected Attributes

std::string filename_ = "solution"
 Base part of output filename.
 
std::string dir_ = "."
 Output directory.
 
std::string name_ = "solution"
 Name of the data.
 
int tsModulo_ = 0
 Write every i'th timestep.
 
double timeModulo_ = 0.0
 Write after every time interval.
 

Detailed Description

Base class for filewriters.

Read parameters common for all filewriters, where BASE is given by the constructor parameter base:

  • [BASE]->filename: Base name of the filename, not including the file extension
  • [BASE]->output directory: Directory where to put the files
  • [BASE]->name: Name of the data vector in the output file
  • [BASE]->write every i-th timestep: Timestep number interval.
  • [BASE]->write after timestep: Time interval.

Some other parameters found in some filewriter implementations:

  • [BASE]->mode: File mode, either ASCII=0, BINARY=1, or COMPRESSED=2
  • [BASE]->precision: Output precision, either FLOAT=0, DOUBLE=1
  • [BASE]->animation: Write animation files, or append the timestep to the filename.

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