SENSEI
A frame work for generic in situ analytics
sensei::ParticleDensity Class Reference

Computes number and mass density on a mesh from a set of particle positions and masses. More...

#include <ParticleDensity.h>

Inheritance diagram for sensei::ParticleDensity:
[legend]
Collaboration diagram for sensei::ParticleDensity:
[legend]

Public Types

enum  { PROJECT_XY =1, PROJECT_XZ =2, PROJECT_YZ =3 }
 
- Public Types inherited from sensei::AnalysisAdaptor
enum  { DEVICE_HOST =-1, DEVICE_AUTO =-2 }
 values controling device selection More...
 

Public Member Functions

 senseiTypeMacro (ParticleDensity, AnalysisAdaptor)
 
void Initialize (const std::string &meshName, const std::string &xPosArray, const std::string &yPosArray, const std::string &zPosArray, const std::string &massArray, const std::string proj, long xres, long yres, const std::string &outDir, int returnData)
 set the name of the mesh and arrays to request from the simulation. More...
 
bool Execute (DataAdaptor *data, DataAdaptor **) override
 compute the histogram for this time step More...
 
int Finalize () override
 finalize the run More...
 
- Public Member Functions inherited from sensei::AnalysisAdaptor
 senseiBaseTypeMacro (AnalysisAdaptor, svtkObjectBase)
 
void PrintSelf (ostream &os, svtkIndent indent) override
 Prints the current state of the adaptor. More...
 
virtual int SetCommunicator (MPI_Comm comm)
 Set the MPI communicator to be used by the adaptor. More...
 
MPI_Comm GetCommunicator ()
 returns the MPI communicator to be used for all communication More...
 
virtual void SetVerbose (int val)
 Set the level of verbosity of console output. More...
 
virtual int GetVerbose ()
 Get the level of verbosity of console output. More...
 
virtual void SetAsynchronous (int val)
 When set the analysis should buffer the simulation data and run in the background returning to the simulation immediately. More...
 
virtual int GetAsynchronous ()
 Get asynchronous mode. More...
 
virtual void SetDeviceId (int val)
 Set the device that the analysis should run on. More...
 
virtual int GetDeviceId ()
 Get the device that the analysis should run on. More...
 
virtual void SetDevicesToUse (int val)
 Set the number of devices to use per node. More...
 
virtual int GetDevicesToUse ()
 Get the number of devices to use per node. More...
 
virtual void SetDeviceStart (int val)
 Set the first on node device to use in automatic device selection. More...
 
virtual int GetDeviceStart ()
 Get the first device to use. More...
 
virtual void SetDeviceStride (int val)
 Set the number of devices to skip in automatic device selection. More...
 
virtual int GetDeviceStride ()
 Get the number of devices to skip. More...
 

Static Public Member Functions

static ParticleDensityNew ()
 allocates a new instance More...
 

Protected Member Functions

 ParticleDensity (const ParticleDensity &)=delete
 
void operator= (const ParticleDensity &)=delete
 
- Protected Member Functions inherited from sensei::AnalysisAdaptor
 AnalysisAdaptor (const AnalysisAdaptor &)=delete
 
void operator= (const AnalysisAdaptor &)=delete
 

Protected Attributes

int Projection
 
long XRes
 
long YRes
 
std::string OutDir
 
unsigned long Iteration
 
std::string MeshName
 
std::string XPosArray
 
std::string YPosArray
 
std::string ZPosArray
 
std::string MassArray
 
int ReturnData
 
- Protected Attributes inherited from sensei::AnalysisAdaptor
MPI_Comm Comm
 
int Verbose
 
int DeviceId
 
int DevicesPerNode
 
int DevicesToUse
 
int DeviceStart
 
int DeviceStride
 
int Asynchronous
 

Detailed Description

Computes number and mass density on a mesh from a set of particle positions and masses.

At each time step the results are stored on disk in PGM format.

The input data is currently required to be on a svtkTable. Global mesh bounds are obtained from the mesh metadata. One must additionally provide during initialization the following: the mesh name; names of the particle positions and masses; the resolution of the output image; and an output file name where the substring t% is replaced with the current simulation time.

Member Function Documentation

◆ Execute()

bool sensei::ParticleDensity::Execute ( DataAdaptor data,
DataAdaptor **   
)
overridevirtual

compute the histogram for this time step

Implements sensei::AnalysisAdaptor.

◆ Finalize()

int sensei::ParticleDensity::Finalize ( )
overridevirtual

finalize the run

Reimplemented from sensei::AnalysisAdaptor.

◆ Initialize()

void sensei::ParticleDensity::Initialize ( const std::string &  meshName,
const std::string &  xPosArray,
const std::string &  yPosArray,
const std::string &  zPosArray,
const std::string &  massArray,
const std::string  proj,
long  xres,
long  yres,
const std::string &  outDir,
int  returnData 
)

set the name of the mesh and arrays to request from the simulation.

Sets the output image resolution and the name of a file to write them in. the substring t% is replaced with the current simulation time step. if one of resx or resy is -1 it is calculated from the data's aspect ratio so that image pixels are square.

◆ New()

static ParticleDensity* sensei::ParticleDensity::New ( )
static

allocates a new instance


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