http://jdj.mit.edu/wiki/index.php?title=Libctl_Basic_User_Experience&action=history&feed=atomLibctl Basic User Experience - Revision history2024-03-29T15:43:48ZRevision history for this page on the wikiMediaWiki 1.7.3http://jdj.mit.edu/wiki/index.php?title=Libctl_Basic_User_Experience&diff=1953&oldid=prevStevenj: /* What Do I Enter? */2005-10-16T00:02:25Z<p><span class="autocomment">What Do I Enter?</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 00:02, 16 October 2005</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 69:</strong></td>
<td colspan="2" align="left"><strong>Line 69:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">We have snuck in another feature here: <code>(define ''new-variable'' ''value'')</code> is a way of defining new variables for our own use in the control file. (This and other features of the Scheme language are discussed in the next section.)</td><td> </td><td style="background: #eee; font-size: smaller;">We have snuck in another feature here: <code>(define ''new-variable'' ''value'')</code> is a way of defining new variables for our own use in the control file. (This and other features of the Scheme language are discussed in the next section.)</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">== What <span style="color: red; font-weight: bold;">Do </span>I <span style="color: red; font-weight: bold;">Enter</span>? ==</td><td>+</td><td style="background: #cfc; font-size: smaller;">== What <span style="color: red; font-weight: bold;">do </span>I <span style="color: red; font-weight: bold;">enter</span>? ==</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">Every program will have a different set of variables that it expects you to set, and a different set of classes with different properties. Whatever program you are using should come with documentation saying what it expects.</td><td> </td><td style="background: #eee; font-size: smaller;">Every program will have a different set of variables that it expects you to set, and a different set of classes with different properties. Whatever program you are using should come with documentation saying what it expects.</td></tr>
</table>
Stevenjhttp://jdj.mit.edu/wiki/index.php?title=Libctl_Basic_User_Experience&diff=135&oldid=prevStevenj: /* Structured Data Types */2005-10-16T00:02:10Z<p><span class="autocomment">Structured Data Types</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 00:02, 16 October 2005</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 43:</strong></td>
<td colspan="2" align="left"><strong>Line 43:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">Here, <code>''program''</code> is the name of the simulation program executable and ''ctl-files'' are any ctl files that you want to use for the run. The result is as if all the ''ctl-files'' were concatenated, in sequence, into a single file.</td><td> </td><td style="background: #eee; font-size: smaller;">Here, <code>''program''</code> is the name of the simulation program executable and ''ctl-files'' are any ctl files that you want to use for the run. The result is as if all the ''ctl-files'' were concatenated, in sequence, into a single file.</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">== Structured <span style="color: red; font-weight: bold;">Data Types </span>==</td><td>+</td><td style="background: #cfc; font-size: smaller;">== Structured <span style="color: red; font-weight: bold;">data types </span>==</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">For many programs, it is useful to structure the input into more complicated data types than simple numbers, vectors, and lists. For example, an electromagnetic simulation might take as input a list of geometric objects specifying the dielectric structure. Each object might have several parameters--for example, a sphere might have a radius, a center, and a dielectric constant.</td><td> </td><td style="background: #eee; font-size: smaller;">For many programs, it is useful to structure the input into more complicated data types than simple numbers, vectors, and lists. For example, an electromagnetic simulation might take as input a list of geometric objects specifying the dielectric structure. Each object might have several parameters--for example, a sphere might have a radius, a center, and a dielectric constant.</td></tr>
</table>
Stevenjhttp://jdj.mit.edu/wiki/index.php?title=Libctl_Basic_User_Experience&diff=134&oldid=prevStevenj: /* What Do I Enter? */2005-10-15T23:50:29Z<p><span class="autocomment">What Do I Enter?</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 23:50, 15 October 2005</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 112:</strong></td>
<td colspan="2" align="left"><strong>Line 112:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">You should also notice that the class <code>geometric-object</code> is listed as a part of the classes <code>block</code> and <code>sphere</code>. These two classes are '''subclasses''' of <code>geometric-object</code>. A subclass inherits the property list of its superclass and can be used any place its superclass is allowed. So, for example, both spheres and blocks can be used in the <code>geometry</code> list, which is formally a list of geometric-objects. (The astute reader will notice the object-oriented-programming origins of our class concept; our classes, however, differ from OOP in that they have no methods.)</td><td> </td><td style="background: #eee; font-size: smaller;">You should also notice that the class <code>geometric-object</code> is listed as a part of the classes <code>block</code> and <code>sphere</code>. These two classes are '''subclasses''' of <code>geometric-object</code>. A subclass inherits the property list of its superclass and can be used any place its superclass is allowed. So, for example, both spheres and blocks can be used in the <code>geometry</code> list, which is formally a list of geometric-objects. (The astute reader will notice the object-oriented-programming origins of our class concept; our classes, however, differ from OOP in that they have no methods.)</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"><span style="color: red; font-weight: bold;">{{</span>Category:libctl<span style="color: red; font-weight: bold;">}}</span></td><td>+</td><td style="background: #cfc; font-size: smaller;"><span style="color: red; font-weight: bold;">[[</span>Category:libctl<span style="color: red; font-weight: bold;">]]</span></td></tr>
</table>
Stevenjhttp://jdj.mit.edu/wiki/index.php?title=Libctl_Basic_User_Experience&diff=113&oldid=prevStevenj: /* A fictitious example */2005-10-15T23:33:06Z<p><span class="autocomment">A fictitious example</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 23:33, 15 October 2005</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 14:</strong></td>
<td colspan="2" align="left"><strong>Line 14:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (set-param! grid-size 128)</td><td> </td><td style="background: #eee; font-size: smaller;"> (set-param! grid-size 128)</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">which works exactly like <code>set!</code> except that now <code>grid-size</code> can be overridden from the command-line. For this reason, <code>set-param!</code> (a libctl extension to Scheme) is usually preferred.</td><td>+</td><td style="background: #cfc; font-size: smaller;">which works exactly like <code>set!</code> except that now <code>grid-size</code> can be overridden from the command-line. For this reason, <code>set-param!</code> (a libctl extension to Scheme) is usually preferred. <span style="color: red; font-weight: bold;"> (See also [[libctl Advanced User Experience#Command-line parameters|Command-line parameters]].)</span></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">Settings of input variables can appear in any order at all in the file. They can even be omitted completely in many cases, and a reasonable default will be used. Variables can be of many different types, including integers, real numbers, boolean values (<code>true</code> and <code>false</code>), strings, 3-vectors, and lists. Here is how we might set some parameters of various types:</td><td> </td><td style="background: #eee; font-size: smaller;">Settings of input variables can appear in any order at all in the file. They can even be omitted completely in many cases, and a reasonable default will be used. Variables can be of many different types, including integers, real numbers, boolean values (<code>true</code> and <code>false</code>), strings, 3-vectors, and lists. Here is how we might set some parameters of various types:</td></tr>
</table>
Stevenjhttp://jdj.mit.edu/wiki/index.php?title=Libctl_Basic_User_Experience&diff=98&oldid=prevStevenj: /* A fictitious example */2005-10-15T23:25:39Z<p><span class="autocomment">A fictitious example</span></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 23:25, 15 October 2005</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 10:</strong></td>
<td colspan="2" align="left"><strong>Line 10:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (set! grid-size 128)</td><td> </td><td style="background: #eee; font-size: smaller;"> (set! grid-size 128)</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">All input variable settings follow the format <code>(set! ''variable'' ''value'')</code>. The parentheses are important, but white space is ignored. Alternatively, we can use:</td><td>+</td><td style="background: #cfc; font-size: smaller;">All input variable settings <span style="color: red; font-weight: bold;">can </span>follow the format <code>(set! ''variable'' ''value'')</code>. The parentheses are important, but white space is ignored. Alternatively, we can use:</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (set-param! grid-size 128)</td><td> </td><td style="background: #eee; font-size: smaller;"> (set-param! grid-size 128)</td></tr>
</table>
Stevenjhttp://jdj.mit.edu/wiki/index.php?title=Libctl_Basic_User_Experience&diff=93&oldid=prevStevenj at 23:24, 15 October 20052005-10-15T23:24:56Z<p></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 23:24, 15 October 2005</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 1:</strong></td>
<td colspan="2" align="left"><strong>Line 1:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">{{libctl}}</td><td> </td><td style="background: #eee; font-size: smaller;">{{libctl}}</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">At their most basic level, '''ctl''' files are simply a collection of values for parameters required by the simulation.</td><td> </td><td style="background: #eee; font-size: smaller;">At their most basic level, '''ctl''' files are simply a collection of values for parameters required by the simulation.</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">The ctl syntax for all programs using libctl is similar, although the specific parameters needed will vary. The following examples are given for a fictitious libctl-using program, in order to illustrate its general style.</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">== A fictitious example ==</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">For example, suppose that the simulation solves a one-dimensional differential equation and requires an input called "grid-size" specifying the number of grid points used in the discretization of the problem. We might specify this in a ctl file by the statement:</td><td> </td><td style="background: #eee; font-size: smaller;">For example, suppose that the simulation solves a one-dimensional differential equation and requires an input called "grid-size" specifying the number of grid points used in the discretization of the problem. We might specify this in a ctl file by the statement:</td></tr>
<tr><td colspan="2" align="left"><strong>Line 6:</strong></td>
<td colspan="2" align="left"><strong>Line 10:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (set! grid-size 128)</td><td> </td><td style="background: #eee; font-size: smaller;"> (set! grid-size 128)</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">All input variable settings follow the format <code>(set! ''variable'' ''value'')</code>. The parentheses are important, but white space is ignored.</td><td>+</td><td style="background: #cfc; font-size: smaller;">All input variable settings follow the format <code>(set! ''variable'' ''value'')</code>. The parentheses are important, but white space is ignored<span style="color: red; font-weight: bold;">. Alternatively, we can use:</span></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"><span style="color: red; font-weight: bold;"> (set-param! grid-size 128)</span></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"><span style="color: red; font-weight: bold;">which works exactly like <code>set!</code> except that now <code>grid-size</code> can be overridden from the command-line. For this reason, <code>set-param!</code> (a libctl extension to Scheme) is usually preferred</span>.</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">Settings of input variables can appear in any order at all in the file. They can even be omitted completely in many cases, and a reasonable default will be used. Variables can be of many different types, including integers, real numbers, boolean values (<code>true</code> and <code>false</code>), strings, 3-vectors, and lists. Here is how we might set some parameters of various types:</td><td> </td><td style="background: #eee; font-size: smaller;">Settings of input variables can appear in any order at all in the file. They can even be omitted completely in many cases, and a reasonable default will be used. Variables can be of many different types, including integers, real numbers, boolean values (<code>true</code> and <code>false</code>), strings, 3-vectors, and lists. Here is how we might set some parameters of various types:</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"> (set! time-step-dt 0.01) ; a real number</td><td>+</td><td style="background: #cfc; font-size: smaller;"> (set<span style="color: red; font-weight: bold;">-param</span>! time-step-dt 0.01) ; a real number</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"> (set! output-file-name</td><td>+</td><td style="background: #cfc; font-size: smaller;"> (set<span style="color: red; font-weight: bold;">-param</span>! output-file-name "data.hdf") ; a string</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"><span style="color: red; font-weight: bold;"> </span>"data.hdf") ; a string</td><td>+</td><td style="background: #cfc; font-size: smaller;"> (set<span style="color: red; font-weight: bold;">-param</span>! propagation-direction (vector3 0 0.2 7)) ; a 3-vector</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"> (set! propagation-direction (vector3 0 0.2 7)) ; a 3-vector</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (set! output-on-time-steps ; a list of integers...</td><td> </td><td style="background: #eee; font-size: smaller;"> (set! output-on-time-steps ; a list of integers...</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (list 25 1000</td><td> </td><td style="background: #eee; font-size: smaller;"> (list 25 1000</td></tr>
<tr><td colspan="2" align="left"><strong>Line 22:</strong></td>
<td colspan="2" align="left"><strong>Line 29:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">3-vectors are constructed using <code>(vector3 ''x [y [z]]'')</code>. If the ''y'' or ''z'' components are omitted, they are set to zero. Lists may contain any number of items (including zero items), and are constructed with <code>(list ''[item1 item2 ...]'')</code>.</td><td> </td><td style="background: #eee; font-size: smaller;">3-vectors are constructed using <code>(vector3 ''x [y [z]]'')</code>. If the ''y'' or ''z'' components are omitted, they are set to zero. Lists may contain any number of items (including zero items), and are constructed with <code>(list ''[item1 item2 ...]'')</code>.</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;">A typical control file is terminated with a single statement:</td><td>+</td><td style="background: #cfc; font-size: smaller;">A typical control file is terminated with a single statement<span style="color: red; font-weight: bold;">, something like</span>:</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (run) ; run the computation</td><td> </td><td style="background: #eee; font-size: smaller;"> (run) ; run the computation</td></tr>
</table>
Stevenjhttp://jdj.mit.edu/wiki/index.php?title=Libctl_Basic_User_Experience&diff=92&oldid=prevStevenj at 23:19, 15 October 20052005-10-15T23:19:28Z<p></p>
<p><b>New page</b></p><div>{{libctl}}<br />
At their most basic level, '''ctl''' files are simply a collection of values for parameters required by the simulation.<br />
<br />
For example, suppose that the simulation solves a one-dimensional differential equation and requires an input called "grid-size" specifying the number of grid points used in the discretization of the problem. We might specify this in a ctl file by the statement:<br />
<br />
(set! grid-size 128)<br />
<br />
All input variable settings follow the format <code>(set! ''variable'' ''value'')</code>. The parentheses are important, but white space is ignored.<br />
<br />
Settings of input variables can appear in any order at all in the file. They can even be omitted completely in many cases, and a reasonable default will be used. Variables can be of many different types, including integers, real numbers, boolean values (<code>true</code> and <code>false</code>), strings, 3-vectors, and lists. Here is how we might set some parameters of various types:<br />
<br />
(set! time-step-dt 0.01) ; a real number<br />
(set! output-file-name<br />
"data.hdf") ; a string<br />
(set! propagation-direction (vector3 0 0.2 7)) ; a 3-vector<br />
(set! output-on-time-steps ; a list of integers...<br />
(list 25 1000<br />
257 128 4096))<br />
<br />
Everything appearing on a line after a semicolon (";") is a '''comment''' and is ignored. Note also that we are free to split inputs over several lines--as we mentioned earlier, white space is ignored.<br />
<br />
3-vectors are constructed using <code>(vector3 ''x [y [z]]'')</code>. If the ''y'' or ''z'' components are omitted, they are set to zero. Lists may contain any number of items (including zero items), and are constructed with <code>(list ''[item1 item2 ...]'')</code>.<br />
<br />
A typical control file is terminated with a single statement:<br />
<br />
(run) ; run the computation<br />
<br />
This tells the program to run its computation with whatever parameter values have been specified up to the point of the <code>(run)</code>. This command can actually appear multiple times in the ctl file, causing multiple runs, or not at all, which drops the user into an interactive mode that we will discuss later.<br />
<br />
== Running a simulation ==<br />
<br />
The user runs the simulation program simply by:<br />
<br />
''program'' ''ctl-files''<br />
<br />
Here, <code>''program''</code> is the name of the simulation program executable and ''ctl-files'' are any ctl files that you want to use for the run. The result is as if all the ''ctl-files'' were concatenated, in sequence, into a single file.<br />
<br />
== Structured Data Types ==<br />
<br />
For many programs, it is useful to structure the input into more complicated data types than simple numbers, vectors, and lists. For example, an electromagnetic simulation might take as input a list of geometric objects specifying the dielectric structure. Each object might have several parameters--for example, a sphere might have a radius, a center, and a dielectric constant.<br />
<br />
libctl allows programs to specify structured datatypes, called '''classes''', that have various properties which may be set. Here is what a list of geometric objects for a dielectric structure might look like:<br />
<br />
(set! geometry<br />
(list<br />
(make sphere (epsilon 2.8) (center 0 0 1) (radius 0.3))<br />
(make block (epsilon 1.7) (center 0 0 1) (size 1 3.5 2)))) <br />
<br />
In this case, the list consists of two objects of classes called <code>sphere</code> and <code>block</code>. The general format for constructing an object (instance of a class) is <code>(make ''class'' ''properties'')</code>. ''Properties'' is a sequence of <code>(''property'' ''value'')</code> items setting the properties of the object.<br />
<br />
Properties may have default values that they assume if nothing is specified. For example, the <code>block</code> class might have properties <code>e1</code>, <code>e2</code>, and <code>e3</code> that specify the directions of the block edges, but which default to the coordinate axes if they are not specified. Typically, each class will have some properties that have defaults, and some that you are required to specify.<br />
<br />
Property values can be any of the primitive types mentioned earlier, but they can also be other objects. For example, instead of specifying a dielectric constant, you might instead supply an object describing the material type:<br />
<br />
(define Si (make material-type (epsilon 11.56)))<br />
(define SiO2 (make material-type (epsilon 2.1)))<br />
(set! geometry<br />
(list<br />
(make sphere (material Si) (center 0 0 1) (radius 0.3))<br />
(make block (material SiO2) (center 0 0 1) (size 1 3.5 2)))) <br />
<br />
We have snuck in another feature here: <code>(define ''new-variable'' ''value'')</code> is a way of defining new variables for our own use in the control file. (This and other features of the Scheme language are discussed in the next section.)<br />
<br />
== What Do I Enter? ==<br />
<br />
Every program will have a different set of variables that it expects you to set, and a different set of classes with different properties. Whatever program you are using should come with documentation saying what it expects.<br />
<br />
You can also get the program to print out help by inserting the <code>(help)</code> command in your ctl file, or by entering it in [advanced-user.html#interactive interactive mode]. You can also simply enter the following command in your shell:<br />
<br />
echo "(help)" | ''program''<br />
<br />
For example, the output of <code>(help)</code> in the electromagnetic simulation we have been using in our examples might look like:<br />
<br />
Class block:<br />
Class geometric-object:<br />
material-type material<br />
vector3 center<br />
vector3 e1 = #(1 0 0)<br />
vector3 e2 = #(0 1 0)<br />
vector3 e3 = #(0 0 1)<br />
vector3 size<br />
Class sphere:<br />
Class geometric-object:<br />
material-type material<br />
vector3 center<br />
number radius<br />
Class geometric-object:<br />
material-type material<br />
vector3 center<br />
Class material-type:<br />
number epsilon<br />
number conductivity = 0.0<br />
<br />
Input variables:<br />
vector3 list k-points = ()<br />
geometric-object list geometry = ()<br />
integer dimensions = 3<br />
<br />
Output variables:<br />
number list gaps = ()<br />
number mean-dielectric = 0.0<br />
<br />
As can be seen from above, the help output lists all of the classes and their properties, along with the input and output variables (the latter will be described later). Any default values for properties are also given. Along with each variable or property is given its type.<br />
<br />
You should also notice that the class <code>geometric-object</code> is listed as a part of the classes <code>block</code> and <code>sphere</code>. These two classes are '''subclasses''' of <code>geometric-object</code>. A subclass inherits the property list of its superclass and can be used any place its superclass is allowed. So, for example, both spheres and blocks can be used in the <code>geometry</code> list, which is formally a list of geometric-objects. (The astute reader will notice the object-oriented-programming origins of our class concept; our classes, however, differ from OOP in that they have no methods.)<br />
<br />
{{Category:libctl}}</div>Stevenj