Page MenuHomec4science

dumper_lammps.h
No OneTemporary

File Metadata

Created
Fri, Sep 27, 16:19

dumper_lammps.h

/**
* @file dumper_lammps.h
* @author Till Junge <junge@lsmspc42.epfl.ch>
* @date Wed Nov 24 17:27:34 2010
*
* @brief
*
* @section LICENSE
*
* <insert lisence here>
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __IOHELPER_DUMPER_LAMMPS_H__
#define __IOHELPER_DUMPER_LAMMPS_H__
/* -------------------------------------------------------------------------- */
#include "dumper.h"
#include <fstream>
/* -------------------------------------------------------------------------- */
__BEGIN_IOHELPER__
class DumperLammps: public Dumper {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
DumperLammps();
DumperLammps(std::string prefix, std::string base_name);
virtual ~DumperLammps(){}
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public:
//! dump to file
void Dump();
void DumpHead();
void DumpAdd(int grain_id = 1, double * points = NULL, int dimension = 0, int nb = 0, const char * name = "");
void DumpFinalize();
//! set mode for file creation : TEXT, BASE64, COMPRESSED
void SetMode(int mode){Dumper::SetMode(mode);}
void SetEmbeddedValue(const char *, int){}
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public:
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
//position of where the number of atoms is printed;
std::streampos nb_atom_position;
//current number of atoms printed to the file
unsigned long int curr_nb_atom;
std::fstream lammps_dump_file;
//! flag to produce zipped files
bool flag_compressed;
};
__END_IOHELPER__
#endif /* __IOHELPER_DUMPER_LAMMPS_H__ */

Event Timeline