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 30 of file DistributionInterface.h.

## ◆ DistributionInterface()

 DistributionInterface::DistributionInterface ( const MooseObject * moose_object )
Parameters
 params The 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 22 of file DistributionInterface.C.

23  : _dni_params(moose_object->parameters()),
25 {
26 }
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.
const InputParameters & _dni_params
Parameters of the object with this interface.

## ◆ getDistribution()

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

Get a distribution with a given name.

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

Definition at line 29 of file DistributionInterface.C.

30 {
31  DistributionName dist_name = _dni_params.get<DistributionName>(name);
32  return _dni_feproblem.getDistribution(dist_name);
33 }
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.

## ◆ getDistributionByName()

 Distribution & DistributionInterface::getDistributionByName ( const DistributionName & name )

Get a distribution with a given name.

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

Definition at line 36 of file DistributionInterface.C.

Referenced by RandomIC::RandomIC(), and Sampler::Sampler().

37 {
38  return _dni_feproblem.getDistribution(name);
39 }
virtual Distribution & getDistribution(const std::string &name)
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.

## ◆ _dni_feproblem

 FEProblemBase& DistributionInterface::_dni_feproblem
private

Reference to FEProblemBase instance.

Definition at line 60 of file DistributionInterface.h.

Referenced by getDistribution(), and getDistributionByName().

## ◆ _dni_params

 const InputParameters& DistributionInterface::_dni_params
private

Parameters of the object with this interface.

Definition at line 57 of file DistributionInterface.h.

Referenced by getDistribution().

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