We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Periodic boundary conditions is not working.
When I run the following code
using NeuralPDE, Lux, ModelingToolkit, Optimization, OptimizationOptimisers, Random, Plots import ModelingToolkit: Interval @parameters x,y,t @variables u(..) L=1 tmax=1 domains = [x ∈ Interval(-L, +L), y ∈ Interval(-L, +L), t ∈ Interval(0, tmax)] Dx = Differential(x) Dy = Differential(y) Dxx = Differential(x)^2 Dyy = Differential(y)^2 Dtt = Differential(t)^2 eq=Dtt(u(x,y,t))~Dxx(u(x,y,t))+Dyy(u(x,y,t)) bcs=[u(x,y,0)~cos(x)*cosh(y),u(-L,y,t)~u(L,y,t),u(x,-L,t)~u(x,L,t), Dx(u(-L,y,t))~Dx(u(L,y,t)),Dy(u(x,-L,t))~Dy(u(x,L,t))] in=length(domains) n=9 chain = Lux.Chain(Dense(in, n, Lux.asinh), Dense(n, n, Lux.asinh),Dense(n, n, Lux.asinh), Dense(n, 1)) discretization = PhysicsInformedNN(chain, QuadratureTraining()) @named pdesystem = PDESystem(eq, bcs, domains, [x,y,t], [u(x,y,t)]) prob = discretize(pdesystem, discretization) sym_prob = symbolic_discretize(pdesystem, discretization) callback = function (p, l) println("loss: ", l) println(" pde: ", map(l_ -> l_(p), sym_prob.loss_functions.pde_loss_functions)) println(" bcs: ", map(l_ -> l_(p), sym_prob.loss_functions.bc_loss_functions)) println() return false end inter=200 res = Optimization.solve(prob, Adam(0.1); callback = callback, maxiters = inter)
I get output like:
loss: 13.413393568816456 pde: [0.5311505128711426] bcs: [12.882243055945313, 0.0, 0.0, 0.0, 0.0]
With the periodic conditions all zero.
The text was updated successfully, but these errors were encountered:
Symmetric conditions like: ,u(-x,y,t)~u(x,y,t),u(x,-y,t)~u(x,y,t) Does not work either.
,u(-x,y,t)~u(x,y,t),u(x,-y,t)~u(x,y,t)
Sorry, something went wrong.
No branches or pull requests
Periodic boundary conditions is not working.
When I run the following code
I get output like:
With the periodic conditions all zero.
The text was updated successfully, but these errors were encountered: