www.mooseframework.org
Distribution.C
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 #include "Distribution.h"
11 #include "MooseRandom.h"
12 
13 template <>
16 {
18  params.addRequiredParam<std::string>("type", "class/type name identifying the distribution");
19  params.registerBase("Distribution");
20  return params;
21 }
22 
23 Distribution::Distribution(const InputParameters & parameters) : MooseObject(parameters) {}
24 
25 Real
27 {
28  mooseError("The distribution '", name(), "' must override the median method.");
29  return 0;
30 }
InputParameters validParams< Distribution >()
Definition: Distribution.C:15
virtual Real median() const
Compute the median of the distribution.
Definition: Distribution.C:26
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void mooseError(Args &&... args) const
Definition: MooseObject.h:147
Distribution(const InputParameters &parameters)
Definition: Distribution.C:23
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System...
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:42
InputParameters validParams< MooseObject >()
Definition: MooseObject.C:25
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:59