phipict.meshing.shapes

Single blocks from corners, edges, resolution and grading.

Each builder returns a discretised MeshBlock:

pm.make_box((0, -1), (10, 1), cells=(128, 64), grading=(None, pm.Symmetric(20)))
pm.make_quad(corners, cells=(32, 16),
             edges=pm.QuadEdges(y_minus=pm.Arc(center=(0, 0))))
pm.make_annulus((0, 0), 0.5, 1.0, start_angle=135, angle=-90, cells=(24, None))

Corners are listed in the solver’s order, x fastest: (-x-y, +x-y, -x+y, +x+y) in 2D, followed by the same four at +z in 3D. Each axis takes a number of cells and a grading (a Grading, a number for Simple, or None for uniform). An edge may override the grading of its axis and have a curved shape; Points edges fix their vertices, and with them the number of cells of their axis.

Functions

annulus_radial_weights(r_inner, r_outer, ...)

Radial vertex distribution of PICT's make_torus_2D.

build_block(corners, cells, grading, edges)

Discretise a block given by corners and per-edge descriptions.

discretize_edges(corners, cells, gradings, edges)

Points and parameter weights of every edge, [axis][e].

hex_edges(edges)

[axis][e] edges of a 3D block from corner-indexed edges.

make_annulus(center, r_inner, r_outer, ...)

A 2D ring segment; x runs along the angle, y outwards along the radius.

make_box(lower, upper, cells[, grading, ...])

An axis-aligned 2D or 3D block.

make_hexa(corners, cells[, grading, edges, ...])

A 3D block from eight corners and optional curved edges.

make_quad(corners, cells[, grading, edges, ...])

A 2D block from four corners and optional curved edges.

resolve_cells(cells, gradings, edges)

Cells per axis, taking fixed counts of points and explicit gradings.

Classes

CornerEdge(start, end, edge)

An edge of a 3D block between two of its corners.

Edge([shape, grading])

An edge with its own shape and/or grading.

Interpolation(*values)

How the interior vertices of a 2D block follow from its edges.

QuadEdges([x_minus, x_plus, y_minus, y_plus])

The four edges of a 2D block, named by the face they form.