-
-
Notifications
You must be signed in to change notification settings - Fork 74
Incorrect boundary padded vector with composed PeriodicBC on 2d data #514
Comments
I will take a look at this |
In the meantime, you should be aware that MethodOfLines.jl now has support for periodic BCs. If this doesn't help you solve your problem we'd love to know why. |
There's something strange going on, here the first testset passes, wheras the second testset displays the issue you described though both contain periodic BCs |
Thanks @xtalax , I'll have a look at MethodOfLines.jl
But it looks like it's not returning a correctly padded data. I'm not sure if I understand this line: BCx = vcat(fill(q1, div(m,2)), fill(q2, m-div(m,2))) #The size of BCx has to be all size components *except* for x
BCy = vcat(fill(q2, div(n,2)), fill(q1, n-div(n,2))) Why is it not, BCx = fill(q1,m)
BCy = fill(q2,n) But, even in the latter case, it gives me wrong results when I use PeriodicBC in both dims, but strangely gives me correct padding when I use a combination of PeriodicBC (along one dim) and Dirichlet/Neumann/RobinBC (for the other dim). |
This was to test the constructor which supports different bcs along a boundary to facilitate space dependant robin.
How are you applying the BCs, with |
yes, like in the test BCx = fill(q1,m)
BCy = fill(q2,n)
Qx = MultiDimBC{1}(BCx)
Qy = MultiDimBC{2}(BCy)
Q = compose(BCx,BCy) |
I'm trying to pad my vector u using the boundary condition operator Q.
It works fine for 1d data, but gives me incorrect padded vector for 2d data when I use PeriodicBC.
Code for reproduction
1-D
2-D
But, when I use PeriodicBC,
I get a padded data as shown in the left plot below, but I expect to get the one shown in the right,
Am I doing something wrong in composing the BC's in 2-D?
The text was updated successfully, but these errors were encountered: