www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
WeibullDistribution Class Reference

A deprecated wrapper class used to generate a Weibull distribution. More...

#include <WeibullDistribution.h>

Inheritance diagram for WeibullDistribution:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 WeibullDistribution (const InputParameters &parameters)
 
virtual Real pdf (const Real &x) const override
 
virtual Real cdf (const Real &x) const override
 
virtual Real quantile (const Real &p) const override
 
virtual Real median () const
 
virtual bool enabled () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &name, const std::string *param=nullptr) const
 
PerfGraphperfGraph ()
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static Real pdf (const Real &x, const Real &location, const Real &scale, const Real &shape)
 
static Real cdf (const Real &x, const Real &location, const Real &scale, const Real &shape)
 
static Real quantile (const Real &p, const Real &location, const Real &scale, const Real &shape)
 

Public Attributes

const ConsoleStream _console
 

Protected Member Functions

PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 

Protected Attributes

const Real_a
 The location parameter (a or low) More...
 
const Real_b
 The scale parameter (b or lambda) More...
 
const Real_c
 The shape parameter (c or k) More...
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 

Detailed Description

A deprecated wrapper class used to generate a Weibull distribution.

Definition at line 17 of file WeibullDistribution.h.

Constructor & Destructor Documentation

◆ WeibullDistribution()

WeibullDistribution::WeibullDistribution ( const InputParameters parameters)

Definition at line 20 of file WeibullDistribution.C.

21 {
22 }
Weibull(const InputParameters &parameters)
Definition: Weibull.C:27
const InputParameters & parameters() const

Member Function Documentation

◆ cdf() [1/2]

Real Weibull::cdf ( const Real x) const
overridevirtualinherited

Implements Distribution.

Definition at line 72 of file Weibull.C.

73 {
74  return cdf(x, _a, _b, _c);
75 }
virtual Real cdf(const Real &x) const override
Definition: Weibull.C:72
const Real & _c
The shape parameter (c or k)
Definition: Weibull.h:41
const Real & _a
The location parameter (a or low)
Definition: Weibull.h:35
const std::vector< double > x
const Real & _b
The scale parameter (b or lambda)
Definition: Weibull.h:38

◆ cdf() [2/2]

Real Weibull::cdf ( const Real x,
const Real location,
const Real scale,
const Real shape 
)
staticinherited

Definition at line 48 of file Weibull.C.

49 {
50  if (x <= location)
51  return 0.0;
52  else
53  {
54  const Real y = (x - location) / scale;
55  return 1.0 - std::exp(-std::pow(y, shape));
56  }
57 }
const std::vector< double > y
const std::vector< double > x
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseUnits pow(const MooseUnits &, int)

◆ pdf() [1/2]

Real Weibull::pdf ( const Real x) const
overridevirtualinherited

Implements Distribution.

Definition at line 66 of file Weibull.C.

67 {
68  return pdf(x, _a, _b, _c);
69 }
virtual Real pdf(const Real &x) const override
Definition: Weibull.C:66
const Real & _c
The shape parameter (c or k)
Definition: Weibull.h:41
const Real & _a
The location parameter (a or low)
Definition: Weibull.h:35
const std::vector< double > x
const Real & _b
The scale parameter (b or lambda)
Definition: Weibull.h:38

◆ pdf() [2/2]

Real Weibull::pdf ( const Real x,
const Real location,
const Real scale,
const Real shape 
)
staticinherited

Definition at line 36 of file Weibull.C.

37 {
38  if (x <= location)
39  return 0.0;
40  else
41  {
42  const Real y = (x - location) / scale;
43  return shape / scale * std::pow(y, shape - 1.0) * std::exp(-std::pow(y, shape));
44  }
45 }
void scale(MeshBase &mesh, const Real xs, const Real ys=0., const Real zs=0.)
const std::vector< double > y
const std::vector< double > x
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseUnits pow(const MooseUnits &, int)

◆ quantile() [1/2]

Real Weibull::quantile ( const Real p) const
overridevirtualinherited

Implements Distribution.

Definition at line 78 of file Weibull.C.

79 {
80  return quantile(p, _a, _b, _c);
81 }
const Real & _c
The shape parameter (c or k)
Definition: Weibull.h:41
const Real & _a
The location parameter (a or low)
Definition: Weibull.h:35
const Real & _b
The scale parameter (b or lambda)
Definition: Weibull.h:38
virtual Real quantile(const Real &p) const override
Definition: Weibull.C:78

◆ quantile() [2/2]

Real Weibull::quantile ( const Real p,
const Real location,
const Real scale,
const Real shape 
)
staticinherited

Definition at line 60 of file Weibull.C.

61 {
62  return location + scale * std::pow(-std::log(1 - p), 1.0 / shape);
63 }
void scale(MeshBase &mesh, const Real xs, const Real ys=0., const Real zs=0.)
MooseUnits pow(const MooseUnits &, int)

◆ validParams()

InputParameters WeibullDistribution::validParams ( )
static

Definition at line 15 of file WeibullDistribution.C.

16 {
17  return Weibull::validParams();
18 }
static InputParameters validParams()
Definition: Weibull.C:17

Member Data Documentation

◆ _a

const Real& Weibull::_a
protectedinherited

The location parameter (a or low)

Definition at line 35 of file Weibull.h.

Referenced by Weibull::cdf(), Weibull::pdf(), and Weibull::quantile().

◆ _b

const Real& Weibull::_b
protectedinherited

The scale parameter (b or lambda)

Definition at line 38 of file Weibull.h.

Referenced by Weibull::cdf(), Weibull::pdf(), and Weibull::quantile().

◆ _c

const Real& Weibull::_c
protectedinherited

The shape parameter (c or k)

Definition at line 41 of file Weibull.h.

Referenced by Weibull::cdf(), Weibull::pdf(), and Weibull::quantile().


The documentation for this class was generated from the following files: