OOFEM 3.0
Loading...
Searching...
No Matches
oofem::LocalGaussianRandomFunction Class Reference

#include <localgaussianrandomfunction.h>

Inheritance diagram for oofem::LocalGaussianRandomFunction:
Collaboration diagram for oofem::LocalGaussianRandomFunction:

Public Member Functions

 LocalGaussianRandomFunction (int n, Domain *d)
 Constructor.
virtual ~LocalGaussianRandomFunction ()
 Destructor.
void evaluate (FloatArray &answer, const std ::map< std ::string, FunctionArgument > &valDict, GaussPoint *gp=nullptr, double param=0.) override
double evaluateAtTime (double t) override
double evaluateVelocityAtTime (double t) override
double evaluateAccelerationAtTime (double t) override
void initializeFrom (InputRecord &ir) override
const char * giveClassName () const override
const char * giveInputRecordName () const override
Public Member Functions inherited from oofem::Function
 Function (int n, Domain *d)
virtual ~Function ()
 Destructor.
virtual double evaluate (TimeStep *tStep, ValueModeType mode)
virtual double evaluate (const std ::map< std ::string, FunctionArgument > &valDict)
double giveFunctionParameter (int paramID)
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
DomaingiveDomain () const
virtual void setDomain (Domain *d)
int giveNumber () const
void setNumber (int num)
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
virtual void initializeFrom (InputRecord &ir, int priority)
virtual void initializeFinish ()
virtual void postInitialize ()
 Performs post initialization steps. Called after all components are created and initialized.
virtual void giveInputRecord (DynamicInputRecord &input)
virtual int checkConsistency ()
virtual void printOutputAt (FILE *file, TimeStep *tStep)
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging.
virtual InterfacegiveInterface (InterfaceType t)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Protected Member Functions

double ran1 (long *idum)
double normalCdfInverse (double cdf, double a, double b)
double normal01CdfInverse (double p)
double dpolyValue (int n, double a[], double x)

Protected Attributes

long randomInteger
 Integer which is the input of the pseudo-random number generator.
double mean
 Gauss distribution parameters.
double variance
Protected Attributes inherited from oofem::FEMComponent
int number
 Component number.
Domaindomain
 Link to domain object, useful for communicating with other FEM components.

Additional Inherited Members

Public Attributes inherited from oofem::Function
DomainfuncDomain
int parameterType

Detailed Description

This class implements a local (no spatial correlation) random function using Gaussian distribution.

Author
Peter Grassl

Definition at line 53 of file localgaussianrandomfunction.h.

Constructor & Destructor Documentation

◆ LocalGaussianRandomFunction()

oofem::LocalGaussianRandomFunction::LocalGaussianRandomFunction ( int n,
Domain * d )

Constructor.

Definition at line 44 of file localgaussianrandomfunction.C.

References oofem::Function::Function().

◆ ~LocalGaussianRandomFunction()

oofem::LocalGaussianRandomFunction::~LocalGaussianRandomFunction ( )
virtual

Destructor.

Definition at line 47 of file localgaussianrandomfunction.C.

Member Function Documentation

◆ dpolyValue()

double oofem::LocalGaussianRandomFunction::dpolyValue ( int n,
double a[],
double x )
protected

Definition at line 245 of file localgaussianrandomfunction.C.

Referenced by normal01CdfInverse().

◆ evaluate()

void oofem::LocalGaussianRandomFunction::evaluate ( FloatArray & answer,
const std ::map< std ::string, FunctionArgument > & valDict,
GaussPoint * gp = nullptr,
double param = 0. )
overridevirtual

Returns the value of the function for given input.

Parameters
valDictMap with inputs.
answerFunction value.

Reimplemented from oofem::Function.

Definition at line 51 of file localgaussianrandomfunction.C.

References evaluateAtTime(), and oofem::Vec1().

◆ evaluateAccelerationAtTime()

double oofem::LocalGaussianRandomFunction::evaluateAccelerationAtTime ( double t)
overridevirtual

Returns the second time derivative of the function at given time.

Parameters
tTime.
Returns
\( f''(t) \).

Implements oofem::Function.

Definition at line 69 of file localgaussianrandomfunction.C.

References OOFEM_ERROR.

◆ evaluateAtTime()

double oofem::LocalGaussianRandomFunction::evaluateAtTime ( double t)
overridevirtual

Returns the value of the function at given time.

Parameters
tTime.
Returns
\( f(t) \).

Reimplemented from oofem::Function.

Definition at line 57 of file localgaussianrandomfunction.C.

References mean, normalCdfInverse(), ran1(), randomInteger, and variance.

Referenced by evaluate().

◆ evaluateVelocityAtTime()

double oofem::LocalGaussianRandomFunction::evaluateVelocityAtTime ( double t)
overridevirtual

Returns the first time derivative of the function at given time.

Parameters
tTime.
Returns
\( f'(t) \).

Implements oofem::Function.

Definition at line 63 of file localgaussianrandomfunction.C.

References OOFEM_ERROR.

◆ giveClassName()

const char * oofem::LocalGaussianRandomFunction::giveClassName ( ) const
inlineoverridevirtual
Returns
Class name of the receiver.

Implements oofem::FEMComponent.

Definition at line 73 of file localgaussianrandomfunction.h.

◆ giveInputRecordName()

const char * oofem::LocalGaussianRandomFunction::giveInputRecordName ( ) const
inlineoverridevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 74 of file localgaussianrandomfunction.h.

References _IFT_LocalGaussianRandomFunction_Name.

◆ initializeFrom()

void oofem::LocalGaussianRandomFunction::initializeFrom ( InputRecord & ir)
overridevirtual

Initializes receiver according to object description stored in input record. This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record. Note that initializeFrom may be called mutiple times.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
priorityPriority of the input record. This is used to determine the order of initialization

Reimplemented from oofem::FEMComponent.

Definition at line 75 of file localgaussianrandomfunction.C.

References _IFT_LocalGaussianRandomFunction_mean, _IFT_LocalGaussianRandomFunction_seed, _IFT_LocalGaussianRandomFunction_variance, IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, mean, randomInteger, and variance.

◆ normal01CdfInverse()

double oofem::LocalGaussianRandomFunction::normal01CdfInverse ( double p)
protected

Computes the inverse of the normal distribution.

Parameters
pInput probability.
Returns
Inverse.

Definition at line 155 of file localgaussianrandomfunction.C.

References dpolyValue(), and OOFEM_ERROR.

Referenced by normalCdfInverse().

◆ normalCdfInverse()

double oofem::LocalGaussianRandomFunction::normalCdfInverse ( double cdf,
double a,
double b )
protected

Computes the inverse of the Gaussian CDF

Parameters
cdfInput probability.
aMean.
bStandard deviation.
Returns
Inverse.

Definition at line 142 of file localgaussianrandomfunction.C.

References normal01CdfInverse(), and OOFEM_ERROR.

Referenced by evaluateAtTime().

◆ ran1()

double oofem::LocalGaussianRandomFunction::ran1 ( long * idum)
protected

Computes pseudo-random numbers.

Parameters
idumPointer to start integer (must be negative).
Returns
Random number between 0 and 1.

Definition at line 97 of file localgaussianrandomfunction.C.

References AM, IA, IM, IQ, IR, NDIV, NTAB, and RNMX.

Referenced by evaluateAtTime().

Member Data Documentation

◆ mean

double oofem::LocalGaussianRandomFunction::mean
protected

Gauss distribution parameters.

Definition at line 59 of file localgaussianrandomfunction.h.

Referenced by evaluateAtTime(), and initializeFrom().

◆ randomInteger

long oofem::LocalGaussianRandomFunction::randomInteger
protected

Integer which is the input of the pseudo-random number generator.

Definition at line 57 of file localgaussianrandomfunction.h.

Referenced by evaluateAtTime(), and initializeFrom().

◆ variance

double oofem::LocalGaussianRandomFunction::variance
protected

Definition at line 59 of file localgaussianrandomfunction.h.

Referenced by evaluateAtTime(), and initializeFrom().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011