Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ docs/site/
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml

# Mac
.DS_Store
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"

[compat]
Expand All @@ -26,6 +27,7 @@ julia = "1.6"
[extras]
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
MethodOfLines = "94925ecb-adb7-4558-8ed8-f975c56a0bf4"
NeuralPDE = "315f7962-48a3-4962-8226-d0f33b1235f0"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Expand Down
2 changes: 1 addition & 1 deletion lib/brusselator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function brusselator_2d()
tags = ["2D", "Brusselator", "Periodic", "Nonlinear", "Reaction", "Diffusion"]

@named bruss = PDESystem(eq, bcs, domains, [x, y, t], [u(x, y, t), v(x, y, t)],
analytic_func = analytic_func, metadata = tags)
analytic_func = analytic_func, metadata = tags, eval_module = @__MODULE__)

bruss
end
Expand Down
4 changes: 2 additions & 2 deletions lib/burgers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function inviscid_burgers_monotonic()
tags = ["1D", "Monotonic", "Inviscid", "Burgers", "Advection", "Dirichlet"]

@named inviscid_burgers_monotonic = PDESystem(eq, bcs, domains, [t, x], [u(t, x)];
analytic = analytic, metadata = tags)
analytic = analytic, metadata = tags, eval_module = @__MODULE__)

inviscid_burgers_monotonic
end
Expand Down Expand Up @@ -100,7 +100,7 @@ function burgers_2d()
tags = ["2D", "Non-Monotonic", "Viscous", "Burgers", "Advection", "Dirichlet"]

@named burgers_2d = PDESystem(eq, bcs, domains, [t, x, y], [u(x, y, t), v(x, y, t)],
analytic = analytic, metadata = tags)
analytic = analytic, metadata = tags, eval_module = @__MODULE__)

burgers_2d
end
Expand Down
2 changes: 1 addition & 1 deletion lib/general_linear_system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end
function build_with_tags(sys, tags)
eq, ic_bc, domain, indvars, depvars, analytic, name = sys
sys = PDESystem(eq, ic_bc, domain, indvars, depvars, name = name,
analytic = analytic, metadata = tags)
analytic = analytic, metadata = tags, eval_module = @__MODULE__)
return sys
end

Expand Down
8 changes: 4 additions & 4 deletions lib/linear_convection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function linear_convection_dirichlet2(f, ps, name = :linear_convection)

# PDE system
lin_conv = PDESystem(eq, bcs, domains, [t, x], [u(t, x)], [v => ps[1]],
analytic = u_exact, metadata = tags, name = name)
analytic = u_exact, metadata = tags, name = name, eval_module = @__MODULE__)

lin_conv
end
Expand Down Expand Up @@ -254,7 +254,7 @@ function linear_convection_dirichlet3(f, h, ps, name = :linear_convection)

# PDE system
lin_conv = PDESystem(eq, bcs, domains, [t, x], [u(t, x)], [v => ps[1]],
analytic = u_exact, metadata = tags, name = name)
analytic = u_exact, metadata = tags, name = name, eval_module = @__MODULE__)

lin_conv
end
Expand Down Expand Up @@ -397,7 +397,7 @@ function convection_diffusion(L, ps, name = :convection_diffusion)
# PDE system
convdiff = PDESystem(eq, bcs, domains, [t, z], [f(t, z)],
[k => ps[1], v => ps[2]], analytic_func = ref, metadata = tags,
name = name)
name = name, eval_module = @__MODULE__)

convdiff
end
Expand Down Expand Up @@ -459,7 +459,7 @@ function trans_sin()
# PDESystem

@named trans_sin = PDESystem(eqs, bcs, domains, [t, z], [u(t, z)], analytic = ref,
metadata = tags)
metadata = tags, eval_module = @__MODULE__)

trans_sin
end
4 changes: 2 additions & 2 deletions lib/linear_diffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function heat_1d1()
tags = ["1D", "Dirichlet", "Linear", "Diffusion", "Heat"]

@named heat_1d1 = PDESystem(eqs, bcs, domains, [t, x], [u(t, x)], [D => 1.0],
analytic = analytic, metadata = tags)
analytic = analytic, metadata = tags, eval_module = @__MODULE__)

heat_1d1
end
Expand Down Expand Up @@ -74,6 +74,6 @@ function heat_1d_neumann()
tags = ["1D", "Neumann", "Linear", "Diffusion", "Heat"]
# PDE system
@named pdesys = PDESystem(eq, bcs, domains, [t, x], [u(t, x)], analytic = analytic,
metadata = tags)
metadata = tags, eval_module = @__MODULE__)
end
push!(all_systems, heat_1d_neumann())
2 changes: 1 addition & 1 deletion lib/nonlinear_diffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function spherical_laplacian()

# PDE system
@named sph = PDESystem(eq, bcs, domains, [t, r], [u(t, r)], analytic = u_exact,
metadata = tags)
metadata = tags, eval_module = @__MODULE__)

sph
end
Expand Down
2 changes: 2 additions & 0 deletions src/PDESystemLibrary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module PDESystemLibrary
using ModelingToolkit, DomainSets
using OrdinaryDiffEq
using Interpolations
using RuntimeGeneratedFunctions

import SciMLBase

Expand All @@ -11,6 +12,7 @@ using Markdown
using Random

Random.seed!(100)
RuntimeGeneratedFunctions.init(@__MODULE__)

all_systems = []

Expand Down