Skip to content

Commit 0056bc3

Browse files
use 2-tuple in docs instead of Interval
1 parent 468a2ce commit 0056bc3

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

docs/src/systems/PDESystem.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,19 @@ PDESystem
3939

4040
Domains are specifying by saying `indepvar in domain`, where `indepvar` is a
4141
single or a collection of independent variables, and `domain` is the chosen
42-
domain type. Thus forms for the `indepvar` can be like:
42+
domain type. A 2-tuple can be used to indicate an `Interval`.
43+
Thus forms for the `indepvar` can be like:
4344

4445
```julia
45-
t Interval(0.0,1.0)
46+
t (0.0,1.0)
4647
(t,x) UnitDisk()
4748
[v,w,x,y,z] VectorUnitBall(5)
4849
```
4950

5051
#### Domain Types (WIP)
5152

52-
- `Interval(a,b)`: Defines the domain of an interval from `a` to `b`
53+
- `Interval(a,b)`: Defines the domain of an interval from `a` to `b` (requires explicit
54+
import from `DomainSets.jl`, but a 2-tuple can be used instead)
5355

5456
## `discretize` and `symbolic_discretize`
5557

src/systems/pde/pdesystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ bcs = [u(t,0) ~ 0.,# for all t > 0
2828
Dt(u(0,x)) ~ 0. ] #for all 0 < x < 1]
2929
3030
# Space and time domains
31-
domains = [t ∈ Interval(0.0,1.0),
32-
x ∈ Interval(0.0,1.0)]
31+
domains = [t ∈ (0.0,1.0),
32+
x ∈ (0.0,1.0)]
3333
3434
pde_system = PDESystem(eq,bcs,domains,[t,x],[u])
3535
```

test/pde.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ eq = Dt(u(t,x)) ~ Dxx(u(t,x))
99
bcs = [u(0,x) ~ - x * (x-1) * sin(x),
1010
u(t,0) ~ 0, u(t,1) ~ 0]
1111

12-
domains = [t Interval(0.0,1.0),
13-
x Interval(0.0,1.0)]
12+
domains = [t (0.0,1.0),
13+
x (0.0,1.0)]
1414

1515
pdesys = PDESystem(eq,bcs,domains,[t,x],[u])

0 commit comments

Comments
 (0)