Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
DRO::DataReductionOperator Class Referenceabstract

#include <datareductionoperator.h>

Inheritance diagram for DRO::DataReductionOperator:

Public Member Functions

 DataReductionOperator ()
virtual ~DataReductionOperator ()
virtual bool getDataVectorInfo (std::string &dataType, unsigned int &dataSize, unsigned int &vectorSize) const =0
virtual bool getUnitMetadata (std::string &_unit, std::string &_unitLaTeX, std::string &_variableLaTeX, std::string &_unitConversion)
virtual bool setUnitMetadata (std::string &_unit, std::string &_unitLaTeX, std::string &_variableLaTeX, std::string &_unitConversion)
virtual std::string getName () const =0
virtual bool reduceData (const SpatialCell *cell, char *buffer)
virtual bool reduceDiagnostic (const SpatialCell *cell, Real *result)
virtual bool setSpatialCell (const SpatialCell *cell)=0

Protected Attributes

std::string unit
std::string unitLaTeX
std::string variableLaTeX
std::string unitConversion

Detailed Description

DRO::DataReductionOperator defines a base class for reducing simulation data (six-dimensional distribution function) into more compact variables, e.g. scalar fields, which can be written into file(s) and visualized.

The intention is that each DRO::DataReductionOperator stores the reduced data into internal variables, whose values are written into a byte array when DRO::DataReductionOperator::appendReducedData is called.

If needed, a user can write his or her own DRO::DataReductionOperators, which are loaded when the simulation initializes.

Datareduction oeprators are not thread-safe, some of the more intensive ones are threaded within.

Definition at line 54 of file datareductionoperator.h.

Constructor & Destructor Documentation

◆ DataReductionOperator()

DRO::DataReductionOperator::DataReductionOperator ( )

DataReductionOperator base class constructor. The constructor is empty.

Definition at line 44 of file datareductionoperator.cpp.

Here is the caller graph for this function:

◆ ~DataReductionOperator()

DRO::DataReductionOperator::~DataReductionOperator ( )
virtual

DataReductionOperator base class virtual destructor. The destructor is empty.

Definition at line 47 of file datareductionoperator.cpp.

Member Function Documentation

◆ getDataVectorInfo()

◆ getName()

◆ getUnitMetadata()

virtual bool DRO::DataReductionOperator::getUnitMetadata ( std::string & _unit,
std::string & _unitLaTeX,
std::string & _variableLaTeX,
std::string & _unitConversion )
inlinevirtual

Definition at line 60 of file datareductionoperator.h.

◆ reduceData()

◆ reduceDiagnostic()

bool DRO::DataReductionOperator::reduceDiagnostic ( const SpatialCell * cell,
Real * result )
virtual

Reduce the data and write the data vector to the given variable. If the vector length is larger than one, memory gets corrupted. Note that this function is only used for writing into diagnostic files.

Parameters
cellthe SpatialCell to reduce data out of
bufferBuffer in which the reduced data is written.
Returns
If true, DataReductionOperator reduced data successfully.

Reimplemented in DRO::Blocks, DRO::DataReductionOperatorCellParams, DRO::DataReductionOperatorFsGrid, DRO::DataReductionOperatorIonosphereElement, DRO::DataReductionOperatorIonosphereNode, DRO::DataReductionOperatorIonosphereNodeInt, DRO::DataReductionOperatorMPIGridCell, DRO::DataReductionOperatorPopulations< T >, DRO::DiagnosticFluxB, DRO::DiagnosticFluxE, DRO::MLPepochs, DRO::MLPerror, and DRO::VariableEffectiveSparsityThreshold.

Definition at line 68 of file datareductionoperator.cpp.

Here is the call graph for this function:

◆ setSpatialCell()

◆ setUnitMetadata()

virtual bool DRO::DataReductionOperator::setUnitMetadata ( std::string & _unit,
std::string & _unitLaTeX,
std::string & _variableLaTeX,
std::string & _unitConversion )
inlinevirtual

Definition at line 67 of file datareductionoperator.h.

Member Data Documentation

◆ unit

std::string DRO::DataReductionOperator::unit
protected

Definition at line 81 of file datareductionoperator.h.

◆ unitConversion

std::string DRO::DataReductionOperator::unitConversion
protected

Definition at line 84 of file datareductionoperator.h.

◆ unitLaTeX

std::string DRO::DataReductionOperator::unitLaTeX
protected

Definition at line 82 of file datareductionoperator.h.

◆ variableLaTeX

std::string DRO::DataReductionOperator::variableLaTeX
protected

Definition at line 83 of file datareductionoperator.h.


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