-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14692 from aeslaughter/vpp-stats-ci-14409
Statistics and confidence intervals of serial or distributed VPP vectors
- Loading branch information
Showing
57 changed files
with
1,453 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
*.toc | ||
*.snm | ||
*.csv | ||
*.csv.* | ||
*.dylib | ||
*.so | ||
*.so.* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 91 additions & 36 deletions
127
framework/doc/content/source/vectorpostprocessors/StatisticsVectorPostprocessor.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
//* This file is part of the MOOSE framework | ||
//* https://www.mooseframework.org | ||
//* | ||
//* All rights reserved, see COPYRIGHT for full restrictions | ||
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT | ||
//* | ||
//* Licensed under LGPL 2.1, please see LICENSE for details | ||
//* https://www.gnu.org/licenses/lgpl-2.1.html | ||
|
||
#pragma once | ||
|
||
#include "MooseTypes.h" | ||
#include "MooseObject.h" | ||
#include <vector> | ||
|
||
class MooseEnum; | ||
class MooseEnumItem; | ||
class MooseRandom; | ||
|
||
namespace Statistics | ||
{ | ||
class Calculator; | ||
class BootstrapCalculator; | ||
|
||
/* | ||
* Return available bootstrap statistics calculators. | ||
*/ | ||
MooseEnum makeBootstrapCalculatorEnum(); | ||
|
||
/* | ||
* Create const Bootstrap confidence level interface calculator for use by VectorPostprocessor | ||
* objects. | ||
*/ | ||
std::unique_ptr<const BootstrapCalculator> makeBootstrapCalculator(const MooseEnum &, | ||
const libMesh::ParallelObject &, | ||
const std::vector<Real> &, | ||
unsigned int, | ||
unsigned int); | ||
|
||
/* | ||
* Base class for computing bootstrap confidence level intervals. These classes follow the same | ||
* design pattern as those Statistics.h. | ||
*/ | ||
class BootstrapCalculator : public libMesh::ParallelObject | ||
{ | ||
public: | ||
BootstrapCalculator(const libMesh::ParallelObject &, | ||
const std::vector<Real> &, | ||
unsigned int, | ||
unsigned int); | ||
virtual ~BootstrapCalculator() = default; | ||
|
||
virtual std::vector<Real> | ||
compute(const std::vector<Real> &, const Calculator &, const bool) const = 0; | ||
|
||
protected: | ||
std::vector<Real> shuffle(const std::vector<Real> &, MooseRandom &, const bool) const; | ||
|
||
// Confidence levels to compute in range (0, 1) | ||
const std::vector<Real> _levels; | ||
|
||
// Number of bootstrap replicates | ||
const unsigned int _replicates; | ||
|
||
// Random seed for creating boostrap replicates | ||
const unsigned int _seed; | ||
}; | ||
|
||
/* | ||
* Implement percentile method of Efron and Tibshirani (2003), Chapter 13. | ||
*/ | ||
class Percentile : public BootstrapCalculator | ||
{ | ||
public: | ||
Percentile(const libMesh::ParallelObject &, | ||
const std::vector<Real> &, | ||
unsigned int, | ||
unsigned int); | ||
|
||
virtual std::vector<Real> | ||
compute(const std::vector<Real> &, const Calculator &, const bool) const override; | ||
}; | ||
|
||
} // namespace Statistics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.