next up previous
Next: Loop Driver Up: Program Structure Previous: Residuals

Initializations

 

An initialization defines the initial data for a grid function. Its form is identical to the residual declaration with residual replaced by initialize. However the expression is interpreted differently. Consider the following initialization declaration:

initialize phi { [1:Nr] := amp*exp(-((r-c)/delta)^2) }

Unlike the residual declaration, the expression in the initialization must not contain its grid function. The retarded time level of the grid function is set to the expression. In the case above, phi will be set to a Gaussian.



Robert Marsa
Thu Jun 1 09:34:30 CDT 1995