# How to Access Neighbor Nodes and Elements

From KratosWiki

(Difference between revisions)

(New page: In a finite element context it is often useful to have a fast access ( O(N) time with N number of nodes ) to the objects which are "around" a certain node. This can be achieved by storing ...) |
|||

Line 1: | Line 1: | ||

In a finite element context it is often useful to have a fast access ( O(N) time with N number of nodes ) to the objects which are "around" a certain node. This can be achieved by storing on each node the list of all of the nodes and elements which are close to it. | In a finite element context it is often useful to have a fast access ( O(N) time with N number of nodes ) to the objects which are "around" a certain node. This can be achieved by storing on each node the list of all of the nodes and elements which are close to it. | ||

− | Before proceeding it is useful to clarify the meaning of | + | Before proceeding it is useful to clarify the meaning of the word "around". To do so, let's consider the mesh |

+ | |||

[[Image:Neighbours.jpg]] | [[Image:Neighbours.jpg]] | ||

− | we will define as "NEIGHBOUR NODES" of node | + | |

+ | we will define as "NEIGHBOUR NODES" of node 910 which share at least one element with node 910 | ||

+ | |||

+ | {| | ||

+ | | | Neighbours | ||

+ | ! Node 910 | ||

+ | | 968 | 940 | 986 | 850 | 876 | 931 | ||

+ | |- | ||

+ | ! Coord Y | ||

+ | | 0.0 || 0.51 || 0.27 || 1.77 | ||

+ | |} |

## Revision as of 14:56, 26 November 2007

In a finite element context it is often useful to have a fast access ( O(N) time with N number of nodes ) to the objects which are "around" a certain node. This can be achieved by storing on each node the list of all of the nodes and elements which are close to it.

Before proceeding it is useful to clarify the meaning of the word "around". To do so, let's consider the mesh

we will define as "NEIGHBOUR NODES" of node 910 which share at least one element with node 910

Neighbours | Node 910 | 940 | 986 | 850 | 876 | 931 | ||
---|---|---|---|---|

Coord Y | 0.0 | 0.51 | 0.27 | 1.77 |