www.mooseframework.org
NormalDistribution.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #include "NormalDistribution.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<Distribution>();
15  params.addClassDescription("Boost Normal distribution.");
16  params.addRequiredParam<Real>("mean", "Mean of the distribution.");
17  params.addRequiredParam<Real>("standard_deviation", "Standard deviation of the distribution.");
18  return params;
19 }
20 
21 NormalDistribution::NormalDistribution(const InputParameters & parameters)
22  : BoostDistribution<boost::math::normal_distribution<Real>>(parameters)
23 {
24  _distribution_unique_ptr = libmesh_make_unique<boost::math::normal_distribution<Real>>(
25  getParam<Real>("mean"), getParam<Real>("standard_deviation"));
26 }
InputParameters validParams< NormalDistribution >()
A class used to as a base for distributions defined by Boost.
NormalDistribution(const InputParameters &parameters)
std::unique_ptr< boost::math::normal_distribution< Real > > _distribution_unique_ptr
This must be defined by the child class in the constructor.
BoostDistributionDummy normal_distribution