Variable Arrays

<< Click to Display Table of Contents >>

Navigation:  Problem Descriptor Reference > The Sections of a Descriptor > Variables >

Variable Arrays

Previous pageReturn to chapter overviewNext page

You may declare that a VARIABLE name represents an array of variables.  The format of a variable array declaration is:

variable_name = ARRAY [ number ]


This declaration tells FlexPDE that variable_name represents an array of variable quantities, each one a scalar field on the problem domain.  FlexPDE creates internal names for the elements of the array by subscripting variable_name with "_" and the element number (e.g. U_7).  You can access the components either by this internal name or by an indexed reference variable_name[index].


You may subsequently assign EQUATIONS and boundary conditions either to the individual components, or in a REPEAT loop by indexed reference.  Similarly, you can perform arithmetic operations or request graphical output of either the indexed array name, or by the individual component names.





   A = ARRAY[10]        { declares ten variables A_1 through A_10 }

                   { also accessible as  A[1] through A[10] }


See example problems:

Samples | Usage | Variable_Arrays | array_variables.pde