5#ifndef _MOLECULARDYNAMICS_COUPLING_CELLMAPPINGS_VTKMOLECULEPLOTTER_H_
6#define _MOLECULARDYNAMICS_COUPLING_CELLMAPPINGS_VTKMOLECULEPLOTTER_H_
8#include "coupling/interface/MDSolverInterface.h"
9#include "coupling/interface/Molecule.h"
14namespace cellmappings {
34 VTKMoleculePlotter(std::stringstream& moleculeVelocities, std::stringstream& moleculePositions, std::stringstream& moleculePotentials,
36 : _mdSolverInterface(mdSolverInterface), _moleculeVelocities(moleculeVelocities), _moleculePositions(moleculePositions),
37 _moleculePotentials(moleculePotentials), _appendFloatZeros(appendFloatZeros), _particleCounter(0) {}
61 for (
unsigned int d = 0; d < dim; d++) {
62 _moleculePositions << position[d] <<
" ";
63 _moleculeVelocities << velocity[d] <<
" ";
65 _moleculePositions << _appendFloatZeros << std::endl;
66 _moleculeVelocities << _appendFloatZeros << std::endl;
82 std::stringstream& _moleculeVelocities;
83 std::stringstream& _moleculePositions;
84 std::stringstream& _moleculePotentials;
85 const std::string& _appendFloatZeros;
86 unsigned int _particleCounter;
This class writes molecule data to streams for .vtk file.
Definition VTKMoleculePlotter.h:25
VTKMoleculePlotter(std::stringstream &moleculeVelocities, std::stringstream &moleculePositions, std::stringstream &moleculePotentials, const std::string &appendFloatZeros, coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
Definition VTKMoleculePlotter.h:34
const unsigned int & getParticleCounter() const
Definition VTKMoleculePlotter.h:78
~VTKMoleculePlotter()
Definition VTKMoleculePlotter.h:40
void handleCell(LinkedCell &cell)
Definition VTKMoleculePlotter.h:53
void beginCellIteration()
Definition VTKMoleculePlotter.h:44
void endCellIteration()
Definition VTKMoleculePlotter.h:48
interface to the MD simulation
Definition MDSolverInterface.h:25
some iterator scheme for traversing the molecules within a linked cell.
Definition MoleculeIterator.h:24
virtual bool continueIteration() const =0
virtual const coupling::interface::Molecule< dim > & getConst()=0
interface to access a single molecule in the MD simulation.
Definition Molecule.h:23
virtual double getPotentialEnergy() const =0
virtual tarch::la::Vector< dim, double > getVelocity() const =0
virtual tarch::la::Vector< dim, double > getPosition() const =0
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15