Chapter 11
Mesh Files

11.1 File mesh data structure

The mesh data structure, output of a mesh generation algorithm, refers to the geometric data structure and in some case to another mesh data structure.

In this case, the fields are

When the current mesh refers to a previous mesh, we have in addition

11.2 bb File type for Store Solutions

The file is formatted such that: 2 nbsol nbv 2
((                       )                  )
 Uij,  ∀i ∈ {1,...,nbso l} , ∀j ∈ {1,...,n bv}

where

11.3 BB File Type for Store Solutions

The file is formatted such that: 2 n typesol1 ... typesoln nbv 2
((( k                      k )              )                  )
  Uij,   ∀i ∈ {1,...,types ol } , ∀k ∈ {1,...n }   ∀j ∈ {1, ...,nb v}

where

11.4 Metric File

A metric file can be of two types, isotropic or anisotropic.

the isotropic file is such that nbv 1
hi i ∈ {1,...,nbv}

where

The metric anisotrope nbv 3
a11i,a21i,a22i i ∈ {1,...,nbv}

where

11.5 List of AM_FMT, AMDBA Meshes

The mesh is only composed of triangles and can be defined with the help of the following two integers and four arrays:

nbt

is the number of triangles.

nbv

is the number of vertices.

nu(1:3,1:nbt)

is an integer array giving the three vertex numbers

counterclockwise for each triangle.

c(1:2,nbv)

is a real array giving the two coordinates of each vertex.

refs(nbv)

is an integer array giving the reference numbers of the vertices.

reft(nbv)

is an integer array giving the reference numbers of the triangles.

AM_FMT Files In fortran the am_fmt files are read as follows:

     open(1,file='xxx.am_fmt',form='formatted',status='old')  
       read (1,⋆) nbv,nbt  
       read (1,⋆)  ((nu(i,j),i=1,3),j=1,nbt)  
       read (1,⋆)  ((c(i,j),i=1,2),j=1,nbv)  
       read (1,⋆)  ( reft(i),i=1,nbt)  
       read (1,⋆)  ( refs(i),i=1,nbv)  
     close(1)

AM Files In fortran the am files are read as follows:

     open(1,file='xxx.am',form='unformatted',status='old')  
       read (1,⋆) nbv,nbt  
       read (1)  ((nu(i,j),i=1,3),j=1,nbt),  
     &   ((c(i,j),i=1,2),j=1,nbv),  
     &   ( reft(i),i=1,nbt),  
     &   ( refs(i),i=1,nbv)  
     close(1)

AMDBA Files In fortran the amdba files are read as follows:

     open(1,file='xxx.amdba',form='formatted',status='old')  
       read (1,⋆) nbv,nbt  
       read (1,⋆) (k,(c(i,k),i=1,2),refs(k),j=1,nbv)  
       read (1,⋆) (k,(nu(i,k),i=1,3),reft(k),j=1,nbt)  
     close(1)

msh Files First, we add the notions of boundary edges

nbbe

is the number of boundary edge.

nube(1:2,1:nbbe)

is an integer array giving the two vertex numbers

refbe(1:nbbe)

is an integer array giving the two vertex numbers

In fortran the msh files are read as follows:

     open(1,file='xxx.msh',form='formatted',status='old')  
       read (1,⋆) nbv,nbt,nbbe  
       read (1,⋆) ((c(i,k),i=1,2),refs(k),j=1,nbv)  
       read (1,⋆) ((nu(i,k),i=1,3),reft(k),j=1,nbt)  
       read (1,⋆) ((ne(i,k),i=1,2), refbe(k),j=1,nbbe)  
     close(1)

ftq Files In fortran the ftq files are read as follows:

     open(1,file='xxx.ftq',form='formatted',status='old')  
      read (1,⋆) nbv,nbe,nbt,nbq  
      read (1,⋆) (k(j),(nu(i,j),i=1,k(j)),reft(j),j=1,nbe)  
      read (1,⋆) ((c(i,k),i=1,2),refs(k),j=1,nbv)  
     close(1)

where if k(j) = 3 then the element j is a triangle and if k = 4 the the element j is a quadrilateral.