www.mooseframework.org
FunctionInterface.h
Go to the documentation of this file.
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 #pragma once
11 
12 #include "MooseTypes.h"
13 #include "InputParameters.h"
14 
15 #define usingFunctionInterfaceMembers \
16  using FunctionInterface::getFunction; \
17  using FunctionInterface::getFunctionByName
18 
19 // Forward declarations
20 class Function;
21 class FEProblemBase;
22 class Function;
23 class InputParameters;
24 class MooseObject;
25 
26 template <typename T>
28 
36 {
37 public:
44  FunctionInterface(const MooseObject * moose_object);
45 
47 
53  const Function & getFunction(const std::string & name) const;
54 
60  const Function & getFunctionByName(const FunctionName & name) const;
61 
69  bool hasFunction(const std::string & param_name) const;
70 
77  bool hasFunctionByName(const FunctionName & name) const;
78 
79 private:
82 
85 
88 };
std::string name(const ElemQuality q)
Base class for function objects.
Definition: Function.h:37
FunctionInterface(const MooseObject *moose_object)
const Function & getFunction(const std::string &name) const
Get a function with a given name.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const THREAD_ID _fni_tid
Thread ID.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:33
bool hasFunctionByName(const FunctionName &name) const
Determine if the function exists.
FEProblemBase & _fni_feproblem
Reference to FEProblemBase instance.
bool hasFunction(const std::string &param_name) const
Determine if the function exists.
const InputParameters & _fni_params
Parameters of the object with this interface.
static InputParameters validParams()
const Function & getFunctionByName(const FunctionName &name) const
Get a function with a given name.
Interface for objects that need to use functions.
InputParameters validParams()
unsigned int THREAD_ID
Definition: MooseTypes.h:198