https://mooseframework.inl.gov
LikelihoodInterface.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 
10 #include "LikelihoodInterface.h"
11 
14 {
15  return emptyInputParameters();
16 }
17 
19  : _likelihood_feproblem(*parameters.get<FEProblemBase *>("_fe_problem_base"))
20 {
21 }
22 
25 {
26  std::vector<LikelihoodFunctionBase *> models;
28  .query()
29  .condition<AttribName>(name)
30  .condition<AttribSystem>("LikelihoodFunctionBase")
31  .queryInto(models);
32 
33  if (models.empty())
34  mooseError("Unable to find a LikelihoodFunction object with the name '" + name + "'");
35  return models[0];
36 }
LikelihoodInterface(const InputParameters &parameters)
All Likelihoods should inherit from this class.
void mooseError(Args &&... args)
FEProblemBase & _likelihood_feproblem
Reference to FEProblemBase instance.
InputParameters emptyInputParameters()
TheWarehouse & theWarehouse() const
const std::string name
Definition: Setup.h:20
static InputParameters validParams()
Query query()
LikelihoodFunctionBase * getLikelihoodFunctionByName(const UserObjectName &name) const
Lookup a LikelihoodFunction object by name and return pointer.
const Elem & get(const ElemType type_in)