Skip to content

Commit

Permalink
added 2d example for edge and vertex connectivity
Browse files Browse the repository at this point in the history
  • Loading branch information
project-fluxo-old committed Nov 22, 2023
1 parent 627a2c9 commit 8e66e0c
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 18 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
65 changes: 47 additions & 18 deletions docs/documentation/userguide/meshformat.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,34 @@ name: tab:mesh_file_attributes
| Ngeo $\geq 1$ | INTEGER | Polynomial degree $N_{geo}$ of element mapping, used to determine the number of nodes per element |
| nElems | INTEGER | Total number of elements in mesh |
| nSides | INTEGER | Total number of sides (or element faces) in file |
| nEdges? | INTEGER | Total number of edges in file |
| nNodes | INTEGER | Total number of nodes in file |
| nEdges? | INTEGER | Total number of entries in the EdgeInfo array |
| nVertices? | INTEGER | Total number of entries in the VertexInfo array |
| nNodes | INTEGER | Total number of nodes in file |
| nUniqueSides | INTEGER | Total number of geometrically unique sides in the mesh |
| nUniqueEdges? | INTEGER | Total number of geometrically unique edges in the mesh
| nUniqueEdges? | INTEGER | Total number of geometrically unique edges in the mesh |
| nUniqueNodes | INTEGER | Total number of geometrically unique nodes in the mesh |
| nBCs | INTEGER | Size of the Boundary Condition list |
| nFEMSides? | INTEGER | Total number of topologically (includes periodicity) unique sides in the mesh, needed for a FEM solver |
| nFEMEdges? | INTEGER | Total number of topologically (includes periodicity) unique edges in the mesh, needed for a FEM solver
| nFEMNodes? | INTEGER | Total number of topologically (includes periodicity) unique nodes in the mesh, needed for a FEM solver |
| nFEMSides? | INTEGER | Total number of topologically (includes periodicity) unique sides in the mesh, needed for a FEM solver |
| nFEMEdges? | INTEGER | Total number of topologically (includes periodicity) unique edges in the mesh, needed for a FEM solver |
| nFEMNodes? | INTEGER | Total number of topologically (includes periodicity) unique nodes in the mesh, needed for a FEM solver |
```

### Data Arrays
The mesh information is organized in arrays. The **ElemInfo** array is the first to read, since it contains the data range of each
element in the **SideInfo**, **EdgeInfo**,**VertexInfo** and **NodeCoords** / **GlobalNodeIDs** arrays.
element in the **SideInfo**, **EdgeInfo**, **EdgeConnectInfo**,**VertexInfo**,**VertexConnectInfo** and **NodeCoords** / **GlobalNodeIDs** arrays.

```{table} List of all data arrays in mesh file. Dimensions marked with $^*$ will be distributed in parallel read mode.
---
name: tab:mesh_data_arrays
---
| **Array Name** | **Description** | **Type** | **Size** |
| :-------------------------- | :----------------------- | :--------------- | :--------------- |
| **ElemInfo** | Start \ | End positions of element data in SideInfo / EdgeInfo / VertexInfo / NodeCoords | INTEGER & (1:10?,1:**nElems**$^*$) |
| **SideInfo** | Side Data / Connectivity information | INTEGER | (1:5,1:**nSides**$^*$) |
| **EdgeInfo?** | Element Edge Data / Connectivity information | INTEGER | (1:?,1:**nEdges**$^*$) |
| **VertexInfo?** | Element Vertex Data / Connectivity information (needed for a FEM solver) | INTEGER | (1:?,1:**nNodes**$^*$) |
| **ElemInfo** | Start \ | End positions of element data in SideInfo / EdgeInfo / VertexInfo / NodeCoords | INTEGER & (1:10,1:**nElems**$^*$) |
| **SideInfo** | Side Data / Connectivity information | INTEGER | (1:5,1:**nSides**$^*$) |
| **EdgeInfo?** | Element Edge information and offsets in EdgeConnectInfo | INTEGER | (1:?,1:**nEdges**$^*$) |
| **EdgeConnectInfo?** | Element Edge Connectivity information (needed for a FEM solver) | INTEGER | (1:?,1:**??**$^*$) |
| **VertexInfo?** | Element Vertex Data information and and offsets in EdgeConnectInfo | INTEGER | (1:?,1:**nNodes**$^*$) |
| **VertexConnectInfo?** | Element Vertex Connectivity information (needed for a FEM solver) | INTEGER | (1:?,1:**??**$^*$) |
| **NodeCoords** | Node Coordinates | REAL | (1:3,1:**nNodes**$^*$) |
| **GlobalNodeIDs** | Globally unique node index | INTEGER | (1:**nNodes**$^*$) |
| BCNames | List of user-defined boundary condition names (max. 255 Characters) | STRING | (1:**nBCs**) |
Expand Down Expand Up @@ -130,7 +133,7 @@ name: tab:elem_info
| | |
| :--- | :--- |
| Name in file: | **ElemInfo** |
| Type: | INTEGER, Size: Array(1:6,1:**nElems**$^*$) |
| Type: | INTEGER, Size: Array(1:10,1:**nElems**$^*$) |
| Description: | Array containing elements, one element per row, **row number is elemID**. |
```

Expand All @@ -139,12 +142,12 @@ However, this way, each processor has a defined, non overlapping, range of side
operations, minimizing the need of communication between processors.


| | *Element Type* | *Zone* | *offsetIndSIDE* | *lastIndSIDE* | *offsetIndNODE* | *lastIndNODE* |
| - | - | - | - | - | - | - |
| 1 | 116 | 1 | 0 | 5 | 0 | 6 |
| 2 | 118 | 1 | 5 | 11 | 6 | 14 |
| 3 | 104 | 2 | 11 | 15 | 14 | 18 |
| 4 | 115 | 2 | 15 | 20 | 18 | 23 |
| | *Element Type* | *Zone* | *offsetIndSIDE* | *lastIndSIDE* | *offsetIndNODE* | *lastIndNODE* |*offsetIndEDGE* | *lastIndEDGE* |*offsetIndVERTEX* | *lastIndVERTEX* |
| - | - | - | - | - | - | - | - | - | - | - |
| 1 | 116 | 1 | 0 | 5 | 0 | 6 | 0 | ??? | 0 | ??? |
| 2 | 118 | 1 | 5 | 11 | 6 | 14 | ??? | ??? | ??? | ??? |
| 3 | 104 | 2 | 11 | 15 | 14 | 18 | ??? | ??? | ??? | ??? |
| 4 | 115 | 2 | 15 | 20 | 18 | 23 | ??? | ??? | ??? | ??? |

The example mesh {numref}`fig:exmesh` with 4 elements is summarized in table {numref}`tab:elem_info_array`.

Expand All @@ -158,6 +161,8 @@ name: tab:elem_info_array
| *Zone*: | Element group number. |
| *offsetIndSIDE/lastIndSIDE*: | Each element has a range of sides in the **SideInfo** array. |
| *offsetIndNODE/lastIndNODE*: | Each element has a range of node coordinates in the **NodeCoords** array and **GlobalNodeIDs** array for unique indices. |
| *offsetIndEDGE/lastIndEDGE*: | Each element has a range of edges in the **EdgeInfo** array. |
| *offsetIndVERTEX/lastIndVERTEX*: | Each element has a range of edges in the **VertexInfo** array. |
```

The range and the size are always defined as: *Range=[offset+1,last], Size=last-offset*
Expand Down Expand Up @@ -219,6 +224,30 @@ name: tab:side_info_array
| *BCID*: | Refers to the row index of the Boundary Condition List in **BCNames**/**BCType** array ($\in[1,\dots\text{\texttt{nBCs}}]$). $=0$ for inner sides. Note that $\neq 0$ for periodic and inner boundary conditions, while nbElemID and nbLocSide+Flip are given, see Section {ref}`userguide/meshformat:Boundary Conditions`. |
```

#### Edge Information (EdgeInfo)
```{table} Side Information
---
name: tab:edge_info
---
| | |
| :--- | :--- |
| Name in file: | **EdgeInfo** |
| Type: | INTEGER, Size: Array(1:?,1:**nEdges**$^*$) |
| Description: | Side array, all information of one element is a set of all element sides (CGNS ordering, \rf{fig:CGNS}). |
| | *offsetIndSIDE/lastIndSIDE*in **ElemInfo** refers to the row index of one set of element sides. |
```


```{figure} figures/2d_edge_vertex_connectivity_example.jpg
---
name: fig:exmesh2d
width: 800px
align: center
---
Example 2D mesh with periodic BC, local, unique node IDs and **FEMVertexID** (circles,ellipses) and local, unique edge IDs and their FEMEdgeIDs (trapezoid)
```

#### Node Coordinates and Global Index

```{table} NodeCoords
Expand Down

0 comments on commit 8e66e0c

Please sign in to comment.