Skip to content

Commit 9b90513

Browse files
Merge pull request #34 from easifem/dev
Updating readme file
2 parents 4cd74bf + aa8e3f4 commit 9b90513

File tree

289 files changed

+30054
-8778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+30054
-8778
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ dist
136136

137137
build
138138
build/*
139+
**/build
139140

140141
*.mtx
141142
*.eps
+345
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,345 @@
1+
---
2+
title: Structure
3+
sidebar_position: 2
4+
---
5+
6+
<!-- markdownlint-disable MD041 MD013 MD033 MD012 -->
7+
8+
`AbstractMesh_` datatype is simply a collection of finite elements and nodes.
9+
10+
This is an abstract class, which will be extended by `Mesh_` and `FEMesh_` class.
11+
12+
:::note Difference between `Mesh` and `FEMesh`
13+
14+
- `Mesh` class is older version and `FEMesh` is a newer version. In future, `Mesh` class will be merged with `FEMesh` class.
15+
- In EASIFEM mesh is a homogeneous collection of reference elements. All elements in mesh should be of same type (i.e., triangle, quadrangle, tetrahedron, etc.).
16+
- Two meshes can have different types of elements. For example, we can define a mesh of triangle element or a mesh of tetrahedron element.
17+
- However, in `FEMesh` elements can have different topology but they all should have same co-dimension. That is in `FEMesh` all elements need to be either `volume`, or `surface`, or `curve`, or `point`.
18+
19+
:::
20+
21+
## Type definition
22+
23+
```fortran
24+
TYPE, ABSTRACT :: AbstractMesh_
25+
PRIVATE
26+
LOGICAL(LGT) :: showTime = .FALSE.
27+
!! If true, then we show the time taken by various mesh operations
28+
!! This is for checking the performance of a subclass
29+
LOGICAL(LGT) :: readFromFile = .TRUE.
30+
!! True if the mesh is read from a file
31+
LOGICAL(LGT) :: isInitiated = .FALSE.
32+
!! logical flag denoting for whether mesh data is Initiated or not
33+
LOGICAL(LGT) :: isNodeToElementsInitiated = .FALSE.
34+
!! Node to elements mapping
35+
LOGICAL(LGT) :: isNodeToNodesInitiated = .FALSE.
36+
!! Node to nodes mapping
37+
LOGICAL(LGT) :: isExtraNodeToNodesInitiated = .FALSE.
38+
!! Node to nodes mapping
39+
LOGICAL(LGT) :: isElementToElementsInitiated = .FALSE.
40+
!! Element to elements mapping
41+
LOGICAL(LGT) :: isEdgeConnectivityInitiated = .FALSE.
42+
!! This is Set to true when edge connectivity is initiated
43+
!! See InitiateEdgeConnectivity method
44+
LOGICAL(LGT) :: isFaceConnectivityInitiated = .FALSE.
45+
!! This is Set to true when face connectivity is initiated
46+
!! See InitiateFaceConnectivity method
47+
LOGICAL(LGT) :: isBoundaryDataInitiated = .FALSE.
48+
!! Boundary data
49+
LOGICAL(LGT) :: isFacetDataInitiated = .FALSE.
50+
!! FacetData
51+
INTEGER(I4B) :: uid = 0
52+
!! Unique id of the mesh
53+
!! In case of Mesh_ it is entityNumber of the mesh
54+
INTEGER(I4B) :: tElements_topology_wise(8) = 0
55+
!! point, line, triangle, quadrangle, tetrahedron, hexahedron, prism,
56+
!! pyramid (it is calculated in the postprocessing step)
57+
INTEGER(I4B) :: tElemTopologies = 0, elemTopologies(8) = 0
58+
!! total element topologies, name of element topologies are stored in
59+
!! elemTopologies(1:tElemTopologies)
60+
!! this info is computed in a postprocessing step
61+
INTEGER(I4B) :: maxNNE = 0
62+
!! maximum number of nodes in element
63+
INTEGER(I4B) :: nsd = 0
64+
!! number of spatial dimension of the mesh
65+
INTEGER(I4B) :: xidim = 0
66+
!! xidimension of elements present inside the mesh
67+
!! for point xidim = 0
68+
!! for line/curve xidim = 1
69+
!! for surface xidim = 2
70+
!! for volume xidim = 3
71+
INTEGER(I4B) :: maxNptrs = 0
72+
!! largest node number present inside the mesh
73+
INTEGER(I4B) :: minNptrs = 0
74+
!! minimum node number present inside the mesh
75+
INTEGER(I4B) :: maxElemNum = 0
76+
!! largest element number present inside the mesh
77+
INTEGER(I4B) :: minElemNum = 0
78+
!! minimum element number present inside the mesh
79+
INTEGER(I4B) :: tNodes = 0
80+
!! total number of nodes present inside the mesh
81+
INTEGER(I4B) :: tEdges = 0
82+
!! total number of internal nodes inside the mesh
83+
INTEGER(I4B) :: tFaces = 0
84+
!! total number of internal nodes inside the mesh
85+
INTEGER(I4B) :: tElements = 0
86+
!! total number of elements present inside the mesh
87+
!! It is the size of elemNumber vector
88+
REAL(DFP) :: minX = 0.0
89+
!! minimum value of x coordinate
90+
REAL(DFP) :: maxX = 0.0
91+
!! maximum value of x coordinate
92+
REAL(DFP) :: minY = 0.0
93+
!! minimum value of y coordinate
94+
REAL(DFP) :: maxY = 0.0
95+
!! maximum value of y coordinate
96+
REAL(DFP) :: minZ = 0.0
97+
!! minimum value of z coordinate
98+
REAL(DFP) :: maxZ = 0.0
99+
!! maximum value of z coordinate
100+
REAL(DFP) :: x = 0.0
101+
!! x coorindate of centroid
102+
REAL(DFP) :: y = 0.0
103+
!! y coordinate of centroid
104+
REAL(DFP) :: z = 0.0
105+
!! z coordinate of centroid
106+
INTEGER(I4B), ALLOCATABLE :: boundingEntity(:)
107+
!! Bounding entity numbers of the current entity
108+
INTEGER(I4B), ALLOCATABLE :: local_elemNumber(:)
109+
!! List of local element numbers, the lowerbound is `minElemNum`
110+
!! and upper bound is `maxElemNum`. In this way, local_elemNumber(iel)
111+
!! returns the local element number of global element number iel.
112+
113+
INTEGER(I4B), ALLOCATABLE :: local_Nptrs(:)
114+
!! Returns local node number from a global node number
115+
!! Its length is from 1 to maxNptrs
116+
!! Helpul in finding if a global node is present inside the mesh or not
117+
118+
REAL(DFP), ALLOCATABLE :: quality(:, :)
119+
!! number of rows are meshquality
120+
!! number of columns are elements
121+
122+
INTEGER(I4B), ALLOCATABLE :: facetElementType(:, :)
123+
!! Number of rows of this array is same as the total number of
124+
!! facets present in the mesh-reference elements
125+
!! Number of columns of this array is equal to the total number of
126+
!! elements inside the mesh
127+
!! facetElementType(ii, iel) can be
128+
!! INTERNAL_ELEMENT, BOUNDARY_ELEMENT, DOMAIN_BOUNDARY_ELEMENT
129+
!! If the face is a part of the mesh boundary then it will be called
130+
!! the BOUNDARY_ELEMENT
131+
132+
TYPE(NodeData_), ALLOCATABLE :: nodeData(:)
133+
!! Node data
134+
135+
TYPE(ElemData_), ALLOCATABLE :: elementData(:)
136+
!! element data
137+
138+
TYPE(InternalFacetData_), ALLOCATABLE :: internalFacetData(:)
139+
!! Internal facet data
140+
!! INFO: This data is initiated by InitiateFacetElements method
141+
142+
TYPE(BoundaryFacetData_), PUBLIC, ALLOCATABLE :: boundaryFacetData(:)
143+
!! Domain Facet Data
144+
!! INFO: This data is initiated by InitiateFacetElements method
145+
146+
TYPE(ElemDataList_) :: elementDataList
147+
!! ElemData list
148+
TYPE(ElemDataBinaryTree_) :: elementDataBinaryTree
149+
!! ElemData binary tree
150+
TYPE(NodeDataList_) :: nodeDataList
151+
!! NodeData list
152+
TYPE(NodeDataBinaryTree_) :: nodeDataBinaryTree
153+
!! NodeData binary tree
154+
155+
END TYPE AbstractMesh_
156+
```
157+
158+
### showTime
159+
160+
`showTime` is true if the time taken by various mesh operations is shown.
161+
162+
### readFromFile
163+
164+
`readFromFile` is true if the mesh is read from a file.
165+
166+
### isInitiated
167+
168+
`isInitiated` is logical flag denoting whether mesh data is initiated or not.
169+
170+
### isNodeToElementsInitiated
171+
172+
`isNodeToElementsInitiated` is true if node to elements mapping is initiated.
173+
174+
### isNodeToNodesInitiated
175+
176+
`isNodeToNodesInitiated` is true of node to nodes mapping is initiated.
177+
178+
### isExtraNodeToNodesInitiated
179+
180+
It is true if extra information of node to nodes is initiated. Extra node to nodes is necessary for edge based FEM.
181+
182+
### isElementToElementsInitiated
183+
184+
`isElementToElementsInitiated` is true if element to elements mapping available.
185+
186+
### isEdgeConnectivityInitiated
187+
188+
If is true if edge connectivity is initiated.
189+
190+
### isFaceConnectivityInitiated
191+
192+
It is true when face connectivity is initiated.
193+
194+
### isBoundaryDataInitiated
195+
196+
`isBoundaryDataInitiated` is true if boundary data is available.
197+
198+
### isFacetDataInitiated
199+
200+
It is true when the facet data is initiated.
201+
202+
### uid
203+
204+
`uid` denotes the unique-id of the mesh. It is read from the mesh file, if present.
205+
206+
### xidim
207+
208+
- `xidim` denotes the `xidimension` of elements present inside the mesh, `xidim` = (0,1,2,3) for (point, line, surface, volume) elements.
209+
210+
### tElements_topology_wise
211+
212+
It denotes the total number of elements present in the mesh. It is calculated in the post-processing step.
213+
214+
| index | element tyep |
215+
| ----- | ------------ |
216+
| 1 | point |
217+
| 2 | line |
218+
| 3 | triangle |
219+
| 4 | quadrangle |
220+
| 5 | tetrahedron |
221+
| 6 | hexahedron |
222+
| 7 | prism |
223+
| 8 | pyramid |
224+
225+
### tElemTopologies and elemTopologies
226+
227+
Total number of topologies stored in the mesh. For example, in a mesh of lines, we will have `tElemTopolies=1`. In the case of mesh of surfaces we can have `tElemTopologies=2`. The name of the topolgoy is stored in `elemTopologies(1:tElemTopolies)`.
228+
229+
### maxNNE
230+
231+
Maximum number of nodes in an element.
232+
233+
### nsd
234+
235+
`nsd` denotes the number of spatial dimension of the mesh.
236+
237+
### xidim
238+
239+
The codimension of the mesh. It is 0 for point, 1 for line, 2 for surface, 3 for volume.
240+
241+
### maxNptrs
242+
243+
`maxNptrs` stands for the largest node number present inside the mesh.
244+
245+
### minNptrs
246+
247+
`minNptrs` stands for the smallest node number present inside the mesh.
248+
249+
### maxElemNum
250+
251+
`maxElemNum` denotes the largest element number present inside the mesh.
252+
253+
### minElemNum
254+
255+
`minElemNum` denotes the smallest element number present inside the mesh.
256+
257+
### tNodes
258+
259+
`tNodes` is the total number of (local) nodes present inside the mesh.
260+
261+
### tEdges
262+
263+
Total number of edges present inside the mesh.
264+
265+
### tFaces
266+
267+
Total number of faces present inside the mesh.
268+
269+
### tElements
270+
271+
`tElements` is the total number of elements present inside the mesh. It is the size of `elemNumber` vector.
272+
273+
### minX, maxX, minY, maxY, minZ, maxZ
274+
275+
- `minX` denotes the minimum value of x coordinate of `boundingbox`.
276+
- `maxX` denotes the maximum value of x coordinate of `boundingbox`.
277+
- `minY` is the minimum value of y coordinate of `boundingbox`.
278+
- `maxY` is the maximum value of y coordinate of `boundingbox`.
279+
- `minZ` is the minimum value of z coordinate of `boundingbox`.
280+
- `maxZ` is the maximum value of z coordinate of `boundingbox`.
281+
282+
### x, y, z
283+
284+
- `x` is the x coordinate of center of mesh.
285+
- `y` is the y coordinate of center of mesh.
286+
- `z` is the z coordinate of center of mesh.
287+
288+
### boundingEntity
289+
290+
`boundingEntity` denotes the bounding entity numbers of the current entity
291+
292+
### local_elemNumber and local_Nptrs
293+
294+
- `local_elemNumber` denotes the list of local element numbers, the lower bound is `minElemNum` and upper bound is `maxElemNum`. In this way, `local_elemNumber(iel)` returns the local element number of global element number `iel`.
295+
- `local_Nptrs` returns the local node number from a global node number. Its length is from 1 to `maxNptrs`. Helpful in finding if a global node is present inside the mesh or not.
296+
297+
### quality
298+
299+
Denotes the quality of elements.
300+
301+
### facetElementType
302+
303+
- Number of rows of this array is same as the total number of facets present in the mesh’s reference-element.
304+
- Number of columns of this array is equal to the total number of elements inside the mesh.
305+
- In this way, `facetElementType(ii, iel)` denotes the `ii`th facet’s type of element local element number `iel`
306+
- `facetElementType` can be
307+
- `INTERNAL_ELEMENT`,
308+
- `BOUNDARY_ELEMENT`,
309+
- `DOMAIN_BOUNDARY_ELEMENT`.
310+
- If the face is a part of the mesh boundary then it will be called the `BOUNDARY_ELEMENT`
311+
- If the face is part of domain boundary, then it is a `DOMAIN_BOUNDARY_ELEMENT`
312+
- If the facet is internal to a mesh, then it is a `INTERNAL_ELEMENT`
313+
- Note that every, `DOMAIN_BOUNDARY_ELEMENT` is `BOUNDARY_ELEMENT` but not vice-versa.
314+
315+
### nodeData
316+
317+
`nodeData` node data
318+
319+
### elementData
320+
321+
`elementData` element data
322+
323+
### internalFacetData
324+
325+
`internalFacetData` internal facet data
326+
327+
### boundaryFacetData
328+
329+
`boundaryFacetData` boundary facet Data
330+
331+
### elementDataList
332+
333+
Linked list of element data
334+
335+
### elementDataBinaryTree
336+
337+
Binary tree of element data.
338+
339+
### nodeDataList
340+
341+
Linked list of node data
342+
343+
### nodeDataBinaryTree
344+
345+
Binary tree of node data.

0 commit comments

Comments
 (0)