Dynamic Space

The DynSpace object inherits from StaticSpace, adding elements related to evolving mesh quantities, most notably “moving windows.”

DynSpace Object

struct DynSpace : public StaticSpace

This object adds dynamical quantities to StaticSpace, but stops short of adding metric information. An important task is to track the way fixed reference points move relative to StaticSpace.

Subclassed by MetricSpace

Public Functions

DynSpace()

Create an empty DynSpace, the normal pattern is to do this and then Resize.

DynSpace(const tw::node5 &dim, const tw::vec4 &corner, const tw::vec4 &size, const tw::node5 &packing, const tw::node4 &ghostCellLayers)

Create a DynSpace with a single time node and purely local coordinates.

void Resize(Task *task, const tw::node5 &gdim, const tw::vec4 &gcorner, const tw::vec4 &gsize, const tw::node5 &packing, const tw::node4 &ghostCellLayers)

Change the topology and coordinates: gdim, gcorner, and gsize describe global window that exists in distributed memory at any one time, as distinct from the union of all windows that occur during the system evolution. This makes MPI calls on task to get the domain information.

tw::Int Advance(tw::Float ds)

move the grid in time, space, or both, return value of -1 means caller should shift grid left (anti-moving window), 0 means do nothing, 1 means shift grid right (moving window).

inline void ToStartingWindow(tw::vec4 *v) const

take vector known in the current window and translate the spatial part to the starting window, i.e., this applies a Galilean transformation that aligns to the relative mesh nodes

inline void FromStartingWindow(tw::vec4 *v) const

take vector known in the starting window and translate the spatial part to the current window, i.e., this applies a Galilean transformation that aligns to the absolute mesh nodes

Protected Attributes

tw::vec4 solutionVelocity

There is a marker in the inertial frame, this is its velocity. Ordinary initial value problems will have (1,0,0,0), while “moving windows” will have (1,0,0,1).

tw::vec4 solutionPosition

There is a marker in the inertial frame, this is its position. The marker will not in general be in perfect synchronism with the window.

tw::vec4 windowPosition

the actual position of the computational window

tw::vec4 maxWindowPosition

used to determine when simulation should stop

tw::vec4 corner

position where all coordinates are minimized on the local domain

tw::vec4 size

length of the local domain along each axis

tw::vec4 globalCorner

position where all coordinates are minimized on the global domain

tw::vec4 globalSize

length of the global domain along each axis

tw::vec4 min_spacing

minimum spacing to use for adaptive grids (including time levels)

tw::vec4 max_spacing

maximum spacing to use for adaptive grids (including time levels)

tw::vec4 critical_spacing

threshold that triggers some action when we have an adaptive grid

tw::node4 lowSideCells

number of interior cells along the given axis, summed over all domains on the low-side of this domain

tw::node4 globalCells

number of interior cells along the given axis, summed over all domains