Metric Space

The MetricSpace object is the basis of curvilinear grids in turboWAVE. While DiscreteSpace provides topology and indexing, MetricSpace adds edge lengths, wall areas, and cell volumes, which define a specific grid geometry.

MetricSpace Object

struct MetricSpace : public DiscreteSpace

Subclassed by Simulation

Public Functions

void Resize(Task &task, const tw::vec3 &gcorner, const tw::vec3 &gsize, tw::Int ghostCellLayers = 2, tw::grid::geometry geo = tw::grid::cartesian)

Fully initialize object, may involve message passing. If there are warps they should be attached before calling. The task passed as the first argument must itself be initialized. The gsize should be the size of the hull assuming uniform spacing. It will be adjusted automatically to account for warps.

void AttachWarp(warp_base *w)

Argument will typically point to a ComputeTool. Do not update refCount since ultimately the Simulation object, which is derived from this object, owns the tool.