#include <source/apputils/plotting/VisDerivedDataStrategy.h>
Inheritance diagram for SAMRAI::appu::VisDerivedDataStrategy< DIM >:
Public Member Functions | |
VisDerivedDataStrategy () | |
Default constructor for VisDerivedDataStrategy<DIM>. | |
virtual | ~VisDerivedDataStrategy () |
Destructor for VisDerivedDataStrategy<DIM>. | |
virtual bool | packDerivedDataIntoDoubleBuffer (double *buffer, const hier::Patch< DIM > &patch, const hier::Box< DIM > ®ion, const string &variable_name, int depth_index)=0 |
This function calculates and packs derived cell-centered data to a 1D double precision buffer. In the case of the VisIt data writer, node-centered data may also be used. It is called once for each component of multicomponent data. |
The concrete strategy object is responsible for supplying an implementation of the function packDerivedDataIntoDoubleBuffer() which calculates the derived data and writes it into the double precision buffer passed in to it.
This class is shared by both VisDataWriter<DIM> and CartesianVizamraiDataWriter<DIM>.
|
Default constructor for VisDerivedDataStrategy<DIM>.
|
|
Destructor for VisDerivedDataStrategy<DIM>.
|
|
This function calculates and packs derived cell-centered data to a 1D double precision buffer. In the case of the VisIt data writer, node-centered data may also be used. It is called once for each component of multicomponent data. The buffer will be already allocated. This routine is needed to construct data values that are not stored on the hierarchy, but which may be important to visualize. The data to be packed corresponds to the plot variable that the user has registered with the data writer using registerDerivedPlotScalar/Vector/Tensor() with the string "variable_name". The data to be packed is derived from the data that lives on the given patch. The box describes the patch region over which to pack the data. It is assumed that all data needed to compute the derived quantity exists on the given patch. The method packDerivedDataIntoDoubleBuffer() will be called DIM times for vector data, and DIM*DIM times for tensor data, with the integer "depth_index" argument indicating the particular component of vector to be packed. For scalar values, the depth_index will be 0. This routine must include ghost data if the ghost_cell_width parameter was set when the derived data was registered. The data must be packed into the buffer in column major order, the ordering used by SAMRAI, i.e. (f(x_0,y_0,z_0), f(x_1,y_0,z_0), f(x_2,y_0,z_0), ...). If the derived data was registered as node-centered, a buffer of node-centered data is expected. Derived data need not be defined on all patches. It is the responsibility of this routine to determine if data exists on the patch and set the return value of of this routine appropriately: true if the data exists on the patch, false otherwise.
|