File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -154,13 +154,15 @@ On-demand variables
154
154
~~~~~~~~~~~~~~~~~~~
155
155
156
156
On-demand variables are like regular variables, except that their
157
- value is not intended to be computed systematically, e.g., at each
158
- time step of a simulation, but instead only at a given few
159
- times. These are declared using :func: `~xsimlab.on_demand ` and must
160
- implement in the same process-ified class a dedicated method that
161
- computes their value. They have always ``intent='out' ``.
162
-
163
- On-demand variables are useful, e.g., for model diagnostics.
157
+ value is not intended to be computed systematically, e.g., at the
158
+ beginning or at each time step of a simulation, but instead only at a
159
+ given few times (or not at all). These are declared using
160
+ :func: `~xsimlab.on_demand ` and must implement in the same
161
+ process-ified class a dedicated method -- i.e., decorated with
162
+ ``@foo.compute `` where ``foo `` is the name of the variable -- that
163
+ returns their value. They have always ``intent='out' ``.
164
+
165
+ On-demand variables are useful, e.g., for optional model diagnostics.
164
166
165
167
Simulation workflow
166
168
-------------------
You can’t perform that action at this time.
0 commit comments