Skip to content

Commit 903a9dc

Browse files
Merge pull request #242 from SciML/update_doc_mtk_v5
Update docs MTK v5
2 parents af03988 + c5fb10c commit 903a9dc

File tree

10 files changed

+30
-31
lines changed

10 files changed

+30
-31
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ using NeuralPDE, Flux, ModelingToolkit, GalacticOptim, Optim, DiffEqFlux
3939

4040
@parameters x y
4141
@variables u(..)
42-
@derivatives Dxx''~x
43-
@derivatives Dyy''~y
42+
Dxx = Differential(x)^2
43+
Dyy = Differential(y)^2
4444

4545
# 2D PDE
4646
eq = Dxx(u(x,y)) + Dyy(u(x,y)) ~ -sin(pi*x)*sin(pi*y)
@@ -58,7 +58,7 @@ dx = 0.1
5858
dim = 2 # number of dimensions
5959
chain = FastChain(FastDense(dim,16,Flux.σ),FastDense(16,16,Flux.σ),FastDense(16,1))
6060

61-
discretization = PhysicsInformedNN(chain, GridTraining(dx=dx))
61+
discretization = PhysicsInformedNN(chain, GridTraining(dx))
6262

6363
pde_system = PDESystem(eq,bcs,domains,[x,y],[u])
6464
prob = discretize(pde_system,discretization)

docs/src/pinn/3D.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ with physics-informed neural networks.
1919
# 3D PDE
2020
@parameters x y t
2121
@variables u(..)
22-
@derivatives Dxx''~x
23-
@derivatives Dyy''~y
24-
@derivatives Dt'~t
22+
Dxx = Differential(x)^2
23+
Dyy = Differential(y)^2
24+
Dt = Differential(t)
2525

2626
# 3D PDE
2727
eq = Dt(u(x,y,t)) ~ Dxx(u(x,y,t)) + Dyy(u(x,y,t))

docs/src/pinn/3rd.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ with grid discretization `dx = 0.1`. We will use physics-informed neural network
99
```julia
1010
@parameters x
1111
@variables u(..)
12-
@derivatives Dxxx'''~x
13-
@derivatives Dx'~x
1412

13+
Dxxx = Differential(x)^3
14+
Dx = Differential(x)
1515
# ODE
1616
eq = Dxxx(u(x)) ~ cos(pi*x)
1717

docs/src/pinn/debugging.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ using NeuralPDE, ModelingToolkit, Flux, DiffEqFlux, Zygote
88
# 2d wave equation, neumann boundary condition
99
@parameters x, t
1010
@variables u(..)
11-
@derivatives Dxx''~x
12-
@derivatives Dtt''~t
13-
@derivatives Dt'~t
14-
11+
Dxx = Differential(x)^2
12+
Dtt = Differential(t)^2
13+
Dt = Differential(t)
1514
#2D PDE
1615
C=1
1716
eq = Dtt(u(x,t)) ~ C^2*Dxx(u(x,t))

docs/src/pinn/fp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ with Physics-Informed Neural Networks.
1818
# the example is taken from this article https://arxiv.org/abs/1910.10503
1919
@parameters x
2020
@variables p(..)
21-
@derivatives Dx'~x
22-
@derivatives Dxx''~x
21+
Dx = Differential(x)
22+
Dxx = Differential(x)^2
2323

2424
#2D PDE
2525
α = 0.3

docs/src/pinn/ks.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ with physics-informed neural networks.
1313
```julia
1414
@parameters x, t
1515
@variables u(..)
16-
@derivatives Dt'~t
17-
@derivatives Dx'~x
18-
@derivatives Dx2''~x
19-
@derivatives Dx3'''~x
20-
@derivatives Dx4''''~x
16+
Dt = Differential(t)
17+
Dx = Differential(x)
18+
Dx2 = Differential(x)^2
19+
Dx3 = Differential(x)^3
20+
Dx4 = Differential(x)^4
2121

2222
α = 1
2323
β = 4

docs/src/pinn/low_level.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ with Physics-Informed Neural Networks. Here is an example of using the low-level
99
```julia
1010
@parameters t, x
1111
@variables u(..)
12-
@derivatives Dt'~t
13-
@derivatives Dx'~x
14-
@derivatives Dxx''~x
12+
Dt = Differential(t)
13+
Dx = Differential(x)
14+
Dxx = Differential(x)^2
1515

1616
#2D PDE
1717
eq = Dt(u(t,x)) + u(t,x)*Dx(u(t,x)) - (0.01/pi)*Dxx(u(t,x)) ~ 0

docs/src/pinn/poisson.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ using NeuralPDE, Flux, ModelingToolkit, GalacticOptim, Optim, DiffEqFlux
2121
using Plots
2222
@parameters x y
2323
@variables u(..)
24-
@derivatives Dxx''~x
25-
@derivatives Dyy''~y
24+
Dxx = Differential(x)^2
25+
Dyy = Differential(y)^2
2626

2727
# 2D PDE
2828
eq = Dxx(u(x,y)) + Dyy(u(x,y)) ~ -sin(pi*x)*sin(pi*y)

docs/src/pinn/system.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ with physics-informed neural networks.
1717
```julia
1818
@parameters t, x
1919
@variables u1(..), u2(..), u3(..)
20-
@derivatives Dt'~t
21-
@derivatives Dtt''~t
22-
@derivatives Dx'~x
23-
@derivatives Dxx''~x
20+
Dt = Differential(t)
21+
Dtt = Differential(t)^2
22+
Dx = Differential(x)
23+
Dxx = Differential(x)^2
2424

2525
eqs = [Dtt(u1(t,x)) ~ Dxx(u1(t,x)) + u3(t,x)*sin(pi*x),
2626
Dtt(u2(t,x)) ~ Dxx(u2(t,x)) + u3(t,x)*cos(pi*x),

docs/src/pinn/wave.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Further, the solution of this equation with the given boundary conditions is pre
1212
```julia
1313
@parameters t, x
1414
@variables u(..)
15-
@derivatives Dxx''~x
16-
@derivatives Dtt''~t
17-
@derivatives Dt'~t
15+
Dxx = Differential(x)^2
16+
Dtt = Differential(t)^2
17+
Dt = Differential(t)
1818

1919
#2D PDE
2020
C=1

0 commit comments

Comments
 (0)