examples#
This submodule is dedicated to provide some code that may be useful for creating example problems. This code is not meant to be fast, but to only provide common functions that were found to be often needed in tutorial problems and such.
- mfv2d.examples.unit_square_mesh(nh: int, nv: int, orders: int | Sequence[int], deformation: Callable[[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]], tuple[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]]] | None = None) Mesh[source]#
Create a mesh based on the unit square.
- Parameters:
nh (int) – Number of elements in the horizontal direction.
nv (int) – Number of elements in the vertical direction.
orders (int or Sequence of int) – Order(s) of all elements in the mesh.
deformation (Callable (array, array) -> (array, array)) – Deformation applied to points of the mesh. Should accept positions of in the reference domain that are given on the domain \((\xi, \eta) \in [-1, +1]\) and map it to real geometry \((x, y)\).