SENSEI
A frame work for generic in situ analytics
|
Extract a slice defined by a point and a normal and writes it to disk. More...
#include <SliceExtract.h>
Public Member Functions | |
senseiTypeMacro (SliceExtract, AnalysisAdaptor) | |
bool | Execute (DataAdaptor *data, DataAdaptor **) override |
Compute a slice and write it to disk. More... | |
int | Finalize () override |
Flush and close all open files. 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 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 SliceExtract * | New () |
Create an instance of SliceExtract. More... | |
Protected Member Functions | |
SliceExtract (const SliceExtract &)=delete | |
void | operator= (const SliceExtract &)=delete |
Protected Member Functions inherited from sensei::AnalysisAdaptor | |
AnalysisAdaptor (const AnalysisAdaptor &)=delete | |
void | operator= (const AnalysisAdaptor &)=delete |
Protected Attributes | |
InternalsType * | Internals |
Protected Attributes inherited from sensei::AnalysisAdaptor | |
MPI_Comm | Comm |
int | Verbose |
int | DeviceId |
int | DevicesPerNode |
int | DevicesToUse |
int | DeviceStart |
int | DeviceStride |
int | Asynchronous |
Run time configuration | |
enum | { OP_ISO_SURFACE =0, OP_PLANAR_SLICE =1 } |
void | EnableWriter (int val) |
Enable writing the results to disk. More... | |
void | EnablePartitioner (int val) |
Enable the use of an optimized partitioner. More... | |
int | SetOperation (int op) |
Set which operation will be used. More... | |
int | SetOperation (std::string op) |
set which operation will be used. More... | |
void | SetIsoValues (const std::string &mesh, const std::string &arrayName, int arrayCentering, const std::vector< double > &vals) |
set the values to compute iso-surfaces for. More... | |
void | SetNumberOfIsoValues (const std::string &mesh, const std::string &array, int centering, int numIsos) |
set the number of iso-surfaces to extract. More... | |
int | SetPoint (const std::array< double, 3 > &point) |
set the point and nornal defining the slice plane this applies when running in OP_PLANAR_SLICE More... | |
int | SetNormal (const std::array< double, 3 > &normal) |
set the point and nornal defining the slice plane this applies when running in OP_PLANAR_SLICE More... | |
int | SetWriterOutputDir (const std::string &outputDir) |
Sets the directory files will be written to. More... | |
int | SetWriterMode (const std::string &mode) |
Set the file creation mode by string Use either "paraview" or "visit". More... | |
int | SetWriterWriter (const std::string &writer) |
Sets the writer type to a VTK legacy writer("legacy") or the VTK XML writer ("xml"). More... | |
int | SetDataRequirements (const DataRequirements &reqs) |
Adds a set of sensei::DataRequirements, typically this will come from an XML configuratiopn file. More... | |
int | AddDataRequirement (const std::string &meshName, int association, const std::vector< std::string > &arrays) |
Add an indivudal data requirement. More... | |
void | SetVerbose (int val) override |
Sets the verbosity level of the internally used adaptors. More... | |
Additional Inherited Members | |
Public Types inherited from sensei::AnalysisAdaptor | |
enum | { DEVICE_HOST =-1, DEVICE_AUTO =-2 } |
values controling device selection More... | |
Extract a slice defined by a point and a normal and writes it to disk.
int sensei::SliceExtract::AddDataRequirement | ( | const std::string & | meshName, |
int | association, | ||
const std::vector< std::string > & | arrays | ||
) |
Add an indivudal data requirement.
Data requirements tell the adaptor what to fetch from the simulation and write to disk. If none are given then all available data is fetched and written.
[in] | meshName | the name of the mesh to fetch and write |
[in] | association | the type of data array to fetch and write vtkDataObject::POINT or vtkDataObject::CELL |
[in] | arrays | a list of arrays to fetch and write |
void sensei::SliceExtract::EnablePartitioner | ( | int | val | ) |
Enable the use of an optimized partitioner.
void sensei::SliceExtract::EnableWriter | ( | int | val | ) |
Enable writing the results to disk.
|
overridevirtual |
Compute a slice and write it to disk.
Implements sensei::AnalysisAdaptor.
|
overridevirtual |
Flush and close all open files.
Reimplemented from sensei::AnalysisAdaptor.
|
static |
Create an instance of SliceExtract.
int sensei::SliceExtract::SetDataRequirements | ( | const DataRequirements & | reqs | ) |
Adds a set of sensei::DataRequirements, typically this will come from an XML configuratiopn file.
Data requirements tell the adaptor what to fetch from the simulation and write to disk. If none are given then all available data is fetched and written.
void sensei::SliceExtract::SetIsoValues | ( | const std::string & | mesh, |
const std::string & | arrayName, | ||
int | arrayCentering, | ||
const std::vector< double > & | vals | ||
) |
set the values to compute iso-surfaces for.
if these aren't set the NumberOfIsoSurfaces field is used to generate equally spaced values on the fly. This applies in OP_ISO_SURFACE
int sensei::SliceExtract::SetNormal | ( | const std::array< double, 3 > & | normal | ) |
set the point and nornal defining the slice plane this applies when running in OP_PLANAR_SLICE
void sensei::SliceExtract::SetNumberOfIsoValues | ( | const std::string & | mesh, |
const std::string & | array, | ||
int | centering, | ||
int | numIsos | ||
) |
set the number of iso-surfaces to extract.
Equally spaced iso-values are determined at each update. This applies in OP_ISO_SURFACE when explicit values have not been provided
int sensei::SliceExtract::SetOperation | ( | int | op | ) |
Set which operation will be used.
Valid values are OP_ISO_SURFACE=0, OP_PLANAR_SLICE=1
int sensei::SliceExtract::SetOperation | ( | std::string | op | ) |
set which operation will be used.
Valid values are "planar_slice", "iso_surface"
int sensei::SliceExtract::SetPoint | ( | const std::array< double, 3 > & | point | ) |
set the point and nornal defining the slice plane this applies when running in OP_PLANAR_SLICE
|
overridevirtual |
Sets the verbosity level of the internally used adaptors.
Reimplemented from sensei::AnalysisAdaptor.
int sensei::SliceExtract::SetWriterMode | ( | const std::string & | mode | ) |
Set the file creation mode by string Use either "paraview" or "visit".
int sensei::SliceExtract::SetWriterOutputDir | ( | const std::string & | outputDir | ) |
Sets the directory files will be written to.
int sensei::SliceExtract::SetWriterWriter | ( | const std::string & | writer | ) |
Sets the writer type to a VTK legacy writer("legacy") or the VTK XML writer ("xml").