This class manages the computation of the (co)variance between two given quantities (scalar or vector).
More...
#include <statistics_utilities.h>
|
| VarianceSampler (const StatisticsSampler::Pointer pQuantity1, const StatisticsSampler::Pointer pQuantity2) |
| Initialize a sampler for the (co)variance between two given quantities. More...
|
|
void | SampleDataPoint (std::vector< double >::iterator &BufferIterator, const StatisticsSampler::IntegrationPointDataView &rCurrentStatistics, const std::vector< double > &rNewMeasurement, const std::size_t NumberOfMeasurements) override |
| For higher-order statistics: operate on lower order data. More...
|
|
double | Finalize (double Value, std::size_t SampleSize) const override |
| Post-process internal data to produce the final value of the statistical result. More...
|
|
| KRATOS_CLASS_POINTER_DEFINITION (StatisticsSampler) |
|
| StatisticsSampler (std::size_t NumValues) |
| Define a new StatisticsSampler instance. More...
|
|
virtual | ~StatisticsSampler () |
| Destructor. More...
|
|
virtual void | SampleDataPoint (const Geometry< Node > &rGeometry, const Vector &rShapeFunctions, const Matrix &rShapeDerivatives, std::vector< double >::iterator &BufferIterator) |
| For first-order statistics: read data directly. More...
|
|
std::size_t | GetSize () const |
| Number of quantities managed by this statistic. More...
|
|
virtual std::size_t | GetComponentOffset (std::size_t i) const |
| Offset (from the start of the space allocated to this statistic) for the storage of component i. More...
|
|
virtual std::size_t | ComponentIndex (std::size_t i, std::size_t j) const |
| Helper returning the correct argument in calls to GetComponentOffset for matrix quantities. More...
|
|
std::size_t | GetOffset () const |
| Offset (from the start of the statistics container) to the first component stored by this statistic. More...
|
|
void | SetOffset (std::size_t Offset) |
| Assign a new offset (from the start of the statistics container) to the first component stored by this statistic. More...
|
|
virtual void | OutputResult (std::ofstream &rOutStream, IntegrationPointDataViewIterator &rDataBuffer, std::size_t SampleSize, const std::string &rSeparator) const |
| Write results managed by this class to output buffer. More...
|
|
std::string | GetTag (std::size_t ComponentIndex) const |
| Get the string associated one of the components of this statistic. More...
|
|
|
| VarianceSampler (const StatisticsSampler::Pointer pQuantity1, const StatisticsSampler::Pointer pQuantity2, std::size_t DataSize) |
|
const StatisticsSampler::Pointer | GetQuantity1 () const |
|
const StatisticsSampler::Pointer | GetQuantity2 () const |
|
void | OutputHeader (std::ofstream &rOutStream, const std::string &rSeparator) const override |
| Write header for the output file. More...
|
|
void | AddTag (std::string Tag) |
|
This class manages the computation of the (co)variance between two given quantities (scalar or vector).
◆ VarianceSampler() [1/2]
Kratos::VarianceSampler::VarianceSampler |
( |
const StatisticsSampler::Pointer |
pQuantity1, |
|
|
const StatisticsSampler::Pointer |
pQuantity2 |
|
) |
| |
|
inline |
Initialize a sampler for the (co)variance between two given quantities.
Note that online recording of a variance requires also recording the averages of each quantity.
- Parameters
-
pQuantity1 | Sampler for the average of the first quantity of the variance. |
pQuantity2 | Sampler for the average of the second quantity of the variance. |
◆ VarianceSampler() [2/2]
Kratos::VarianceSampler::VarianceSampler |
( |
const StatisticsSampler::Pointer |
pQuantity1, |
|
|
const StatisticsSampler::Pointer |
pQuantity2, |
|
|
std::size_t |
DataSize |
|
) |
| |
|
inlineprotected |
◆ Finalize()
double Kratos::VarianceSampler::Finalize |
( |
double |
Value, |
|
|
std::size_t |
SampleSize |
|
) |
| const |
|
inlineoverridevirtual |
Post-process internal data to produce the final value of the statistical result.
In most cases, this corresponds to dividing by sample size.
Reimplemented from Kratos::StatisticsSampler.
◆ GetQuantity1()
const StatisticsSampler::Pointer Kratos::VarianceSampler::GetQuantity1 |
( |
| ) |
const |
|
inlineprotected |
◆ GetQuantity2()
const StatisticsSampler::Pointer Kratos::VarianceSampler::GetQuantity2 |
( |
| ) |
const |
|
inlineprotected |
◆ OutputHeader()
void Kratos::VarianceSampler::OutputHeader |
( |
std::ofstream & |
rOutStream, |
|
|
const std::string & |
rSeparator |
|
) |
| const |
|
inlineoverrideprotectedvirtual |
◆ SampleDataPoint()
For higher-order statistics: operate on lower order data.
To be implemented in derived classes. Note that the BufferIterator argument will be advanced during the call.
- Parameters
-
| BufferIterator | Iterator pointing to the start of the storage of the statistics managed by this class. |
[in] | rCurrentStatistics | Container of last known values for recorded quantities at this sampling point. |
[in] | rNewMeasurement | Container of new measurements for recorded quantities at this sampling point. |
[in] | NumberOfMeasurements | Total number of realizations measured at the sampling point (including the current one). |
Reimplemented from Kratos::StatisticsSampler.
Reimplemented in Kratos::ComponentwiseVarianceSampler, and Kratos::SymmetricVarianceSampler.
The documentation for this class was generated from the following file:
- /home/runner/work/Documentation/Documentation/master/applications/FluidDynamicsApplication/custom_utilities/statistics_utilities.h