www.mooseframework.org
DistributionInterface.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "DistributionInterface.h"
16 #include "Distribution.h"
17 #include "SubProblem.h"
18 #include "MooseTypes.h"
19 
20 template <>
23 {
24  return emptyInputParameters();
25 }
26 
28  : _dni_params(moose_object->parameters()),
29  _dni_feproblem(*_dni_params.get<FEProblemBase *>("_fe_problem_base"))
30 {
31 }
32 
34 DistributionInterface::getDistribution(const std::string & name)
35 {
36  DistributionName dist_name = _dni_params.get<DistributionName>(name);
37  return _dni_feproblem.getDistribution(dist_name);
38 }
39 
41 DistributionInterface::getDistributionByName(const DistributionName & name)
42 {
43  return _dni_feproblem.getDistribution(name);
44 }
virtual Distribution & getDistribution(const std::string &name)
DistributionInterface(const MooseObject *moose_object)
Distribution & getDistribution(const std::string &name)
Get a distribution with a given name.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
All Distributions should inherit from this class.
Definition: Distribution.h:28
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
InputParameters emptyInputParameters()
Distribution & getDistributionByName(const DistributionName &name)
Get a distribution with a given name.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.
const InputParameters & _dni_params
Parameters of the object with this interface.
InputParameters validParams< DistributionInterface >()