AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Public Member Functions
Aqua::InputOutput::VTK Class Reference

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

#include <InputOutput/VTK.h>

Inheritance diagram for Aqua::InputOutput::VTK:
Inheritance graph
[legend]
Collaboration diagram for Aqua::InputOutput::VTK:
Collaboration graph
[legend]

Public Member Functions

 VTK (ProblemSetup &sim_data, unsigned int iset, unsigned int offset, unsigned int n=0)
 Constructor.
 
 ~VTK ()
 Destructor.
 
void save (float t)
 Save the data.
 
void load ()
 Load the data.
 
void waitForSavers ()
 Wait for the parallel saving threads.
 
- Public Member Functions inherited from Aqua::InputOutput::Particles
 Particles (ProblemSetup &sim_data, unsigned int iset, unsigned int offset, unsigned int n=0)
 Constructor.
 
virtual ~Particles ()
 Destructor.
 
const std::string file ()
 Get the last printed file path.
 
unsigned int n ()
 Get the number of particles managed by this instance.
 
virtual void waitForSavers ()
 Wait for the eventual parallel saving threads.
 
virtual void save (float t)=0
 Save the data.
 
virtual void load ()=0
 Load the data.
 

Additional Inherited Members

- Protected Member Functions inherited from Aqua::InputOutput::Particles
ProblemSetupsimData ()
 Get the simulation data structure.
 
void n (unsigned int n)
 Set the number of particles managed by this instance.
 
const uivec2 bounds () const
 Get the particle index bounds of the "set of particles" managed by this class.
 
const 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)
 
std::vector< void * > download (std::vector< std::string > fields)
 
- 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,
unsigned int  offset,
unsigned int  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)

◆ ~VTK()

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

Destructor.

Member Function Documentation

◆ load()

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

Load the data.

Implements Aqua::InputOutput::InputOutput.

◆ save()

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

Save the data.

Parameters
tSimulation time

Implements Aqua::InputOutput::InputOutput.

◆ waitForSavers()

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

Wait for the parallel saving threads.

VTK saver is launching parallel threads to save the data in an asynchronous way, significantly improving the performance. Therefore, AQUAgpusph shall wait them to finish before proceeding to destroy the data

Reimplemented from Aqua::InputOutput::Particles.


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