KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Kratos::RandomVariable Class Reference

#include <random_variable.h>

Inheritance diagram for Kratos::RandomVariable:
Collaboration diagram for Kratos::RandomVariable:

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (RandomVariable)
 
 RandomVariable ()
 Default constructor. More...
 
 RandomVariable (const Parameters rParameters)
 
virtual ~RandomVariable ()
 Destructor. More...
 
virtual double Sample ()
 
virtual double GetMean ()
 
const array_1d< double, 2 > & GetSupport ()
 
virtual std::string Info () const
 Turn back information as a stemplate<class T, std::size_t dim> tring. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 

Protected Member Functions

virtual void Check ()
 
template<typename T >
void CalculateFirstAndLastIndicesWithNonzeroValue (std::vector< T > values, size_t &low_index, size_t &high_index)
 
void SetSupport (const double Min, const double Max)
 

Protected Attributes

double mMean = 0.0
 
bool mMeanHasAlreadyBeenCalculated =false
 

Constructor & Destructor Documentation

◆ RandomVariable() [1/2]

Kratos::RandomVariable::RandomVariable ( )

Default constructor.

◆ RandomVariable() [2/2]

Kratos::RandomVariable::RandomVariable ( const Parameters  rParameters)

◆ ~RandomVariable()

virtual Kratos::RandomVariable::~RandomVariable ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ CalculateFirstAndLastIndicesWithNonzeroValue()

template<typename T >
void Kratos::RandomVariable::CalculateFirstAndLastIndicesWithNonzeroValue ( std::vector< T >  values,
size_t &  low_index,
size_t &  high_index 
)
inlineprotected

◆ Check()

virtual void Kratos::RandomVariable::Check ( )
inlineprotectedvirtual

◆ GetMean()

virtual double Kratos::RandomVariable::GetMean ( )
inlinevirtual

◆ GetSupport()

const array_1d< double, 2 > & Kratos::RandomVariable::GetSupport ( )

◆ Info()

std::string Kratos::RandomVariable::Info ( ) const
virtual

Turn back information as a stemplate<class T, std::size_t dim> tring.

Reimplemented in Kratos::PiecewiseLinearRandomVariable, and Kratos::DiscreteRandomVariable.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::RandomVariable::KRATOS_CLASS_POINTER_DEFINITION ( RandomVariable  )

◆ PrintData()

void Kratos::RandomVariable::PrintData ( std::ostream &  rOStream) const
virtual

Print object's data.

Reimplemented in Kratos::PiecewiseLinearRandomVariable, and Kratos::DiscreteRandomVariable.

◆ PrintInfo()

void Kratos::RandomVariable::PrintInfo ( std::ostream &  rOStream) const
virtual

Print information about this object.

Reimplemented in Kratos::PiecewiseLinearRandomVariable, and Kratos::DiscreteRandomVariable.

◆ Sample()

virtual double Kratos::RandomVariable::Sample ( )
inlinevirtual

◆ SetSupport()

void Kratos::RandomVariable::SetSupport ( const double  Min,
const double  Max 
)
protected

Member Data Documentation

◆ mMean

double Kratos::RandomVariable::mMean = 0.0
protected

◆ mMeanHasAlreadyBeenCalculated

bool Kratos::RandomVariable::mMeanHasAlreadyBeenCalculated =false
protected

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