|
TrioCFD 1.9.8
TrioCFD documentation
|
This page documents the data structures underlying the IJK structured-mesh solver used by the Front-Tracking IJK module (see Front-Tracking IJK). IJK refers to the three indices \((i,j,k)\) of a Cartesian coordinate system: the domain is a parallelepiped discretized on a structured Cartesian grid, which allows a simplified vectorized data layout and significant performance gains.
The global mesh geometry is described by the Domaine_IJK class (deriving from Domaine_base). It holds:
The face of index \((i,j,k)\) in a given direction is located at the "left" (lower-index side) of the element of index \((i,j,k)\). As a consequence a Cartesian element has, in each direction, a "left" face sharing its index and a "right" face whose index is incremented by one.
The partitioning of the mesh across processors is also carried by Domaine_IJK. Only a structured splitting is supported: the global domain is cut into a given number of slices along the \(i\), \(j\) and \(k\) directions, so that each processor owns a parallelepipedic sub-block.
Within each processor, elements, nodes and faces carry local indices. The corresponding global index is recovered by adding the local offset of the sub-block (Domaine_IJK::get_offset_local for a given direction).
Unlike elements, a node or a face is never shared: it belongs to exactly one processor. The convention follows the face numbering above — the "right" face of the rightmost owned element is a ghost face, owned by the processor holding the next block of cells (except at the boundary of a non-periodic global domain, where it is a real boundary face). The number of locally owned faces in a direction is queried through Domaine_IJK::get_nb_faces_local (and get_nb_elem_local / get_nb_items_local for the other localizations).
Scalar fields on a split IJK mesh are stored in the IJK_Field_double and IJK_Field_float classes — aliases of the IJK_Field_template<T> class template (so the same storage works in single or double precision). A field is attached to a Domaine_IJK and to a localization that fixes where its values live:
On each processor a field item is either real or ghost (never "common"): consistently with the ownership rule above, the node or face on the high-index side of the last owned element is a ghost item locally, and a real item on the processor that owns the next block of cells.