Lagrangian Particle Code for The Simulation of 2D/3D Fluid Dynamics
 All Classes Files Functions Variables Typedefs Friends Pages
Public Member Functions | List of all members
VTKParticleViewer Class Reference

A class that output simulation results in the .vtk format. More...

#include <particle_viewer.h>

Inheritance diagram for VTKParticleViewer:
ParticleViewer

Public Member Functions

 VTKParticleViewer (ParticleData *data, const std::string &particleType, const std::string &outputfileName="", int numDigits=7)
 Constructor. More...
 
virtual int writeResult (double time, std::size_t writeStep)
 Write simulation results to the output file in the .vtk format. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ParticleViewer
std::string rightFlush (std::size_t writeStep, std::size_t numDigits)
 A small helper function that organizes the format of output filename. More...
 
- Protected Attributes inherited from ParticleViewer
ParticleDatam_pParticleData
 A pointer to the object which holds particle information and data.
 
std::string m_sOutputfileName
 The name of the output file.
 
int m_iNumDigits
 The number of digits for the indexing of output file name.
 
std::string m_sParticleType
 The type of particle data to output (all, fluid, boundary, etc)
 

Detailed Description

A class that output simulation results in the .vtk format.

Author
Chen, Hsin-Chiang (morri.nosp@m.sche.nosp@m.n2008.nosp@m.@gma.nosp@m.il.co.nosp@m.m)

Co-author: Yu, Kwangmin (yukwa.nosp@m.ngmi.nosp@m.n@gma.nosp@m.il.c.nosp@m.om) on initial interface and data structure design

Version
1.0
Date
2014/07/12

Created on: 2014/05/23

Constructor & Destructor Documentation

VTKParticleViewer::VTKParticleViewer ( ParticleData data,
const std::string &  particleType,
const std::string &  outputfileName = "",
int  numDigits = 7 
)

Constructor.

Parameters
[in]dataA pointer to the object which holds particle information and data
[in]particleTypeThe type of particle to output (all, fluid, boundary, ghost)
[in]outputfileNameThe name of the output file
[in]numDigitsThe number of digits for the indexing of output file name

Member Function Documentation

int VTKParticleViewer::writeResult ( double  time,
std::size_t  writeStep 
)
virtual

Write simulation results to the output file in the .vtk format.

Parameters
[in]timeThe physical output time
[in]writeStepThe number of times of output
Returns
0 if output success; 1 otherwise

Implements ParticleViewer.


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