OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
This class implements a local (no spatial correlation) random function using Gaussian distribution. More...
#include <localgaussianrandomfunction.h>
Public Member Functions | |
LocalGaussianRandomFunction (int n, Domain *d) | |
Constructor. More... | |
virtual | ~LocalGaussianRandomFunction () |
Destructor. More... | |
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. More... | |
virtual double | evaluateAtTime (double t) |
Returns the value of the function at given time. More... | |
virtual double | evaluateVelocityAtTime (double t) |
Returns the first time derivative of the function at given time. More... | |
virtual double | evaluateAccelerationAtTime (double t) |
Returns the second time derivative of the function at given time. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual const char * | giveClassName () const |
virtual const char * | giveInputRecordName () const |
Public Member Functions inherited from oofem::Function | |
Function (int n, Domain *d) | |
Constructor. More... | |
virtual | ~Function () |
Destructor. More... | |
double | evaluate (TimeStep *tStep, ValueModeType mode) |
Returns the value of load time function at given time. More... | |
virtual double | evaluate (const std::map< std::string, FunctionArgument > &valDict) |
Returns the (scalar) value of the function for given input. More... | |
double | giveFunctionParameter (int paramID) |
Public Member Functions inherited from oofem::FEMComponent | |
FEMComponent (int n, Domain *d) | |
Regular constructor, creates component with given number and belonging to given domain. More... | |
virtual | ~FEMComponent () |
Virtual destructor. More... | |
Domain * | giveDomain () const |
virtual void | setDomain (Domain *d) |
Sets associated Domain. More... | |
int | giveNumber () const |
void | setNumber (int num) |
Sets number of receiver. More... | |
virtual void | updateLocalNumbering (EntityRenumberingFunctor &f) |
Local renumbering support. More... | |
virtual void | giveInputRecord (DynamicInputRecord &input) |
Setups the input record string of receiver. More... | |
virtual contextIOResultType | saveContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Stores receiver state to output stream. More... | |
virtual contextIOResultType | restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Restores the receiver state previously written in stream. More... | |
virtual int | checkConsistency () |
Allows programmer to test some internal data, before computation begins. More... | |
virtual void | printOutputAt (FILE *file, TimeStep *tStep) |
Prints output of receiver to stream, for given time step. More... | |
virtual void | printYourself () |
Prints receiver state on stdout. Useful for debugging. More... | |
virtual Interface * | giveInterface (InterfaceType t) |
Interface requesting service. More... | |
std::string | errorInfo (const char *func) const |
Returns string for prepending output (used by error reporting macros). More... | |
Protected Member Functions | |
double | ran1 (long *idum) |
Computes pseudo-random numbers. More... | |
double | normalCdfInverse (double cdf, double a, double b) |
Computes the inverse of the Gaussian CDF. More... | |
double | normal01CdfInverse (double p) |
Computes the inverse of the normal distribution. More... | |
double | dpolyValue (int n, double a[], double x) |
Protected Attributes | |
long | randomInteger |
Integer which is the input of the pseudo-random number generator. More... | |
double | mean |
Gauss distribution parameters. More... | |
double | variance |
Protected Attributes inherited from oofem::FEMComponent | |
int | number |
Component number. More... | |
Domain * | domain |
Link to domain object, useful for communicating with other FEM components. More... | |
Additional Inherited Members | |
Public Attributes inherited from oofem::Function | |
Domain * | funcDomain |
int | parameterType |
This class implements a local (no spatial correlation) random function using Gaussian distribution.
Definition at line 53 of file localgaussianrandomfunction.h.
oofem::LocalGaussianRandomFunction::LocalGaussianRandomFunction | ( | int | n, |
Domain * | d | ||
) |
Constructor.
Definition at line 44 of file localgaussianrandomfunction.C.
|
virtual |
Destructor.
Definition at line 47 of file localgaussianrandomfunction.C.
|
protected |
Definition at line 252 of file localgaussianrandomfunction.C.
Referenced by normal01CdfInverse().
|
virtual |
Returns the value of the function for given input.
valDict | Map with inputs. |
answer | Function value. |
Reimplemented from oofem::Function.
Definition at line 51 of file localgaussianrandomfunction.C.
References evaluateAtTime().
|
virtual |
Returns the second time derivative of the function at given time.
t | Time. |
Implements oofem::Function.
Definition at line 70 of file localgaussianrandomfunction.C.
References OOFEM_ERROR.
|
virtual |
Returns the value of the function at given time.
t | Time. |
Reimplemented from oofem::Function.
Definition at line 57 of file localgaussianrandomfunction.C.
References mean, normalCdfInverse(), ran1(), randomInteger, and variance.
Referenced by evaluate().
|
virtual |
Returns the first time derivative of the function at given time.
t | Time. |
Implements oofem::Function.
Definition at line 63 of file localgaussianrandomfunction.C.
References OOFEM_ERROR.
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 73 of file localgaussianrandomfunction.h.
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 74 of file localgaussianrandomfunction.h.
References _IFT_LocalGaussianRandomFunction_Name.
|
virtual |
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.
ir | Input record to initialize from. |
Reimplemented from oofem::FEMComponent.
Definition at line 77 of file localgaussianrandomfunction.C.
References _IFT_LocalGaussianRandomFunction_mean, _IFT_LocalGaussianRandomFunction_seed, _IFT_LocalGaussianRandomFunction_variance, IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, mean, randomInteger, and variance.
|
protected |
Computes the inverse of the normal distribution.
p | Input probability. |
Definition at line 161 of file localgaussianrandomfunction.C.
References dpolyValue(), and OOFEM_ERROR.
Referenced by normalCdfInverse().
|
protected |
Computes the inverse of the Gaussian CDF.
cdf | Input probability. |
a | Mean. |
b | Standard deviation. |
Definition at line 148 of file localgaussianrandomfunction.C.
References normal01CdfInverse(), and OOFEM_ERROR.
Referenced by evaluateAtTime().
|
protected |
|
protected |
Gauss distribution parameters.
Definition at line 59 of file localgaussianrandomfunction.h.
Referenced by evaluateAtTime(), and initializeFrom().
|
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().
|
protected |
Definition at line 59 of file localgaussianrandomfunction.h.
Referenced by evaluateAtTime(), and initializeFrom().