VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
vf::gpu::Probe Class Reference

Computes statistics of pointwise data. Data can be written to vtk-file or timeseries file. All points and planes are written to the same file. Use different probes to write to separate files. Data is sampled in synchronous timestep, unless sampleEveryTimestep is set to true. More...

#include <Probe.h>

Inheritance diagram for vf::gpu::Probe:
vf::gpu::Sampler

Classes

struct  GridParams
 
struct  LevelData
 
struct  PostProcessingVariable
 
struct  ProbeData
 
struct  TimeseriesParams
 

Public Types

enum class  Statistic { Instantaneous , Means , Variances }
 

Public Member Functions

 Probe (std::shared_ptr< Parameter > para, std::shared_ptr< CudaMemoryManager > cudaMemoryManager, const std::string &outputPath, const std::string &probeName, uint tStartSampling, uint tBetweenSamples, uint tStartWritingOutput, uint tBetweenWriting, bool outputTimeSeries, bool sampleEveryTimestep, bool sampleScalar=false)
 
 ~Probe () override
 
void addProbePlane (real startX, real startY, real startZ, real length, real width, real height)
 
void addProbePoint (real x, real y, real z)
 
void addProbePointsFromList (std::vector< real > coordsX, std::vector< real > coordY, std::vector< real > coordZ)
 
void addProbeVolume (const std::shared_ptr< GbObject3D > &probeVolume)
 
void addStatistic (Statistic variable)
 
void addAllAvailableStatistics ()
 
void setFileNameToNOut ()
 
void init () override
 
void sample (int level, uint t) override
 
void getTaggedFluidNodes (GridProvider *gridProvider) override
 
LevelDatagetLevelData (int level)
 
- Public Member Functions inherited from vf::gpu::Sampler
 Sampler (const std::string outputPath, const std::string probeName)
 
virtual ~Sampler ()=default
 

Static Public Member Functions

static GridParams getGridParams (LBMSimulationParameter *para)
 

Protected Attributes

SPtr< Parameterpara
 
SPtr< CudaMemoryManagercudaMemoryManager
 
std::vector< LevelDatalevelDatas
 
bool enableComputationInstantaneous {}
 
bool enableComputationMeans {}
 
bool enableComputationVariances {}
 
const bool sampleScalar
 
const bool outputTimeSeries
 flag initiating time series output.
 
const bool sampleEveryTimestep
 
std::vector< std::string > fileNamesForCollectionFile
 
std::vector< std::string > timeseriesFileNames
 
bool fileNameLU = true
 if true, written file name contains time step in LU, else is the number of the written probe files
 
const uint tStartSampling
 
const uint tBetweenSamples
 
const uint tStartWritingOutput
 
const uint tBetweenWriting
 
std::vector< std::shared_ptr< GbObject3D > > probeObjects
 
- Protected Attributes inherited from vf::gpu::Sampler
std::string outputPath
 
std::string probeName
 

Detailed Description

Computes statistics of pointwise data. Data can be written to vtk-file or timeseries file. All points and planes are written to the same file. Use different probes to write to separate files. Data is sampled in synchronous timestep, unless sampleEveryTimestep is set to true.

Definition at line 57 of file Probe.h.

Member Enumeration Documentation

◆ Statistic

Enumerator
Instantaneous 
Means 
Variances 

Definition at line 60 of file Probe.h.

Constructor & Destructor Documentation

◆ Probe()

vf::gpu::Probe::Probe ( std::shared_ptr< Parameter para,
std::shared_ptr< CudaMemoryManager cudaMemoryManager,
const std::string &  outputPath,
const std::string &  probeName,
uint  tStartSampling,
uint  tBetweenSamples,
uint  tStartWritingOutput,
uint  tBetweenWriting,
bool  outputTimeSeries,
bool  sampleEveryTimestep,
bool  sampleScalar = false 
)

◆ ~Probe()

vf::gpu::Probe::~Probe ( )
override

Member Function Documentation

◆ addAllAvailableStatistics()

void vf::gpu::Probe::addAllAvailableStatistics ( )
inline

Definition at line 71 of file Probe.h.

◆ addProbePlane()

void vf::gpu::Probe::addProbePlane ( real  startX,
real  startY,
real  startZ,
real  length,
real  width,
real  height 
)

◆ addProbePoint()

void vf::gpu::Probe::addProbePoint ( real  x,
real  y,
real  z 
)

◆ addProbePointsFromList()

void vf::gpu::Probe::addProbePointsFromList ( std::vector< real coordsX,
std::vector< real coordY,
std::vector< real coordZ 
)

◆ addProbeVolume()

void vf::gpu::Probe::addProbeVolume ( const std::shared_ptr< GbObject3D > &  probeVolume)

◆ addStatistic()

void vf::gpu::Probe::addStatistic ( Statistic  variable)

◆ getGridParams()

static GridParams vf::gpu::Probe::getGridParams ( LBMSimulationParameter para)
static

◆ getLevelData()

LevelData * vf::gpu::Probe::getLevelData ( int  level)
inline

Definition at line 91 of file Probe.h.

◆ getTaggedFluidNodes()

void vf::gpu::Probe::getTaggedFluidNodes ( GridProvider gridProvider)
overridevirtual

Implements vf::gpu::Sampler.

◆ init()

void vf::gpu::Probe::init ( )
overridevirtual

Implements vf::gpu::Sampler.

◆ sample()

void vf::gpu::Probe::sample ( int  level,
uint  t 
)
overridevirtual

Implements vf::gpu::Sampler.

◆ setFileNameToNOut()

void vf::gpu::Probe::setFileNameToNOut ( )
inline

Definition at line 78 of file Probe.h.

Member Data Documentation

◆ cudaMemoryManager

SPtr<CudaMemoryManager> vf::gpu::Probe::cudaMemoryManager
protected

Definition at line 131 of file Probe.h.

◆ enableComputationInstantaneous

bool vf::gpu::Probe::enableComputationInstantaneous {}
protected

Definition at line 133 of file Probe.h.

◆ enableComputationMeans

bool vf::gpu::Probe::enableComputationMeans {}
protected

Definition at line 133 of file Probe.h.

◆ enableComputationVariances

bool vf::gpu::Probe::enableComputationVariances {}
protected

Definition at line 133 of file Probe.h.

◆ fileNameLU

bool vf::gpu::Probe::fileNameLU = true
protected

if true, written file name contains time step in LU, else is the number of the written probe files

Definition at line 141 of file Probe.h.

◆ fileNamesForCollectionFile

std::vector<std::string> vf::gpu::Probe::fileNamesForCollectionFile
protected

Definition at line 137 of file Probe.h.

◆ levelDatas

std::vector<LevelData> vf::gpu::Probe::levelDatas
protected

Definition at line 132 of file Probe.h.

◆ outputTimeSeries

const bool vf::gpu::Probe::outputTimeSeries
protected

flag initiating time series output.

Definition at line 136 of file Probe.h.

◆ para

SPtr<Parameter> vf::gpu::Probe::para
protected

Definition at line 130 of file Probe.h.

◆ probeObjects

std::vector<std::shared_ptr<GbObject3D> > vf::gpu::Probe::probeObjects
protected

Definition at line 147 of file Probe.h.

◆ sampleEveryTimestep

const bool vf::gpu::Probe::sampleEveryTimestep
protected

Definition at line 136 of file Probe.h.

◆ sampleScalar

const bool vf::gpu::Probe::sampleScalar
protected

Definition at line 134 of file Probe.h.

◆ tBetweenSamples

const uint vf::gpu::Probe::tBetweenSamples
protected

Definition at line 144 of file Probe.h.

◆ tBetweenWriting

const uint vf::gpu::Probe::tBetweenWriting
protected

Definition at line 146 of file Probe.h.

◆ timeseriesFileNames

std::vector<std::string> vf::gpu::Probe::timeseriesFileNames
protected

Definition at line 138 of file Probe.h.

◆ tStartSampling

const uint vf::gpu::Probe::tStartSampling
protected

Definition at line 143 of file Probe.h.

◆ tStartWritingOutput

const uint vf::gpu::Probe::tStartWritingOutput
protected

Definition at line 145 of file Probe.h.


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