www.mooseframework.org
LognormalDistribution.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 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<Distribution>();
15  params.addClassDescription("Boost Lognormal distribution.");
16  params.addRequiredParam<Real>("location", "The Lognormal location parameter.");
17  params.addRequiredParam<Real>("scale", "The Lognormal scale parameter.");
18  return params;
19 }
20 
21 LognormalDistribution::LognormalDistribution(const InputParameters & parameters)
22  : BoostDistribution<boost::math::lognormal_distribution<Real>>(parameters)
23 {
24  _distribution_unique_ptr = libmesh_make_unique<boost::math::lognormal_distribution<Real>>(
25  getParam<Real>("location"), getParam<Real>("scale"));
26 }
BoostDistributionDummy lognormal_distribution
InputParameters validParams< LognormalDistribution >()
A class used to as a base for distributions defined by Boost.
LognormalDistribution(const InputParameters &parameters)
std::unique_ptr< boost::math::lognormal_distribution< Real > > _distribution_unique_ptr
This must be defined by the child class in the constructor.