LCOV - code coverage report
Current view: top level - src/reporters - AffineInvariantDifferentialDecision.C (source / functions) Hit Total Coverage
Test: idaholab/moose stochastic_tools: #32971 (54bef8) with base c6cf66 Lines: 13 15 86.7 %
Date: 2026-05-29 20:40:35 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      10             : #include "AffineInvariantDifferentialDecision.h"
      11             : 
      12             : registerMooseObject("StochasticToolsApp", AffineInvariantDifferentialDecision);
      13             : 
      14             : InputParameters
      15          82 : AffineInvariantDifferentialDecision::validParams()
      16             : {
      17          82 :   InputParameters params = PMCMCDecision::validParams();
      18          82 :   params.addClassDescription("Perform decision making for Affine Invariant differential MCMC.");
      19          82 :   return params;
      20           0 : }
      21             : 
      22          40 : AffineInvariantDifferentialDecision::AffineInvariantDifferentialDecision(
      23          40 :     const InputParameters & parameters)
      24          40 :   : PMCMCDecision(parameters), _aides(dynamic_cast<const AffineInvariantDES *>(&_sampler))
      25             : {
      26             :   // Check whether the selected sampler is a differential evolution sampler or not
      27          40 :   if (!_aides)
      28           0 :     paramError("sampler", "The selected sampler is not of type AffineInvariantDES.");
      29          40 : }
      30             : 
      31             : void
      32         120 : AffineInvariantDifferentialDecision::computeTransitionVector(std::vector<Real> & tv,
      33             :                                                              const std::vector<Real> & evidence)
      34             : {
      35         720 :   for (unsigned int i = 0; i < tv.size(); ++i)
      36         820 :     tv[i] = std::exp(std::min(evidence[i], 0.0));
      37         120 : }

Generated by: LCOV version 1.14