d. Mesh Object Connectivity
F1 | = | I2 | I3 | I4 |
F2 | = | I1 | I4 | I3 |
F3 | = | I1 | I2 | I4 |
F4 | = | I1 | I3 | I2 |
The local edges for a tetrahedral are defined as follows:
E1 | I1 | I2 |
E2 | I1 | I3 |
E3 | I1 | I4 |
E4 | I2 | I3 |
E5 | I2 | I4 |
E6 | I3 | I4 |
Similarly, local facets and local edges are defined for all element types. (see supported element types)
itettyp(it) gives the element type of element it.
itetoff(it) gives the offset to the first node in element it.
itet(itetoff(it)+j) gives the jth node of element it.
nelmnen(itettyp(it)) gives the number of nodes of element it.
To loop through all the nodes of all elements in the mesh:do it=1,ntets
do j=1,nelmnen(itettyp(it))
k=itet(itetoff(it)+j)
enddo
enddonelmnef(itettyp(it)) gives the number of facets of element it. ielmface0(iface,itettyp(it)) gives the number of nodes on facet iface of element it. ielmface1(local_node,iface,itettyp(it)) gives the increment to the node number (local_node) on facet iface of element it.
To loop through all the nodes, k, of all elements in the mesh by facets:do it=1,ntets
do i=1,nelmnef(itettyp(it))
do j=1,ielmface0(i,itettyp(it))
k=itet(itetoff(it)+
ielmface1(j,i,itettyp(it)))
enddo
enddo
enddonelmnee(itettyp(it)) gives the number of edges of element it. ielmface2(inode,iface,itettyp(it)) gives the edge number associated with inode on facet iface of element it.
ielmedge1(1|2,iedge,itettyp(it)) gives the node offset associated with edge iedge of element it.
To loop through all pairs of edge nodes (i1,i2) of all elements in the mesh :do it=1,ntets
do i=1,nelmnee(itettyp(it))
i1=itet(itetoff(it)+
ielmedge1(1,i,itettyp(it)))
i2=itet(itetoff(it)+
ielmedge1(2,i,itettyp(it))
enddo
enddoTo loop through all pairs of edge nodes (i1,i2) of all elements in the mesh by facets:
do it=1,ntets
do i=1,nelmnef(itettyp(it))
do j=1,ielmface0(i,itettyp(it))
ie=ielmface2(j,i,itettype(it))
i1=itet(itetoff(it)+
ielmedge1(1,ie,itettyp(it)))
i2=itet(itetoff(it)+
ielmedge1(2,ie,itettyp(it)))
enddo
enddo
enddojtet(jtetoff(it)+j) gives the element number and local facet number of the neighbor to element it, facet j.
To loop to find all face neighbors of elements ( jt is the neighbor element number, jf is the local facet of the neighboring element) if jt is a neighbor of element it and local face if of it is the shared face jf of jt then jtet (jtetoff(it) + if) = nef_cmo * (jt-1)+jf, where nef_cmo is the number of faces per element. Similarily, jtet (jtetoff(jt) + jf) = nef_cmo * (it -1) + if (mbndry is the value added to jtet if element it is on a boundary or interface; the jtet value of an element it with facet j on an exterior boundary will be exactly mbndry; the jtet value of an element it with facet j on an interior interface will be mbndry + the jtet value calculated from the neighboring element number and neighbor element local_facet number):