My Project
programmer's documentation
Remarks

Note 1: ghost cells - (halos)

A cell (real cell) is an elementary mesh element of the spatial discretisation of the calculation domain. The mesh is made of ncel cells. When using periodicity and parallelism, extra "ghost" cells (also called "halo" cells) are defined for temporary storage of some information (on a given process). The total number of real and ghost cells is ncelet.

  • Indeed, when periodicity is enabled, the cells with periodic faces do not have any real neighboring cell across these particular faces. Their neighboring cell is elsewhere in the calculation domain (its position is determined by the periodicity). In order to temporarily store the information coming from this distant'' neighboring cell, a ghost cell (halo'') is created.
  • The same kind of problem exists in the case of a calculation on parallel machines: due to the decomposition of the calculation domain, some cells no longer have access to all their neighboring cells, some of them being assigned to another parallel domain. The creation of ghost cells allows to temporarily store the information coming from real neighboring cells treated by other MPI ranks. The variables are generally arrays of size ncelet (number of real and fictitious cells). The calculations (loops) are made on ncel cells (only the real cells, the fictitious cells are only used to store information).

Note 2: internal faces

An internal face is an inferface shared by two cells (real or ghost ones) of the mesh. A boundary face is a face which has only one real neighboring cell. In the case of periodic calculations, a periodic face is an internal face. In the case of parallel running calculations, the faces situated at the boundary of a partition may be internal faces or boundary faces (of the whole mesh);

Note 3: faces-vertices connectivity

The faces - vertices connectivity is accessed by means of four integer functions: ipnfac and nodfac for the internal faces, ipnfbr and nodfbr for the boundary faces. nodfac accesses the list of all the vertices of all the internal faces; first the vertices of the first face, then the vertices of the second face, and so on. ipnfac (size: nfac+1) gives the position ipnfac(ifac) in nodfac of the first node of each internal face ifac. Therefore, the reference numbers of all the vertices of the internal face ifac are: nodfac(ipnfac(ifac)), nodfac(ipnfac(ifac)+1), ..., nodfac(ipnfac(ifac+1)-1). In order for this last formula to be valid even for ifac=nfac, ipnfac is of size nfac+1 and ipnfac(nfac+1) is equal to lndfac+1. For boundary faces, the array access functions nodfbr and ipnfbr are used in a similar fashion.

Note 4: modules

The user must not modify the existing modules in user source directories, as this may break the code in more or less subtle fashion. Developers modifying modules must recompile the whole code. As this may not be possible for users (and in any case breaks versioning and quality assurance), modules should be defined in cs_user_modules.f90.