www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
FunctionInterface Class Reference

Interface for objects that need to use functions. More...

#include <FunctionInterface.h>

Inheritance diagram for FunctionInterface:
[legend]

Public Member Functions

 FunctionInterface (const MooseObject *moose_object)
 
FunctiongetFunction (const std::string &name)
 Get a function with a given name. More...
 
FunctiongetFunctionByName (const FunctionName &name)
 Get a function with a given name. More...
 

Private Attributes

const InputParameters_fni_params
 Parameters of the object with this interface. More...
 
FEProblemBase_fni_feproblem
 Reference to FEProblemBase instance. More...
 
THREAD_ID _fni_tid
 Thread ID. More...
 

Detailed Description

Interface for objects that need to use functions.

Inherit from this class at a very low level to make the getFunction method available.

Definition at line 40 of file FunctionInterface.h.

Constructor & Destructor Documentation

FunctionInterface::FunctionInterface ( const MooseObject moose_object)
Parameters
paramsThe parameters used by the object being instantiated. This class needs them so it can get the function named in the input file, but the object calling getFunction only needs to use the name on the left hand side of the statement "function = func_name"

Definition at line 27 of file FunctionInterface.C.

28  : _fni_params(moose_object->parameters()),
29  _fni_feproblem(*_fni_params.get<FEProblemBase *>("_fe_problem_base")),
30  _fni_tid(_fni_params.have_parameter<THREAD_ID>("_tid") ? _fni_params.get<THREAD_ID>("_tid") : 0)
31 {
32 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
FEProblemBase & _fni_feproblem
Reference to FEProblemBase instance.
const InputParameters & _fni_params
Parameters of the object with this interface.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
THREAD_ID _fni_tid
Thread ID.
unsigned int THREAD_ID
Definition: MooseTypes.h:79

Member Function Documentation

Function & FunctionInterface::getFunction ( const std::string &  name)

Get a function with a given name.

Parameters
nameThe name of the parameter key of the function to retrieve
Returns
The function with name associated with the parameter 'name'

Definition at line 35 of file FunctionInterface.C.

36 {
37  return _fni_feproblem.getFunction(_fni_params.get<FunctionName>(name), _fni_tid);
38 }
virtual Function & getFunction(const std::string &name, THREAD_ID tid=0)
FEProblemBase & _fni_feproblem
Reference to FEProblemBase instance.
const InputParameters & _fni_params
Parameters of the object with this interface.
THREAD_ID _fni_tid
Thread ID.
Function & FunctionInterface::getFunctionByName ( const FunctionName &  name)

Get a function with a given name.

Parameters
nameThe name of the function to retrieve
Returns
The function with name 'name'

Definition at line 41 of file FunctionInterface.C.

Referenced by CompositeFunction::CompositeFunction(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GenericFunctionMaterial::GenericFunctionMaterial(), LinearCombinationFunction::LinearCombinationFunction(), and LineFunctionSampler::LineFunctionSampler().

42 {
43  return _fni_feproblem.getFunction(name, _fni_tid);
44 }
virtual Function & getFunction(const std::string &name, THREAD_ID tid=0)
FEProblemBase & _fni_feproblem
Reference to FEProblemBase instance.
THREAD_ID _fni_tid
Thread ID.

Member Data Documentation

FEProblemBase& FunctionInterface::_fni_feproblem
private

Reference to FEProblemBase instance.

Definition at line 70 of file FunctionInterface.h.

Referenced by getFunction(), and getFunctionByName().

const InputParameters& FunctionInterface::_fni_params
private

Parameters of the object with this interface.

Definition at line 67 of file FunctionInterface.h.

Referenced by getFunction().

THREAD_ID FunctionInterface::_fni_tid
private

Thread ID.

Definition at line 73 of file FunctionInterface.h.

Referenced by getFunction(), and getFunctionByName().


The documentation for this class was generated from the following files: