#include <FieldConst.h>
Inheritance diagram for FieldConst::

Public Methods | |
| FieldConst (const char *name=NULL) | |
| FieldConst (NUMT value, const char *name=NULL) | |
| ~FieldConst () | |
| virtual bool | ok () const |
| virtual void | minmax (NUMT &min, NUMT &max, GridWithPts *grid=NULL) const |
| NUMT& | value () |
| NUMT | value () const |
| virtual NUMT | valuePt (const Ptv(real) &x, real t=DUMMY) |
| virtual NUMT | valueFEM (const FiniteElement &fe, real t=DUMMY) |
| virtual NUMT | valueNode (int node, real t=DUMMY) const |
| virtual NUMT | divergencePt (const Ptv(real) &x, real t=DUMMY) |
| virtual NUMT | divergenceFEM (const FiniteElement &fe, real t=DUMMY) |
| virtual NUMT | divergenceNode (int node, real t=DUMMY) |
| virtual Ptv(NUMT) | derivativePt (const Ptv(real) &x, real t) |
| virtual void | derivativeFEM (Ptv(NUMT) &d, const FiniteElement &fe, real t=DUMMY) |
| virtual void | derivativeNode (Ptv(NUMT) &, int node, real t=DUMMY) |
| virtual void | hessianPt (Ptv(NUMT) &, const Ptv(real) &x, real=DUMMY) |
| virtual void | hessianFEM (Ptv(NUMT) &, const FiniteElement &fe, real=DUMMY) |
| virtual void | hessianNode (Ptv(NUMT) &, int node, real=DUMMY) |
| virtual void | fill (NUMT value) |
| virtual void | add (NUMT value) |
| virtual void | mult (NUMT value) |
| virtual void | apply (Func(NUMT) f) |
| virtual void | add (Field &field, int power, NUMT front_factor) |
| virtual void | print (Os os) const |
| virtual Field& | scale () |
| virtual Field& | unscale () |
NAME: FieldConst - constant scalar field
DESCRIPTION:
The class implements a scalar field that is simply a constant. It may seem as an overkill to have a special field class with lots of virtual functions to represent a constant value. However, the purpose is to offer a complete scalar field hierarchy such that the programmer can work with a general "Field" without knowing whether the field is actually a complicated finite element, an explicit function or a constant. The "FieldConst" ensures that constant fields has the same interface as all other fields. At the same time, the "FieldConst" gives (nearly) optimal efficiency when the field is constant.
With the class "Field" documentation, the functions and the data should be self-explanatory.
|
|
|
|
|
|
|
|
|
|
|
See documentation of one of the overloaded functions. Reimplemented from Field. |
|
|
adds a constant field to the field. An overloaded version takes a "Field" "f", an integer power "i" and a factor "c" as arguments. The formula "c*f^i" is added to the object field. Reimplemented from Field. |
|
|
applies a function, like "sin(x)", to the field. Reimplemented from Field. |
|
|
Reimplemented from Field. |
|
|
Reimplemented from Field. |
|
|
evaluates the derivative of the field at a point in space and time. Reimplemented from Field. |
|
|
Reimplemented from Field. |
|
|
Reimplemented from Field. |
|
|
evaluates the divergence of the field "f" at a point in space and time, i.e. "df/dx + df/dy + df/dz" Reimplemented from Field. |
|
|
fills the field with a numerical value (that is, the field becomes constant). Reimplemented from Field. |
|
|
Reimplemented from Field. |
|
|
Reimplemented from Field. |
|
|
evaluates the hessian (2nd derivatives) of the field at a point in space and time, i.e. f,xx for nsd=1, {f,xx f,yy f,xy} for nsd=2 and {f,xx f,yy f,zz f,xy f,xz f,yz} for nsd=3. Reimplemented from Field. |
|
|
finds the minimum and maximum values of the field. Most of the subclass fields have an internal grid and will find the extreme values over this grid. The "minmax" function has an optional argument "grid" that can be supplied. This grid is not used if the field has an internal grid. However, some fields, like "FieldFunc", do not have internal grids and in that case the "grid" argument is required in order to compute the extreme values. Reimplemented from Field. |
|
|
multiplies the field values by a number. Reimplemented from Field. |
|
|
returns true if the object is initialized, for the base class "Field" it just writes an error messages such that if a derived class fails to define an "ok" function, an error message will be written. Reimplemented from Field. |
|
|
prints the field. Most subclass implementations involve printing the field values and the grid. Reimplemented from Field. |
|
|
scale the field values and the space(-time) domain. That is, the original values of the field are overwritten by the new, scaled values. To retrieve the original values, call "unscale". Both "scale" and "unscale" tests a variable first to determine if the field is already scaled or unscaled (calling e.g. "scale" twice then results in no action of the second call). Reimplemented from Field. |
|
|
the inverse action of "scale". Reimplemented from Field. |
|
|
|
|
|
|
|
|
evaluates the field at a point in space and time, but the argument is a "FiniteElement" object which means that the evaluation process in a finite element context will be very efficient (since "FiniteElement" knows the element number and the local coordinates of the spatial point). The function is virtual and offers a unified interface to the evaluation of all types of fields in a finite element based simulator. Reimplemented from Field. |
|
|
evaluates the field at a nodal point in space and time. Reimplemented from Field. |
|
|
evaluates the field at a point in space and time. The time argument can be omitted, the default value is then "DUMMY". Generally, we suggest to use "DUMMY" to check if fields are stationary. Reimplemented from Field. |