Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Incorrect boundary padded vector with composed PeriodicBC on 2d data #514

Open
@vigeesh

Description

@vigeesh

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

#left-plot
plot(data1d)
#right-plot
Q1 = Dirichlet0BC(Float64)
plot(Q1*data1d,label="Q1*u (Dirichlet)")
Q2 = PeriodicBC(Float64)
plot!(Q2*data1d,label="Q2*u (Periodic)")

out

2-D

#left-plot
heatmap(data2d)
#right-plot
Q3 = compose(Dirichlet0BC(Float64, (6,6))...)
heatmap(Q3*data2d)

2d_dir

But, when I use PeriodicBC,

#left-plot
Q4 = compose(PeriodicBC(Float64, (6,6))...)
heatmap(Q4*data2d)
#right-plot
heatmap(periodic_expected)

I get a padded data as shown in the left plot below, but I expect to get the one shown in the right,
2d_per

Am I doing something wrong in composing the BC's in 2-D?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions