Journal of Computational Physics 1997, 138, 981-990
The LASY Preprocessor and its Application to
General Multi-Dimensional Codes
Sterrenkundig Instituut, Utrecht, The Netherlands
A new preprocessor using the Loop Annotation Syntax is described.
One of the possible applications of this syntax is writing a general simulation
code where the number of grid dimensions is a parameter of the preprocessor.
Programming language constructs, which would be normally repeated for each
dimensions separately, are annotated as loops in the syntax, and these loops
can be expanded by the preprocessor. The preprocessor overcomes some of the
inherent limitations of most computer languages, such as the fixed number
of indices for arrays. In general the typical expressions used in
multi-dimensional simulation codes can be written in a way that is more
concise and less prone to error.
The preprocessor is implemented in the Perl language which is available for
almost all operating systems.