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