#include <NeighborFE.h>
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) |
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
|
|
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). |
|
|
|
|
|
same function as "nodes". |
|
|
see function "nodeIrow". |
|
|
see function "nodeJcol". |
|
|
returns the total size of the node-node information. |
|
|
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. |
|
|
see function "nodeIrow". |
|
|
see function "nodeJcol". |
|
|
See documentation of one of the overloaded functions. |
|
|
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". |
|
|
returns the total size of the element-element information. |
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
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. |
|
|
initializes side information for the elements in the grid. This function has to be called prior to use of the "elementSide" and "side" functions. |
|
|
given a node number, the function returns a list of all elements which the node is part of. |
|
|
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. |
|
|
accessing the items, as given by "*Irow". See also function "nodeIrow". |
|
|
|
|
|
|
|
|
returns the total size of the node-element information. |
|
|
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"). |
|
|
|
|
|
prints the neighbor information. |
|
|
removes all or parts of the neighbor information. |
|
|
See documentation of one of the overloaded functions. |
|
|
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. |
|
|
returns true if the element-to-element info only contains elements with "nsd", the number of space dimension, common nodes, see "init". |
|
|
|
|
|
|