65 OOFEM_ERROR(
"Can't generate velocity of random number");
72 OOFEM_ERROR(
"Can't generate acceleration of random number");
95 #define AM ( 1.0 / IM ) 99 #define NDIV ( 1 + ( IM - 1 ) / NTAB ) 101 #define RNMX ( 1.0 - EPS ) 107 static long iv [
NTAB ];
110 if ( * idum <= 0 || !iy ) {
111 if ( -( * idum ) < 1 ) {
114 * idum = -( * idum );
117 for (
int j =
NTAB + 7; j >= 0; j-- ) {
119 * idum =
IA * ( * idum - k *
IQ ) -
IR * k;
133 * idum =
IA * ( * idum - k *
IQ ) -
IR * k;
141 if ( ( temp =
AM * iy ) >
RNMX ) {
152 if ( cdf < 0.0 || 1.0 < cdf ) {
153 OOFEM_ERROR(
"NORMAL_CDF_INV - Fatal error!\nCDF < 0 or 1 < CDF.");
164 3.3871328727963666080, 1.3314166789178437745e+2,
165 1.9715909503065514427e+3, 1.3731693765509461125e+4,
166 4.5921953931549871457e+4, 6.7265770927008700853e+4,
167 3.3430575583588128105e+4, 2.5090809287301226727e+3
170 1.0, 4.2313330701600911252e+1,
171 6.8718700749205790830e+2, 5.3941960214247511077e+3,
172 2.1213794301586595867e+4, 3.9307895800092710610e+4,
173 2.8729085735721942674e+4, 5.2264952788528545610e+3
176 1.42343711074968357734, 4.63033784615654529590,
177 5.76949722146069140550, 3.64784832476320460504,
178 1.27045825245236838258, 2.41780725177450611770e-1,
179 2.27238449892691845833e-2, 7.74545014278341407640e-4
181 double const1 = 0.180625;
184 1.0, 2.05319162663775882187,
185 1.67638483018380384940, 6.89767334985100004550e-1,
186 1.48103976427480074590e-1, 1.51986665636164571966e-2,
187 5.47593808499534494600e-4, 1.05075007164441684324e-9
190 6.65790464350110377720, 5.46378491116411436990,
191 1.78482653991729133580, 2.96560571828504891230e-1,
192 2.65321895265761230930e-2, 1.24266094738807843860e-3,
193 2.71155556874348757815e-5, 2.01033439929228813265e-7
196 1.0, 5.99832206555887937690e-1,
197 1.36929880922735805310e-1, 1.48753612908506148525e-2,
198 7.86869131145613259100e-4, 1.84631831751005468180e-5,
199 1.42151175831644588870e-7, 2.04426310338993978564e-15
203 double split1 = 0.425;
219 if ( fabs(q) <= split1 ) {
257 for ( i = n - 1; 0 <= i; i-- ) {
258 value = value * x + a [ i ];
virtual void evaluate(FloatArray &answer, const std::map< std::string, FunctionArgument > &valDict, GaussPoint *gp=NULL, double param=0.)
Returns the value of the function for given input.
double normal01CdfInverse(double p)
Computes the inverse of the normal distribution.
LocalGaussianRandomFunction(int n, Domain *d)
Constructor.
virtual double evaluateAtTime(double t)
Returns the value of the function at given time.
REGISTER_Function(CalculatorFunction)
virtual double evaluateVelocityAtTime(double t)
Returns the first time derivative of the function at given time.
double mean
Gauss distribution parameters.
virtual double evaluateAccelerationAtTime(double t)
Returns the second time derivative of the function at given time.
#define _IFT_LocalGaussianRandomFunction_variance
long randomInteger
Integer which is the input of the pseudo-random number generator.
Class representing vector of real numbers.
#define _IFT_LocalGaussianRandomFunction_mean
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Abstract base class representing a function with vector input and output.
IRResultType
Type defining the return values of InputRecord reading operations.
double normalCdfInverse(double cdf, double a, double b)
Computes the inverse of the Gaussian CDF.
virtual ~LocalGaussianRandomFunction()
Destructor.
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define _IFT_LocalGaussianRandomFunction_seed
double ran1(long *idum)
Computes pseudo-random numbers.
Class representing integration point in finite element program.
double dpolyValue(int n, double a[], double x)