![]() |
SENSEI
A frame work for generic in situ analytics
|
Bins a set of arrays onto a user defined uniform Cartesian mesh. More...
#include <DataBinning.h>
Public Types | |
| enum | { INVALID_OP, BIN_SUM, BIN_AVG, BIN_MIN, BIN_MAX } |
| The supported binning operations. More... | |
Public Types inherited from sensei::AnalysisAdaptor | |
| enum | { DEVICE_HOST =-1, DEVICE_AUTO =-2 } |
| values controling device selection More... | |
Public Member Functions | |
| senseiTypeMacro (DataBinning, AnalysisAdaptor) | |
| void | SetAsynchronous (int val) override |
| When set binning runs in a thread and ::Execute returns immediately. More... | |
| int | Initialize (const std::string &meshName, const std::string &xAxisArray, const std::string &yAxisArray, const std::vector< std::string > &binnedArray, const std::vector< std::string > &operation, long xres, long yres, const std::string &outDir, int returnData, int maxThreads) |
| set the name of the mesh and arrays to request from the simulation. More... | |
| int | Initialize (pugi::xml_node node) |
| Initialize from XML Input mesh, coordinate axis arrays, grid resolution, and output path are specified as attributes. 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 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 DataBinning * | New () |
| allocates a new instance More... | |
| static int | GetOperation (const std::string &opName, int &opCode) |
| converts the string to the corresponding enumeration. More... | |
| static int | GetOperation (int opCode, std::string &opName) |
| converts the enumeration to a string More... | |
Protected Member Functions | |
| DataBinning (const DataBinning &)=delete | |
| void | operator= (const DataBinning &)=delete |
| void | InitializeThreads () |
| int | WaitThreads () |
Protected Member Functions inherited from sensei::AnalysisAdaptor | |
| AnalysisAdaptor (const AnalysisAdaptor &)=delete | |
| void | operator= (const AnalysisAdaptor &)=delete |
Protected Attributes | |
| long | XRes |
| long | YRes |
| std::string | OutDir |
| unsigned long | Iteration |
| double | AxisFactor |
| std::string | MeshName |
| std::string | XAxisArray |
| std::string | YAxisArray |
| std::vector< std::string > | BinnedArray |
| std::vector< int > | Operation |
| int | ReturnData |
| int | MaxThreads |
| std::vector< std::future< int > > | Threads |
| std::vector< MPI_Comm > | ThreadComm |
Protected Attributes inherited from sensei::AnalysisAdaptor | |
| MPI_Comm | Comm |
| int | Verbose |
| int | DeviceId |
| int | DevicesPerNode |
| int | DevicesToUse |
| int | DeviceStart |
| int | DeviceStride |
| int | Asynchronous |
Bins a set of arrays onto a user defined uniform Cartesian mesh.
The binning operations supported are: min, max, and sum. A count is always computed. From count and sum bin averages can be obtained. At each time step the results are stored on disk in VTK format. Binning can be used to compute phase space plots or visualize particle data using mesh based visualization techniques.
| anonymous enum |
The supported binning operations.
|
overridevirtual |
compute the histogram for this time step
Implements sensei::AnalysisAdaptor.
|
overridevirtual |
finalize the run
Reimplemented from sensei::AnalysisAdaptor.
|
static |
converts the string to the corresponding enumeration.
| [in] | opName | string naming the operation(one of: "sum", "avg", "min", "max") |
| [out] | opCode | the enumerated value |
|
static |
converts the enumeration to a string
| [in] | opCode | the enumerated value(one of: BIN_SUM, BIN_AVG, BIN_MIN, BIN_MAX) |
| [out] | opName | string naming the operation |
| int sensei::DataBinning::Initialize | ( | const std::string & | meshName, |
| const std::string & | xAxisArray, | ||
| const std::string & | yAxisArray, | ||
| const std::vector< std::string > & | binnedArray, | ||
| const std::vector< std::string > & | operation, | ||
| long | xres, | ||
| long | yres, | ||
| const std::string & | outDir, | ||
| int | returnData, | ||
| int | maxThreads | ||
| ) |
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.
| int sensei::DataBinning::Initialize | ( | pugi::xml_node | node | ) |
Initialize from XML Input mesh, coordinate axis arrays, grid resolution, and output path are specified as attributes.
The supported attributes are:
| attribute | description |
|---|---|
| mesh | names the mesh to process |
| x_axis | names the array to use as x-axis coordinates |
| y_axis | names the array to use as y-axis coordinates |
| out_dir | the path to write results to |
| x_res | the grid resolution to bin to in the x-direction |
| y_res | the grid resolution to bin to in the y-direction |
| return_data | set to 1 to return a data adaptor w/ the results |
| max_threads | the max number of threads to use |
Nested elements: | element | description | | arrays | a list of comma or space delimited array names to bin | | operations | a list of comma or space delimited binning operations |
The arrays to bin and binning operations are specified in a nested elements with a space or comma delimited lists. There must be an operation specified for each array.
|
static |
allocates a new instance
|
overridevirtual |
When set binning runs in a thread and ::Execute returns immediately.
Reimplemented from sensei::AnalysisAdaptor.