From 2ea9bc5bfe361956caf3b5a945d595a9b5a3f8c9 Mon Sep 17 00:00:00 2001 From: sbrandt Date: Wed, 21 May 2014 16:00:29 +0000 Subject: Describe the setting of parameter arrays in the docs. git-svn-id: http://svn.cactuscode.org/flesh/trunk@5120 17b73243-c579-4c4c-a9d2-2d5706c11dac --- doc/UsersGuide.pdf | Bin 717550 -> 717855 bytes doc/UsersGuide/Notes.tex | 19 ++++++++++++++++++- doc/UsersGuide/UsersGuide.tex | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/UsersGuide.pdf b/doc/UsersGuide.pdf index 0ec09e8a..98f8ba46 100644 Binary files a/doc/UsersGuide.pdf and b/doc/UsersGuide.pdf differ diff --git a/doc/UsersGuide/Notes.tex b/doc/UsersGuide/Notes.tex index 4778c3e8..373bb155 100644 --- a/doc/UsersGuide/Notes.tex +++ b/doc/UsersGuide/Notes.tex @@ -1349,6 +1349,23 @@ Table~\ref{tab:expression_functions} lists the supported functions. Expressions can refer to parameters which are already set by using the fully qualified name \texttt{thorn::parameter} as described below. +Arrays of parameters can be set by including an integer expression inside +the square brackets following the name, e.g. \texttt{thorn::parameters[0]}. +Optionally, an array of parameters may be set by means of a comma delimted +list of values inside square brackets. E.g. the following two examples +are equivalent. + +Example 1: +\begin{verbatim} +thorn::parameters[0] = 4.8 +thorn::parameters[1] = 3.2 +\end{verbatim} + +Example 2: +\begin{verbatim} +thorn::parameters = [4.8, 3.2] +\end{verbatim} + The parameter parser knows about four types: integers, reals, booleans, and strings. The \verb|%| operator is applicable only to ints. In cases where this is clear, types will be converted, e.g. \verb|3.0| will convert to an integer, but not \verb|3.1|. @@ -1357,7 +1374,7 @@ in double quotes and make it a string. Please see the file \texttt{par.peg} in the directory \texttt{Cactus/src/piraha/pegs} for the full grammar describing the par file. -\begin{table} +\begin{table}[htbp] \begin{tabular}{|ll@{\hspace{.5cm}}|ll|} \hline \multicolumn{2}{|c|}{Logical operators} & \verb|+| & no-op\\ diff --git a/doc/UsersGuide/UsersGuide.tex b/doc/UsersGuide/UsersGuide.tex index 747cbe38..5f3b2cc3 100644 --- a/doc/UsersGuide/UsersGuide.tex +++ b/doc/UsersGuide/UsersGuide.tex @@ -23,7 +23,7 @@ citecolor=blue, urlcolor=blue ]{hyperref} - +\usepackage{verbatim} \usepackage{alltt} \newcommand{ \var }[1]{\textsl{\texttt{#1}}} -- cgit v1.2.3