VAPOR3 3.9.4
DerivedParticleDensity.h
Go to the documentation of this file.
1#pragma once
2
3#include <vapor/DerivedVar.h>
4#include <vapor/DataMgr.h>
5
6namespace VAPoR {
7
9 DC * _dc;
10 string _meshName;
11 DataMgr *_dataMgr;
12
13public:
14 DerivedParticleDensity(string varName, DC *dc, string meshName, DataMgr *dataMgr);
15 virtual int Initialize() override;
16 virtual int OpenVariableRead(size_t ts, int level = 0, int lod = 0) override;
17 virtual int CloseVariable(int fd) override;
18 virtual int ReadRegion(int fd, const std::vector<size_t> &min, const std::vector<size_t> &max, float *region) override;
19 virtual int GetDimLensAtLevel(int level, std::vector<size_t> &dims_at_level, std::vector<size_t> &bs_at_level) const override;
20 virtual bool VariableExists(size_t ts, int reflevel, int lod) const override;
21 virtual bool GetBaseVarInfo(DC::BaseVar &var) const override;
22 virtual bool GetDataVarInfo(DC::DataVar &cvar) const override;
23 virtual std::vector<string> GetInputs() const override;
24
25protected:
26 string _dataVar;
27
28 virtual void compute(Grid *inGrid, float *output, int xd, int yd, int zd, size_t realNP) const;
29};
30
31
33public:
34 DerivedParticleAverage(string varName, DC *dc, string meshName, DataMgr *dataMgr, string inputVar);
35 virtual int Initialize() override { return 0; }
36
37protected:
38 virtual void compute(Grid *inGrid, float *output, int xd, int yd, int zd, size_t realNP) const override;
39};
40
41
43 DC * _dc;
44 float _minExt, _maxExt;
45 string _inputCoordVar;
46
47public:
48 DerivedCoordVar1DSpan(string derivedVarName, DC *dc, string dimName, int axis, string units, float minExt, float maxExt);
49 DerivedCoordVar1DSpan(string derivedVarName, DC *dc, string dimName, int axis, string units, string inputCoordVar);
51 virtual int ReadRegion(int fd, const std::vector<size_t> &min, const std::vector<size_t> &max, float *region) override;
52 virtual std::vector<string> GetInputs() const override;
53};
54
55} // namespace VAPoR
Base class for storing variable metadata.
Definition: DC.h:754
Data variable metadata.
Definition: DC.h:987
A Template Method design pattern for reading a collection of data.
Definition: DC.h:150
A cache based data reader.
Definition: DataMgr.h:110
DerivedCoordVar1DSpan(string derivedVarName, DC *dc, string dimName, int axis, string units, string inputCoordVar)
DerivedCoordVar1DSpan(string derivedVarName, DC *dc, string dimName, int axis, string units, float minExt, float maxExt)
virtual int ReadRegion(int fd, const std::vector< size_t > &min, const std::vector< size_t > &max, float *region) override
virtual std::vector< string > GetInputs() const override
Derived 1D CF conventions coordinate variable using grid coordinates.
Definition: DerivedVar.h:305
Derived data variable abstract class.
Definition: DerivedVar.h:234
virtual void compute(Grid *inGrid, float *output, int xd, int yd, int zd, size_t realNP) const override
DerivedParticleAverage(string varName, DC *dc, string meshName, DataMgr *dataMgr, string inputVar)
virtual bool VariableExists(size_t ts, int reflevel, int lod) const override
virtual std::vector< string > GetInputs() const override
virtual bool GetDataVarInfo(DC::DataVar &cvar) const override
virtual int OpenVariableRead(size_t ts, int level=0, int lod=0) override
virtual bool GetBaseVarInfo(DC::BaseVar &var) const override
virtual int GetDimLensAtLevel(int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level) const override
virtual int ReadRegion(int fd, const std::vector< size_t > &min, const std::vector< size_t > &max, float *region) override
virtual void compute(Grid *inGrid, float *output, int xd, int yd, int zd, size_t realNP) const
virtual int CloseVariable(int fd) override
virtual int Initialize() override
DerivedParticleDensity(string varName, DC *dc, string meshName, DataMgr *dataMgr)
Abstract base class for a 2D or 3D structured or unstructured grid.
Definition: Grid.h:56