Before time stepping, SetVelocityContext validates the session and builds reusable geometry
and mapping data. No XML extensions are introduced.
The cached objects include:
indexed gathers from the full velocity field to the restricted field;
per region, the extraction of the velocity from the velocity field, of its gradient from
the restricted field, and of the pressure from the pressure field, onto the boundary
quadrature points, each an MultiRegions::detail::PhysTraceExtractBndCond
(§28.4.2). The restricted list is built from an expansion-information map and
has no mesh graph, so the gradient extraction is given the mesh graph of the
velocity field. The pressure and velocity boundary expansions are checked with
ExpList::SameQuadratureLayout to have the same points and block layout,
whatever their orders, so the extracted fields pair with the normals and fb point
by point;
outward normals on each selected boundary region;
PhysDerivOp, pressure FwdTransBCOp, and velocity IProductWRTBaseOp instances;
compact boundary-coefficient maps, orientation signs, unique scatter targets, and grouped duplicate-target contributions.
For MPI partitions, an all-reduce ensures every rank participates in collective velocity-component assembly-map construction when any rank owns an HOutflow face. A rank with no local outlet coefficients then remains a valid no-op participant.