OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AmrYtWriter Class Reference

#include <AmrYtWriter.h>

Inheritance diagram for AmrYtWriter:
Inheritance graph
[legend]
Collaboration diagram for AmrYtWriter:
Collaboration graph
[legend]

Public Member Functions

 AmrYtWriter (int step, int bin=0)
 
void writeFields (const amr::AmrScalarFieldContainer_t &rho, const amr::AmrScalarFieldContainer_t &phi, const amr::AmrVectorFieldContainer_t &efield, const amr::AmrIntArray_t &refRatio, const amr::AmrGeomContainer_t &geom, const int &nLevel, const double &time, const double &scale)
 
void writeBunch (const AmrPartBunch *bunch_p, const double &time, const double &gamma)
 
- Public Member Functions inherited from AbstractAmrWriter
virtual ~AbstractAmrWriter ()
 

Private Member Functions

void writeParticles_m (int level, std::ofstream &ofs, int fnum, amrex::Vector< int > &which, amrex::Vector< int > &count, amrex::Vector< long > &where, const AmrPartBunch *bunch_p, const double gamma) const
 

Private Attributes

std::string dir_m
 directory where to write files More...
 
std::vector< std::string > intData_m
 integer bunch data More...
 
std::vector< std::string > realData_m
 real bunch data More...
 

Detailed Description

This concrete class writes output files that are readable by yt. The format can be read by the fork opal-yt that uses accelerator units instead of astrophysics units. The functions are copied from AMReX and modified to fit our needs.

Definition at line 20 of file AmrYtWriter.h.

Constructor & Destructor Documentation

AmrYtWriter::AmrYtWriter ( int  step,
int  bin = 0 
)
Parameters
stepwe write
binenergy bin we write (multi-bunch simulation)

Definition at line 15 of file AmrYtWriter.cpp.

References Communicate::barrier(), IpplInfo::Comm, dir_m, Hypervolume::fs, OpalData::getInputBasename(), OpalData::getInstance(), intData_m, IpplInfo::myNode(), and realData_m.

Here is the call graph for this function:

Member Function Documentation

void AmrYtWriter::writeBunch ( const AmrPartBunch bunch_p,
const double &  time,
const double &  scale 
)
virtual
void AmrYtWriter::writeFields ( const amr::AmrScalarFieldContainer_t rho,
const amr::AmrScalarFieldContainer_t phi,
const amr::AmrVectorFieldContainer_t efield,
const amr::AmrIntArray_t refRatio,
const amr::AmrGeomContainer_t geom,
const int &  nLevel,
const double &  time,
const double &  scale 
)
virtual

Write yt files to the simulation subdirectory data/amr/yt. The data can be visualized using the python script pyOPALTools/amrPlots/visualize.py. Use the help to find out how to call the script.

Implements AbstractAmrWriter.

Definition at line 68 of file AmrYtWriter.cpp.

References Communicate::barrier(), IpplInfo::Comm, dir_m, IpplInfo::myNode(), and Hypervolume::n.

Here is the call graph for this function:

void AmrYtWriter::writeParticles_m ( int  level,
std::ofstream &  ofs,
int  fnum,
amrex::Vector< int > &  which,
amrex::Vector< int > &  count,
amrex::Vector< long > &  where,
const AmrPartBunch bunch_p,
const double  gamma 
) const
private

Member Data Documentation

std::string AmrYtWriter::dir_m
private

directory where to write files

Definition at line 74 of file AmrYtWriter.h.

Referenced by AmrYtWriter(), writeBunch(), and writeFields().

std::vector<std::string> AmrYtWriter::intData_m
private

integer bunch data

Definition at line 76 of file AmrYtWriter.h.

Referenced by AmrYtWriter(), writeBunch(), and writeParticles_m().

std::vector<std::string> AmrYtWriter::realData_m
private

real bunch data

Definition at line 77 of file AmrYtWriter.h.

Referenced by AmrYtWriter(), writeBunch(), and writeParticles_m().


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