https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AffineInvariantDifferentialDecision.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11
13
16{
18 params.addClassDescription("Perform decision making for Affine Invariant differential MCMC.");
19 return params;
20}
21
23 const InputParameters & parameters)
24 : PMCMCDecision(parameters), _aides(dynamic_cast<const AffineInvariantDES *>(&_sampler))
25{
26 // Check whether the selected sampler is a differential evolution sampler or not
27 if (!_aides)
28 paramError("sampler", "The selected sampler is not of type AffineInvariantDES.");
29}
30
31void
33 const std::vector<Real> & evidence)
34{
35 for (unsigned int i = 0; i < tv.size(); ++i)
36 tv[i] = std::exp(std::min(evidence[i], 0.0));
37}
registerMooseObject("StochasticToolsApp", AffineInvariantDifferentialDecision)
A class for performing Affine Invariant Ensemble MCMC with differential sampler.
A class for performing Affine Invariant Ensemble MCMC with differential sampler.
const AffineInvariantDES *const _aides
Affine differential sampler.
AffineInvariantDifferentialDecision(const InputParameters &parameters)
virtual void computeTransitionVector(std::vector< Real > &tv, const std::vector< Real > &evidence) override
Compute the transition probability vector (after the computation of evidence)
void addClassDescription(const std::string &doc_string)
void paramError(const std::string &param, Args... args) const
PMCMCDecision will help making sample accept/reject decisions in MCMC schemes (for e....
static InputParameters validParams()