Skip to content

Commit

Permalink
update create_bcs
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillZubov committed Sep 22, 2021
1 parent 7da751b commit 087c775
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/src/pinn/neural_adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ domains_map = map(xs_domain) do (xs_dom)
end

analytic_sol_func(x,y) = (sin(pi*x)*sin(pi*y))/(2pi^2)
function create_bcs(bcs,x_domain_,phi_bound)
function create_bcs(x_domain_,phi_bound)
x_0, x_e = x_domain_.left, x_domain_.right
if x_0 == 0.0
bcs = [u(0,y) ~ 0.0,
Expand All @@ -170,7 +170,7 @@ for i in 1:count_decomp
phi_in(cord) = phis[i-1](cord,reses[i-1].minimizer)
phi_bound(x,y) = phi_in(vcat(x,y))
@register phi_bound(x,y)
bcs_ = create_bcs(bcs,domains_[1].domain, phi_bound)
bcs_ = create_bcs(domains_[1].domain, phi_bound)
@named pde_system_ = PDESystem(eq, bcs_, domains_, [x, y], [u(x, y)])
push!(pde_system_map,pde_system_)
strategy = NeuralPDE.GridTraining([0.1/count_decomp, 0.1])
Expand Down
4 changes: 2 additions & 2 deletions test/neural_adapter_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ domains_map = map(xs_domain) do (xs_dom)
end

analytic_sol_func(x,y) = (sin(pi*x)*sin(pi*y))/(2pi^2)
function create_bcs(bcs,x_domain_,phi_bound)
function create_bcs(x_domain_,phi_bound)
x_0, x_e = x_domain_.left, x_domain_.right
if x_0 == 0.0
bcs = [u(0,y) ~ 0.0,
Expand All @@ -196,7 +196,7 @@ for i in 1:count_decomp
# phi_bound(x,y) = if (x isa Matrix) phi_in(vcat(x, fill(y,size(x)))) else phi_in(vcat(fill(x,size(y)),y)) end
phi_bound(x,y) = phi_in(vcat(x,y))
@register phi_bound(x,y)
bcs_ = create_bcs(bcs,domains_[1].domain, phi_bound)
bcs_ = create_bcs(domains_[1].domain, phi_bound)
@named pde_system_ = PDESystem(eq, bcs_, domains_, [x, y], [u(x,y)])
push!(pde_system_map,pde_system_)
strategy = NeuralPDE.GridTraining([0.1/count_decomp, 0.1])
Expand Down

0 comments on commit 087c775

Please sign in to comment.