Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

GridFEInfo Class Reference

additional grid data structures for neighbor info etc. More...

#include <GridFEInfo.h>

List of all members.

Public Methods

 GridFEInfo ()
void forceInit ()
void initNeighbor (GridFE &grid)
void initNeighbor (GridFE &grid, bool init_n2e, bool init_n2n, bool init_e2e, bool special_e2e=false)
void initBoundaries (GridFE &grid)
void initBoundaries (GridFE &grid, const Ptv(int) &IJK)
bool onlyFirstOrderElements (GridFE &grid)
real getMaxSpacing (GridFE &grid)
real characteristicElmSize (GridFE &grid, bool dimless=true)
bool isBoundaryElm (int element, const GridFE &grid) const
void initSideIndicators (const GridFE &grid)
void provideCoverAndConnection (GridFE &grid, GridLattice *cover_grid=NULL)

Static Public Methods

void minmaxGridSpacing (GridFE &grid, Ptv(real) &hmin, Ptv(real) &hmax, FieldFunc *formula=NULL)
void maxSurroundingBox (GridFE &grid, Ptv(real) &length)
void computeBoxesAndCentroids (GridFE &grid, MatSimple(real) &bounding_box, MatSimple(real) &centroids)

Public Attributes

NeighborFE neighbor
Handle(BoundaryMeshboundaries
Handle(GridLatticecover
ArrayGenSimple(SetDistinct(int)) connection
ArrayGenSimple(VecSimple(int)) eff_connection


Detailed Description

additional grid data structures for neighbor info etc.

NAME: GridFEInfo - additional grid data structures for neighbor info etc

DESCRIPTION:

Class "GridFEInfo" is an extension of the "GridFE" class, in the sense that "GridFEInfo" contains additional useful grid information of a type that is not qualified as essential in "GridFE". All "GridFE" objects have an instance of "GridFEInfo". By default, this instance is empty. If additional information is needed, the user of the "GridFE" object asks the "GridFEInfo" object to generate the desired information. Only explicit calls to functions in "GridFEInfo" will allocate the extra data. Some of the data structures in class "GridFEInfo" require significant amounts of memory.

It is recommended that you use the "GridFEInfo" attribute of "GridFE" (the "additional_info" data member) instead of having a separate "GridFEInfo" object.


Constructor & Destructor Documentation

GridFEInfo::GridFEInfo ( )
 

The various smaller data structures are created if that is necessary when the member functions are called. Some member functions have the name "init*". These just allocate and initialize internal data structures. One can always call the relevant init function prior to any use of the internal (e.g. "NeighborFE") objects to ensure that the data structures are initialized. Repeated calls to "init*" functions will only lead to computations the first time the routine is invoked, unless you have called "forceInit" - that function forces the next init call to perform a full initialization of the data structures.


Member Function Documentation

real GridFEInfo::characteristicElmSize ( GridFE & grid,
bool dimless = true )
 

returns a measure of the spatial discretization parameter. If "dimless" is true, one employs the formula "1/(n^(1/d)-1)", which reflects the number of unknowns "n", but reduces to the distance between nodes in a uniformly partitioned unit cube with equal partition in the "d" space dimensions. This measure is related to the element length divided by a characteristic length of the domain (hence the name "dimless"). If "dimless" is false, the value of "minmaxGridSpacing" is returned. This is a true element size. For adaptive grids we recommend to use "dimless=true" as this reflects the number of unknowns, which is the key parameter when studiying adaptive methods.

static void GridFEInfo::computeBoxesAndCentroids ( GridFE & grid,
MatSimple(real) & bounding_box,
MatSimple(real) & centroids ) [static]
 

computes bounding boxes and centroids for all the elements in the grid. The result is put in matrices. The first two columns in the bounding box matrix is the min and max value of the nodes in the first space dimension. Then follows the second (and third) space dimension(s) in columns 3 and 4, (5 and 6), respectively. The centroid of an element is computed as the mean of the the nodes making up the element. See "minmaxGridSpacing" about the use of bounding boxes.

void GridFEInfo::forceInit ( )
 

forces all data structures to be re-initialized. That is, the next time an init function is called, the initialization is really performed (the init functions will by default not compute data structures if this has already been done). Used by adaptive grid classes to update the "neighbor" information when the grid topology has changed. Note that re-computing of the data structures are only performed for the structures that are really used.

real GridFEInfo::getMaxSpacing ( GridFE & grid )
 

finds the maximum length in any direction in any bounding box of any element. In a sense, "getMaxSpacing" reflects the largest grid spacing (among all coordinate directions and all elements). The function is based on a call to "maxSurroundingBox". Repeated calls to "getMaxSpacing" will only lead to computation the first time this routine is invoked.

void GridFEInfo::initBoundaries ( GridFE & grid,
const Ptv(int) & IJK )
 

void GridFEInfo::initBoundaries ( GridFE & grid )
 

void GridFEInfo::initNeighbor ( GridFE & grid,
bool init_n2e,
bool init_n2n,
bool init_e2e,
bool special_e2e = false )
 

See documentation of one of the overloaded functions.

void GridFEInfo::initNeighbor ( GridFE & grid )
 

computes the neighbor information. Repeated calls will only lead to computation the first time this routine is invoked. See "NeighborFE" for documentation on the computed data and the arguments of the overloaded function.

void GridFEInfo::initSideIndicators ( const GridFE & grid )
 

initializes the internal data structure for efficient look up of boundary indicators on the sides in elements. When "initSideIndicators" has been called, calls to "GridFE boSide" will automatically invoke array structures in "additional_info" ("GridFE"''s "GridFEInfo" object). If "initSideIndicators" has not been called, "GridFE boSide" must apply a more expensive algorithm that involves checking that each node on the side is subject to the given indicator.

bool GridFEInfo::isBoundaryElm ( int element,
const GridFE & grid ) const
 

efficient look up for determining whether an element is on the boundary or not.

static void GridFEInfo::maxSurroundingBox ( GridFE & grid,
Ptv(real) & length ) [static]
 

finds the maximum lengths in each space direction of all element bounding boxes. The maximum lengths in different directions do not correspond to the same element. In other words, "length(1)" refers to the maximum length of the element bounding box in x(1) direction, where maximum is taken over all elements in the mesh.

static void GridFEInfo::minmaxGridSpacing ( GridFE & grid,
Ptv(real) & hmin,
Ptv(real) & hmax,
FieldFunc * formula = NULL ) [static]
 

finds the minimum and maximum element size. The programmer can give an optional argument: A "FieldFunc" pointer containing some formula that each element size should be multiplied by. This is convenient when calculating stability criteria for time dependent PDEs. The optional argument can be omitted and only the grid size will then be returned. The algorithm goes through every element, calls the "boundingBox" function for finding characteristic element sizes in each of the cartesian coordinate directions. The maximum and minimum grid intervales are computed from these characteristic measures of the spacing. On a box shaped domain, the grid sizes are exact. In other cases, consider e.g. a 45 degrees rotated long and tiny element, the programmer must carefully consider whether this function will provide relevant results. In the case where "NUMT" is "Complex", the "FieldFunc" object returns a complex value, but only the real part of this number is used in the function.

bool GridFEInfo::onlyFirstOrderElements ( GridFE & grid )
 

returns true if all elements are of first order (triangle, tetrahedra, quadrilateral, hexahedron), and false otherwise. For example, the bounding box of an element, computed on basis of the nodal coordinates, is a real bounding box if the sides are straight, or in other words, if the elements are of first order Repeated calls will only lead to computation the first time this routine is invoked.

void GridFEInfo::provideCoverAndConnection ( GridFE & grid,
GridLattice * cover_grid = NULL )
 

generates a lattice grid that covers the original grid (of type "GridFE") (alternatively, the cover grid can be given by an argument to the routine) and updates the connection between the elements in the original grid and the cells in the cover grid. The cover is applied in the new efficient search algorithm "GridFE findElmAndLocPtFE".


Friends And Related Function Documentation

class GridFE [friend]
 


Member Data Documentation

Handle(BoundaryMesh) GridFEInfo::boundaries
 

ArrayGenSimple(SetDistinct(int)) GridFEInfo::connection
 

Handle(GridLattice) GridFEInfo::cover
 

ArrayGenSimple(VecSimple(int)) GridFEInfo::eff_connection
 

NeighborFE GridFEInfo::neighbor
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.