Class MeshMapping

Nested Relationships

Nested Types

Class Documentation

class MeshMapping

Produces a mapping between a fine mesh and a coarse mesh. Each fine mesh cell face must be fully contained within a coarse mesh face. The meshes can be the same.

Public Functions

MeshMapping() = default
void Build(const std::shared_ptr<MeshContinuum> &fine_grid, const std::shared_ptr<MeshContinuum> &coarse_grid)

Builds the mapping.

const CoarseMapping &GetCoarseMapping(const Cell &coarse_cell) const

Get the mapping from the given coarse mesh cell.

const FineMapping &GetFineMapping(const Cell &fine_cell) const

Get the mapping for the given fine mesh cell.

Public Static Attributes

static const size_t invalid_face_index

Identifier for an invalid face index that means a face maps to nothing.

struct CoarseMapping

Helper struct for storing the mapping to a coarse cell from a fine cell.

Public Functions

explicit CoarseMapping(const Cell &coarse_cell)

Constructor. Sizes fine_faces based on the number of faces within the coarse cell.

Public Members

std::vector<const Cell*> fine_cells

The fine cells contained within a coarse cell.

std::vector<std::vector<std::pair<const Cell*, size_t>>> fine_faces

The fine cell faces contained within each coarse cell face. Outer index coarse cell face index (size == # of faces in coarse cell) Inner index is arbitrary and entries are fine Cell -> fine CellFace index

struct FineMapping

Helper struct for storing the mapping from a coarse cell to fine cells.

Public Functions

explicit FineMapping(const Cell &fine_cell)

Constructor. Sizes coarse_faces based on the number of faces within the fine cell.

Public Members

const Cell *coarse_cell

The coarse cell that the fine cell is contained within.

std::vector<size_t> coarse_faces

The coarse CellFace index each fine CellFace is contained within (if any)