Diffpack Documentation


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

NeighborFE Class Reference

neighbor information in finite element grids. More...

#include <NeighborFE.h>

List of all members.

Public Methods

 NeighborFE ()
 ~NeighborFE ()
void init (GridFE &grid)
void init (GridFE &grid, bool init_n2e, bool init_n2n, bool init_e2e, bool side_e2e=false)
void remove (bool remove_n2e=true, bool remove_n2n=true, bool remove_e2e=true)
bool sideElements ()
bool ok () const
void node (int n, VecSimplest(int) &element_list)
void nodes (int n, VecSimplest(int) &node_list)
void couplings (int n, VecSimplest(int) &node_list)
void element (int e, VecSimplest(int) &element_list)
int nodeSize () const
int couplingsSize () const
int elementSize () const
int nodeIrow (int n) const
int couplingsIrow (int n) const
int elementIrow (int e) const
int nodeJcol (int n) const
int couplingsJcol (int n) const
int elementJcol (int e) const
void initSideInfo (GridFE &grid)
bool hasSideInfo ()
void elementSide (int e, VecSimplest(int) &element_list, bool elm=true)
void elementSide (Handle(MatSimpleH(int)) &element_list, bool elm=true)
void nodeSide (int n, VecSimplest(int) &side_list)
void nodeSide (Handle(MatSimpleH(int)) &side_list)
void side (int s, VecSimplest(int) &element_list, VecSimplest(int) &node_list)
void side (Handle(MatSimpleH(int)) &element_list, Handle(MatSimpleH(int)) &node_list)
void print (Os os)


Detailed Description

neighbor information in finite element grids.

NAME: NeighborFE - neighbor information in finite element grids

DESCRIPTION:

The class represents the neighbor information in a finite element grid. Three types of neighbor information are computed: (1) the elements that are neighbors of a node, (2) the nodes that are neighbors to a node including the node itself, and (3) the elements that are neighbors of an element excluding the element itself. See descriptions of the corresponding member functions for a definition of the three types.

The neighbor information is accessed through the "NeighborFE" object in the optional "GridFEInfo" object in class "GridFE":

  grid.additional_info.neighbor


Constructor & Destructor Documentation

NeighborFE::NeighborFE ( )
 

Only an empty constructor is offered. To initialize the class, one must call the function "init". This function requires a "GridFE" object, and generates the neighbor information. In one version of "init" it is possible to specify which of the neighbor items to be computed. Normally, the initialization is done by calling the "initNeighbor" function in the "GridFEInfo" object (the "NeighborFE" class is usually used through a "GridFEInfo" object).

NeighborFE::~NeighborFE ( ) [inline]
 


Member Function Documentation

void NeighborFE::couplings ( int n,
VecSimplest(int) & node_list )
 

same function as "nodes".

int NeighborFE::couplingsIrow ( int n ) const [inline]
 

see function "nodeIrow".

int NeighborFE::couplingsJcol ( int n ) const [inline]
 

see function "nodeJcol".

int NeighborFE::couplingsSize ( ) const [inline]
 

returns the total size of the node-node information.

void NeighborFE::element ( int e,
VecSimplest(int) & element_list )
 

given an element number, the function returns a list of all elements that are neighbors of this element. In the standard version two elements are neighbors if they have at least one node in common. Observe that this definition of neighbors is different from other commonly applied definitions, for example, that two elements are neighbors if they share a common side.

int NeighborFE::elementIrow ( int e ) const [inline]
 

see function "nodeIrow".

int NeighborFE::elementJcol ( int e ) const [inline]
 

see function "nodeJcol".

void NeighborFE::elementSide ( Handle(MatSimpleH(int)) & element_list,
bool elm = true )
 

See documentation of one of the overloaded functions.

void NeighborFE::elementSide ( int e,
VecSimplest(int) & element_list,
bool elm = true )
 

gives the same result as a call to "element" when "side_e2e" has been set to "true", except that the result vector of "elementSide" uses the local side numbering for the element. If the flag "elm" is "true", the element sides on a boundary are therefore indicated by a zero value entry in the output list, whereas the other entries are element numbers. If "elm" is "false", the entries are global side numbers in the grid. Side numbers are assigned by walking through the grid element by element and iterating over the element sides using local numbering. Sides that has already been assigned a number are skipped, thus leading to unique, global side numbering.

Notice that "elementSide" requires that "initSideInfo" has already been called. Its behaviour is not influenced by the "side_e2e" flag. An overloaded version of "elementSide" returns a table covering all elements in the grid, where each row corresponds to a single call to the "elementSide" function treating a specific element. As for the single element case, the output is governed by the flag "elm".

int NeighborFE::elementSize ( ) const [inline]
 

returns the total size of the element-element information.

bool NeighborFE::hasSideInfo ( ) [inline]
 

void NeighborFE::init ( GridFE & grid,
bool init_n2e,
bool init_n2n,
bool init_e2e,
bool side_e2e = false )
 

See documentation of one of the overloaded functions.

void NeighborFE::init ( GridFE & grid )
 

initializes the neighbor information. The overloaded version is used to compute only parts of the information. The fourth argument, which by default is false, refers to the element-to-element computation; if "side_e2e" is "true" then only the elements which have at least "nsd" common nodes with the element are added to the list, where "nsd" is the space dimension of the grid.

void NeighborFE::initSideInfo ( GridFE & grid )
 

initializes side information for the elements in the grid. This function has to be called prior to use of the "elementSide" and "side" functions.

void NeighborFE::node ( int n,
VecSimplest(int) & element_list )
 

given a node number, the function returns a list of all elements which the node is part of.

int NeighborFE::nodeIrow ( int n ) const [inline]
 

information about where each row starts, the pointer refers to the "*Jcol" function. See class "SparseDS" for more information on the irow and jcol storage structure.

int NeighborFE::nodeJcol ( int n ) const [inline]
 

accessing the items, as given by "*Irow". See also function "nodeIrow".

void NeighborFE::nodeSide ( Handle(MatSimpleH(int)) & side_list )
 

void NeighborFE::nodeSide ( int n,
VecSimplest(int) & side_list )
 

int NeighborFE::nodeSize ( ) const [inline]
 

returns the total size of the node-element information.

void NeighborFE::nodes ( int n,
VecSimplest(int) & node_list )
 

given a node number, the function returns a list of all the nodes that are coupled to the given node. This includes constraints if the grid has constraints ("GridFEAdB").

bool NeighborFE::ok ( ) const
 

void NeighborFE::print ( Os os )
 

prints the neighbor information.

void NeighborFE::remove ( bool remove_n2e = true,
bool remove_n2n = true,
bool remove_e2e = true )
 

removes all or parts of the neighbor information.

void NeighborFE::side ( Handle(MatSimpleH(int)) & element_list,
Handle(MatSimpleH(int)) & node_list )
 

See documentation of one of the overloaded functions.

void NeighborFE::side ( int s,
VecSimplest(int) & element_list,
VecSimplest(int) & node_list )
 

returns the list of global node numbers constituting the side identified by the global side number "s". Moreover, it delivers the global element numbers for the elements which share this side. This information is intended for use together with "elementSide".

Notice that "side" requires that "initSideInfo" has already been called. Its behaviour is not influenced by the "side_e2e" flag. An overloaded version of "side" returns a table covering all element sides in the grid, where each row corresponds to a single call to the "side" function treating a specific side.

bool NeighborFE::sideElements ( ) [inline]
 

returns true if the element-to-element info only contains elements with "nsd", the number of space dimension, common nodes, see "init".


Friends And Related Function Documentation

class GridFE [friend]
 

class GridFEAdB [friend]
 


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