Definition:Stencil

From ProofWiki
Jump to navigation Jump to search



Definition

A quintuple $\tuple {X, S_X, \map S 0, \Delta, \delta}$ defines a stencil if and only if:

\((1)\)   $:$   Index Domain:    $X$ is discrete: $X \subseteq \Z^{\size X}$ and of finite dimension: $\size X \in \N$      
\((2)\)   $:$   State Range:    $S_X$ is a well-defined set      
\((3)\)   $:$   Initial State:    $\map S 0$ maps from index space to state space $\map S 0: X \to S_X$      
\((4)\)   $:$   Neighbourhood Delta:    $\Delta$ is a vector of index offsets: $\Delta \in \paren {\Z^{\size X} }^{\size \Delta}$      
\((5)\)   $:$   Transition Combinator:    $\delta$ is a mapping $\delta: S_X^{\size \Delta} \to S_X$ from neighbourhood states to states      



By means of the update sweep $\forall \vec x \in X: \map {\map S {n + 1} } {\vec x} = \ds \map \delta {\prod_{i \mathop = 1}^{\size \Delta} \map {\map S n} {\vec x + \Delta_i} }$ this induces a stencil evolution $\N \ni n \mapsto \map S n \in \paren {X \to S_X}$ from the initial state $\map S 0$.