field(3)

NAME

field - piecewise polynomial finite element field

DESCRIPTION

Store degrees of freedom associated to a mesh and a piecewise polynomial approximation, with respect to the numbering defined by the underlying space(3).

This class contains two vectors, namely unknown and blocked degrees of freedoms, and the associated finite element space. Blocked and unknown degrees of freedom can be set by using domain name indexation:
geo omega_h ("circle");
space Vh (omega_h, "P1");
Vh.block ("boundary");
field uh (Vh);
uh ["boundary"] = 0;
Interpolation of a function u in a field uh with respect to the interpolation writes:

Float u (const point&);
uh = interpolate (Vh, u);

EXAMPLE

Here is a complete example using the field class:
Float u (const point& x) { return x[0]*x[1]; }
main() {
geo omega_h ("square");
space Vh (omega_h, "P1");
field uh (Vh);
uh = interpolate (Vh, u);
cout << plotmtv << u;
}

FEATURES

Algebra, such as x+y, x*y, x/y, lambda*x, ...are supported

Transformations applies to all values of a field:
field vh = compose(fabs, uh);
field wh = compose(atan2, uh, vh);
The composition supports also general unary and binary class-functions.
Vector-valued and tensor-valued field support is yet partial only. This feature will be more documented in the future.

SEE ALSO

space(3)
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout