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
TXTParticleViewer1D Class Reference

A class that output 1D simulation results in the .txt format. More...

#include <particle_viewer.h>

Inheritance diagram for TXTParticleViewer1D:
ParticleViewer

Public Member Functions

 TXTParticleViewer1D (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 1D simulation results to the output file in the .txt 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 1D simulation results in the .txt format.

Author
Chen, Hsin-Chiang (morri.nosp@m.sche.nosp@m.n2008.nosp@m.@gma.nosp@m.il.co.nosp@m.m)
Version
1.0
Date
2015/03/14

Created on: 2015/03/14

Constructor & Destructor Documentation

TXTParticleViewer1D::TXTParticleViewer1D ( 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 TXTParticleViewer1D::writeResult ( double  time,
std::size_t  writeStep 
)
virtual

Write 1D simulation results to the output file in the .txt 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: