Diffpack Documentation
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Search
FieldsFEatItgPt Class Reference
derivatives of finite element fields at optimal points.
More...
#include <FieldsFEatItgPt.h>
Inheritance diagram for FieldsFEatItgPt::
List of all members.
Public Methods |
| | FieldsFEatItgPt (const char *fieldname=NULL) |
| void | gradient (const FieldFE &field, NumItgPoints pt_tp=GAUSS_POINTS, int relative_order=-1, Field *k=NULL, real c=1.0, real t=DUMMY, bool store_coor=false) |
| void | derivedQuantitiesAtItgPt (FEM &fesolver, GridFE &grid_, int nfields, NumItgPoints pt_tp=GAUSS_POINTS, int relative_order=-1, bool store_coor=false) |
| void | operator= (const FieldsFEatItgPt &f) |
| GridFE& | grid () |
| const GridFE& | grid () const |
| ArrayGen(NUMT) | values () |
| const ArrayGen(NUMT)& | values () const |
| bool | hasCoor () const |
| ArrayGen(real)& | getCoor () |
| const ArrayGen(real)& | getCoor () const |
| NUMT& | valueItgPt (int element, int itg_pt_no, int field_no) |
| NUMT | valueItgPt (int element, int itg_pt_no, int field_no) const |
| Ptv(real) | getItgPt (int element, int itg_pt_no) const |
| int | getRelativeOrder () const |
| NumItgPoints | getPointType () const |
| int | getNoFields () const |
| int | getNoElms () const |
| int | getNoItgPtsInElm (int e=1) const |
| void | detach () |
Detailed Description
derivatives of finite element fields at optimal points.
NAME: FieldsFEatItgPt - derivatives of finite element fields at optimal points
DESCRIPTION:
The class offers representation of derivatives of finite element fields, computed at optimal (or nodal) locations in each element. The locations are dictated by an "ElmItgRules" object, which means that the points must coincide with those of a supported integration rule. Usually, the class is used to sample derivatives of finite element fields at the reduced Gauss points, which implies "NumItgPoint" equal to "GAUSS_POINTS" and "relative_order" equal to -1. The class is integrated with class "FEM" for computing smooth fields based on the scattered point values in each element.
We strongly recommend that codes which use class "FieldsFEatItgPt" are compiled in nopt mode and tested. Especially if the grid contains different element types, some of the internal data structures contain dummy values, and in nopt mode several functions offer safety checks to ensure that the user does not access illegal sampling (integration) points.
Constructor & Destructor Documentation
|
FieldsFEatItgPt::FieldsFEatItgPt (
|
const char * fieldname = NULL )
|
|
|
|
Initialization is performed by calling "gradient" or "derivedQuantitiesAtItgPt". These routines allocate memory (if necesssary) and compute the values at the sampling points. |
Member Function Documentation
|
void FieldsFEatItgPt::derivedQuantitiesAtItgPt (
|
FEM & fesolver,
|
|
GridFE & grid_,
|
|
int nfields,
|
|
NumItgPoints pt_tp = GAUSS_POINTS,
|
|
int relative_order = -1,
|
|
bool store_coor = false )
|
|
|
|
this routine sets up a loop over all elements and the specified integration points (according to "pt_tp" and "relative_order", see documentation of the "gradient" function) and calls an associated finite element solver, represented in terms of the "fesolver" argument, for computation of a derived quantity. Such derived quantities are, e.g., stresses and strains, which require derivatives of finite element fields combined with physical data, like elasticity parameters etc. The programmer must implement a function
derivedQuantitiesAtItgPt (VecSimple(NUMT)&, const FiniteElement&)
in the simulator (this function plays the same role in the present setting as "integrands" in the assembly process). When the boolean variable "store_coor" is true, the coordinates of the integration points are stored in an internal array for easy access (can be reached via "getCoor" or "getItgPt"). |
|
void FieldsFEatItgPt::detach (
|
)
|
|
|
|
detach all handles in the "FieldFEatItgPt" object. |
|
const ArrayGen(real) & FieldsFEatItgPt::getCoor (
|
) const [inline]
|
|
|
|
See documentation of one of the overloaded functions. |
|
ArrayGen(real) & FieldsFEatItgPt::getCoor (
|
) [inline]
|
|
|
|
provides read and write access to the internal coordinate storage. |
|
Ptv(real) FieldsFEatItgPt::getItgPt (
|
int element,
|
|
int itg_pt_no ) const
|
|
|
|
returns the coordinates of an integration point in an element. |
|
int FieldsFEatItgPt::getNoElms (
|
) const [inline]
|
|
|
|
returns the number of elements in the grid. |
|
int FieldsFEatItgPt::getNoFields (
|
) const [inline]
|
|
|
|
returns the number of fields. |
|
int FieldsFEatItgPt::getNoItgPtsInElm (
|
int e = 1 ) const
|
|
|
|
returns the number of integration points in the element. |
|
NumItgPoints FieldsFEatItgPt::getPointType (
|
) const [inline]
|
|
|
|
returns the type of the integration points as a "NumItgPoints" value. |
|
int FieldsFEatItgPt::getRelativeOrder (
|
) const [inline]
|
|
|
|
returns the relative order used for the integration rule. |
|
void FieldsFEatItgPt::gradient (
|
const FieldFE & field,
|
|
NumItgPoints pt_tp = GAUSS_POINTS,
|
|
int relative_order = -1,
|
|
Field * k = NULL,
|
|
real c = 1.0,
|
|
real t = DUMMY,
|
|
bool store_coor = false )
|
|
|
|
computes the gradient of a finite element field at (reduced) integration points in all elements in a grid. One can specify the integration points by the point type "pt_tp" (usually equal to "GAUSS_POINTS") and the relative order "relative_order" (usually equal to -1). See class "ElmItgRules" for more information about the point type and the relative order. For flux computations, "flux=-c*k*grad(u)", the routine offers the possibility to multiply the gradient by a field "k" at each sampling point and the whole set of values by a scalar "c". This is useful for computing, e.g., heat fluxes (or Darcy velocities), where "k" is the heat conduction coefficient from Fourier's law (or the permeability of a porous medium) and "c" is -1. Usually, "k" is a field in the solver class that can be fed directly into the "gradient" routine (that is why we allow the "c" parameter; "k" has physical significance in other parts of a simulator, and the flux needs the quantity "-k"). When the boolean variable "store_coor" is true, the coordinates of the integration points are stored in an internal array for easy access (can be reached via "getCoor" or "getItgPt"). |
|
const GridFE & FieldsFEatItgPt::grid (
|
) const
|
|
|
|
See documentation of one of the overloaded functions. |
|
GridFE & FieldsFEatItgPt::grid (
|
)
|
|
|
|
provides access to the underlying grid. |
|
bool FieldsFEatItgPt::hasCoor (
|
) const [inline]
|
|
|
|
returns "true" of there an internal refernce to stored coordinates. |
|
void FieldsFEatItgPt::operator= (
|
const FieldsFEatItgPt & f )
|
|
|
|
sets one "FieldFEatItgPt" object equal to another. |
|
NUMT FieldsFEatItgPt::valueItgPt (
|
int element,
|
|
int itg_pt_no,
|
|
int field_no ) const [inline]
|
|
|
|
See documentation of one of the overloaded functions. |
|
NUMT & FieldsFEatItgPt::valueItgPt (
|
int element,
|
|
int itg_pt_no,
|
|
int field_no ) [inline]
|
|
|
|
returns the value of the derivative, or another derived quantity, like stress or strain, at a specified (reduced) integration point in an element. |
|
const ArrayGen(NUMT) & FieldsFEatItgPt::values (
|
) const [inline]
|
|
|
ArrayGen(NUMT) FieldsFEatItgPt::values (
|
) [inline]
|
|
The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.