AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Aqua::InputOutput::VTK Class Reference

VTK particles data files loader/saver. More...

#include <VTK.hpp>

Inheritance diagram for Aqua::InputOutput::VTK:
Collaboration diagram for Aqua::InputOutput::VTK:

Public Member Functions

 VTK (ProblemSetup &sim_data, unsigned int iset, size_t offset, size_t n=0)
 Constructor.
 ~VTK ()
 Destructor.
void save (float t)
 Save the data.
void load ()
 Load the data.
void print_file () final
 Print the data to a file.
Public Member Functions inherited from Aqua::InputOutput::Particles
 Particles (ProblemSetup &sim_data, unsigned int iset, size_t offset, size_t n=0)
 Constructor.
virtual ~Particles ()
 Destructor.
const std::string & file () const
 Get the last printed file path.
size_t n () const
 Get the number of particles managed by this instance.
cl_event getUserEvent () const
 Get the user event to be waited for before the file saving is finished.
virtual void waitForSavers ()
 Wait for the eventual parallel saving threads.

Additional Inherited Members

Protected Member Functions inherited from Aqua::InputOutput::Particles
const ProblemSetupsimData () const
 Get the simulation data structure.
void n (const size_t &n)
 Set the number of particles managed by this instance.
const ulvec2 bounds () const
 Get the particle index bounds of the "set of particles" managed by this class.
unsigned int setId () const
 Get the "particles set" index associated with this class.
void loadDefault ()
 Register some default arrays:
void file (const std::string filename)
 Set the file name.
unsigned int file (const std::string basename, unsigned int start_index, unsigned int digits=5)
float time () const
 Get the current simulation time to be written.
cl_event download (std::vector< std::string > fields)
 Download the data from the device and store it.
std::map< std::string, void * > data () const
 Get the stored memory objects where the device data has been downloaded.
Protected Member Functions inherited from Aqua::InputOutput::InputOutput
 InputOutput ()
 Constructor.
virtual ~InputOutput ()
 Destructor.

Detailed Description

VTK particles data files loader/saver.

VTK is a visualization format, to learn more about it please visit the following web page:

http://www.vtk.org

This type of files can be easily post-processed with Paraview:

http://www.paraview.org

The fields to be saved/loaded are:

  1. \( \mathbf{r} \) . \( x \)
  2. \( \mathbf{r} \) . \( y \)
  3. \( \mathbf{r} \) . \( z \) (For 3D cases only)
  4. \( \mathbf{n} \) . \( x \)
  5. \( \mathbf{n} \) . \( y \)
  6. \( \mathbf{n} \) . \( z \) (For 3D cases only)
  7. \( \mathbf{u} \) . \( x \)
  8. \( \mathbf{u} \) . \( y \)
  9. \( \mathbf{u} \) . \( z \) (For 3D cases only)
  10. \( \frac{d \mathbf{u}}{dt} \) . \( x \)
  11. \( \frac{d \mathbf{u}}{dt} \) . \( y \)
  12. \( \frac{d \mathbf{u}}{dt} \) . \( z \) (For 3D cases only)
  13. \( \rho \)
  14. \( \frac{d \rho}{dt} \)
  15. \( m \)
  16. moving flag (see Aqua::InputOutput::Fluid::imove)

Constructor & Destructor Documentation

◆ VTK()

Aqua::InputOutput::VTK::VTK ( ProblemSetup & sim_data,
unsigned int iset,
size_t offset,
size_t n = 0 )

Constructor.

Parameters
sim_dataSimulation data
isetParticles set index.
offsetFirst particle managed by this saver/loader.
nNumber of particles managed by this saver/loader. If 0, the number of particles will be obtained from the input file (thus only valid for loaders)
Here is the call graph for this function:

◆ ~VTK()

Aqua::InputOutput::VTK::~VTK ( )

Destructor.

Member Function Documentation

◆ load()

void Aqua::InputOutput::VTK::load ( )
virtual

Load the data.

Implements Aqua::InputOutput::InputOutput.

◆ print_file()

void Aqua::InputOutput::VTK::print_file ( )
finalvirtual

Print the data to a file.

Note
This method is public to work with the OpenCL callbacks, but it is not meant to be called by the users

Reimplemented from Aqua::InputOutput::Particles.

◆ save()

void Aqua::InputOutput::VTK::save ( float t)
virtual

Save the data.

Parameters
tSimulation time

Reimplemented from Aqua::InputOutput::Particles.


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