Skip to content

Commit 8f78440

Browse files
Merge pull request #1908 from xtalax/varcard
Wildcard Arguments `@variables u(..)` documented
2 parents 79d6d89 + 3b8e647 commit 8f78440

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/src/basics/ContextualVariables.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ All modeling projects have some form of parameters. `@parameters` marks a variab
2020
as being the parameter of some system, which allows automatic detection algorithms
2121
to ignore such variables when attempting to find the states of a system.
2222

23+
## Wildcard Variable Arguments
24+
25+
```julia
26+
@variables u(..)
27+
```
28+
29+
It is possible to define a dependent variable which is an open function as above,
30+
for which its arguments must be specified each time it is used. This is useful with
31+
PDEs for example, where one may need to use `u(t, x)` in the equations, but will
32+
need to be able to write `u(t, 0.0)` to define a boundary condition at `x = 0`.
33+
2334
## Variable metadata [Experimental/TODO]
2435

2536
In many engineering systems some variables act like "flows" while others do not.

0 commit comments

Comments
 (0)