pymor.discretizers.builtin.grids.constructions

Module Contents

pymor.discretizers.builtin.grids.constructions.flatten_grid(grid)[source]

Flatten a Grid.

This method is used by our visualizers to render n-dimensional grids which cannot be embedded into R^n by duplicating vertices which would have to be mapped to multiple points at once (think of grids on rectangular domains with identified edges).

Parameters

grid

The Grid to flatten.

Returns

subentities

The subentities(0, grid.dim) relation for the flattened grid.

coordinates

The coordinates of the codim-grid.dim entities.

entity_map

Maps the indices of the codim-grid.dim entities of the flattened grid to the indices of the corresponding entities in the original grid.