LCOV - code coverage report
Current view: top level - src/interfaces - LikelihoodInterface.C (source / functions) Hit Total Coverage
Test: idaholab/moose stochastic_tools: #33416 (b10b36) with base 9fbd27 Lines: 13 14 92.9 %
Date: 2026-07-23 16:21:17 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 "LikelihoodInterface.h"
      11             : 
      12             : InputParameters
      13         338 : LikelihoodInterface::validParams()
      14             : {
      15         338 :   return emptyInputParameters();
      16             : }
      17             : 
      18         163 : LikelihoodInterface::LikelihoodInterface(const InputParameters & parameters)
      19         163 :   : _likelihood_feproblem(*parameters.get<FEProblemBase *>("_fe_problem_base"))
      20             : {
      21         163 : }
      22             : 
      23             : LikelihoodFunctionBase *
      24         163 : LikelihoodInterface::getLikelihoodFunctionByName(const UserObjectName & name) const
      25             : {
      26             :   std::vector<LikelihoodFunctionBase *> models;
      27         163 :   _likelihood_feproblem.theWarehouse()
      28         163 :       .query()
      29         163 :       .condition<AttribName>(name)
      30         163 :       .condition<AttribSystem>("LikelihoodFunctionBase")
      31             :       .queryInto(models);
      32             : 
      33         163 :   if (models.empty())
      34           0 :     mooseError("Unable to find a LikelihoodFunction object with the name '" + name + "'");
      35         163 :   return models[0];
      36         163 : }

Generated by: LCOV version 1.14