LCOV - code coverage report
Current view: top level - src/acquisitions - UFunction.C (source / functions) Hit Total Coverage
Test: idaholab/moose stochastic_tools: #32971 (54bef8) with base c6cf66 Lines: 11 12 91.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://www.mooseframework.org
       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 "UFunction.h"
      11             : #include <cmath>
      12             : 
      13             : registerMooseObject("StochasticToolsApp", UFunction);
      14             : 
      15             : InputParameters
      16           8 : UFunction::validParams()
      17             : {
      18           8 :   InputParameters params = ParallelAcquisitionFunctionBase::validParams();
      19           8 :   params.addClassDescription("U-function acquisition function for rare events analysis.");
      20           8 :   return params;
      21           0 : }
      22             : 
      23           4 : UFunction::UFunction(const InputParameters & parameters)
      24           4 :   : ParallelAcquisitionFunctionBase(parameters)
      25             : {
      26           4 : }
      27             : 
      28             : void
      29          16 : UFunction::computeAcquisitionInternal(std::vector<Real> & acq,
      30             :                                       const std::vector<Real> & gp_mean,
      31             :                                       const std::vector<Real> & gp_std,
      32             :                                       const std::vector<std::vector<Real>> & /*test_inputs*/,
      33             :                                       const std::vector<std::vector<Real>> & /*train_inputs*/,
      34             :                                       const std::vector<Real> & /*generic*/) const
      35             : {
      36       16016 :   for (unsigned int i = 0; i < gp_mean.size(); ++i)
      37       16000 :     acq[i] = std::abs(gp_mean[i]) / gp_std[i];
      38          16 : }

Generated by: LCOV version 1.14