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: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ SciMLBase = "1.88"
julia = "1.6"

[extras]
NeuralPDE = "315f7962-48a3-4962-8226-d0f33b1235f0"
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
MethodOfLines = "94925ecb-adb7-4558-8ed8-f975c56a0bf4"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
Expand All @@ -32,4 +33,4 @@ SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "MethodOfLines", "Lux", "NonlinearSolve", "OptimizationOptimJL", "SafeTestsets"]
test = ["Test", "MethodOfLines", "NeuralPDE", "Lux", "NonlinearSolve", "OptimizationOptimJL", "SafeTestsets"]
7 changes: 3 additions & 4 deletions test/neuralpde_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PSL = PDESystemLibrary
using NeuralPDE, Lux, OptimizationOptimJL

for ex in PSL.all_systems
@testset "Example with NeuralPDE.jl: $(ex.name)\n Equations: $(ex.eqs) \nBCs/ICs: $(ex.bcs)" begin
@testset "Example with NeuralPDE.jl: $(ex.name)" begin
dim = length(ex.ivs) # number of dimensions
N = 8 * dim
chain = Lux.Chain(Dense(dim, N, Lux.σ), Dense(N, N, Lux.σ), Dense(N, 1))
Expand All @@ -13,8 +13,7 @@ for ex in PSL.all_systems
dx = 0.05
discretization = PhysicsInformedNN(chain, GridTraining(dx))

@named pde_system = PDESystem(eq, bcs, domains, [x, y], [u(x, y)])
prob = discretize(pde_system, discretization)
prob = discretize(ex, discretization)

#Optimizer
opt = OptimizationOptimJL.BFGS()
Expand All @@ -25,7 +24,7 @@ for ex in PSL.all_systems
return false
end

res = Optimization.solve(prob, opt, callback = callback, maxiters = 1000)
res = Optimization.solve(prob, opt, callback = callback, maxiters = 400)
phi = discretization.phi
end
end
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ end

# TODO: fix this when NeuralPDE.jl can be added to the test environment. (compat with Symbolics.jl 5)

# if GROUP == "All" || GROUP == "NeuralPDE"
# @time @safetestset "Test against NeuralPDE.jl" begin include("neuralpde_test.jl") end
# end
if GROUP == "All" || GROUP == "NeuralPDE"
@time @safetestset "Test against NeuralPDE.jl" begin include("neuralpde_test.jl") end
end