6 #ifndef RANDOM_VARIABLE_H
7 #define RANDOM_VARIABLE_H
32 virtual double Sample(){
KRATOS_ERROR <<
"You are calling the 'Sample' function of the abstract class 'RandomVariable'. Please instantiate a specific derived class instead.";
return 0.0;};
34 virtual double GetMean(){
KRATOS_ERROR <<
"You are calling 'GetMean' function of the abstract class 'RandomVariable'. Please instantiate a specific derived class instead.";
return 0.0;};
39 virtual std::string
Info()
const;
42 virtual void PrintInfo(std::ostream& rOStream)
const;
45 virtual void PrintData(std::ostream& rOStream)
const;
51 bool mMeanHasAlreadyBeenCalculated=
false;
57 auto it = std::find_if(
values.begin(),
values.end(), [](
const double x) { return x != 0; });
58 auto reverse_it = std::find_if(
values.rbegin(),
values.rend(), [](
const double x) { return x != 0; });
59 low_index = std::distance(
values.begin(), it);
60 high_index = std::distance(begin(
values), reverse_it.base()) - 1;
63 void SetSupport(
const double Min,
const double Max);
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
Definition: random_variable.h:19
KRATOS_CLASS_POINTER_DEFINITION(RandomVariable)
virtual double Sample()
Definition: random_variable.h:32
void CalculateFirstAndLastIndicesWithNonzeroValue(std::vector< T > values, size_t &low_index, size_t &high_index)
Definition: random_variable.h:54
virtual void Check()
Definition: random_variable.h:49
virtual ~RandomVariable()
Destructor.
Definition: random_variable.h:30
virtual double GetMean()
Definition: random_variable.h:34
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
list values
Definition: bombardelli_test.py:42
x
Definition: sensitivityMatrix.py:49