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

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

#include <DistributionInterface.h>

Inheritance diagram for DistributionInterface:
[legend]

Public Member Functions

 DistributionInterface (const MooseObject *moose_object)
 
DistributiongetDistribution (const std::string &name)
 Get a distribution with a given name. More...
 
DistributiongetDistributionByName (const DistributionName &name)
 Get a distribution with a given name. More...
 

Private Attributes

const InputParameters_dni_params
 Parameters of the object with this interface. More...
 
FEProblemBase_dni_feproblem
 Reference to FEProblemBase instance. More...
 

Detailed Description

Interface for objects that need to use distributions.

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

Definition at line 35 of file DistributionInterface.h.

Constructor & Destructor Documentation

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

Definition at line 27 of file DistributionInterface.C.

28  : _dni_params(moose_object->parameters()),
29  _dni_feproblem(*_dni_params.get<FEProblemBase *>("_fe_problem_base"))
30 {
31 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
const InputParameters & _dni_params
Parameters of the object with this interface.

Member Function Documentation

Distribution & DistributionInterface::getDistribution ( const std::string &  name)

Get a distribution with a given name.

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

Definition at line 34 of file DistributionInterface.C.

35 {
36  DistributionName dist_name = _dni_params.get<DistributionName>(name);
37  return _dni_feproblem.getDistribution(dist_name);
38 }
virtual Distribution & getDistribution(const std::string &name)
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.
const InputParameters & _dni_params
Parameters of the object with this interface.
Distribution & DistributionInterface::getDistributionByName ( const DistributionName &  name)

Get a distribution with a given name.

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

Definition at line 41 of file DistributionInterface.C.

Referenced by Sampler::Sampler().

42 {
43  return _dni_feproblem.getDistribution(name);
44 }
virtual Distribution & getDistribution(const std::string &name)
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.

Member Data Documentation

FEProblemBase& DistributionInterface::_dni_feproblem
private

Reference to FEProblemBase instance.

Definition at line 65 of file DistributionInterface.h.

Referenced by getDistribution(), and getDistributionByName().

const InputParameters& DistributionInterface::_dni_params
private

Parameters of the object with this interface.

Definition at line 62 of file DistributionInterface.h.

Referenced by getDistribution().


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