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

concretization of High Dimension PDE #480

Open
Song921012 opened this issue Oct 3, 2021 · 2 comments
Open

concretization of High Dimension PDE #480

Song921012 opened this issue Oct 3, 2021 · 2 comments

Comments

@Song921012
Copy link

Appreciate your excellent works in SciML. I am struggling with a problem and really need help. Please !!!
$$\mathcal{L} u = u_{xx} +u_{yy}, \quad \text{BCs:} \quad u(x+1,y)=u(x,y), u(x,y+1)= u(x,y).$$
I need the concretization of the operator with bcs and my codes are as follows:

using DiffEqOperators
const bc_p = PeriodicBC(Float64)
N = 4
dx = 0.1
Dxx = CenteredDifference(2,2,dx,N)
Dyy = CenteredDifference{2}(2,2,dx,N)
L0 = Dxx+Dyy
bc_px = MultiDimBC{1}(Dirichlet0BC(Float64), (4,4))
bc_py = MultiDimBC{2}(Dirichlet0BC(Float64), (4,4))
bc_co = compose(bc_px,bc_py)
L1 = L0*bc_co
Array(L1)
Array(L1,4)
Array(L1,(4,4))
using BlockBandedMatrices
BandedBlockBandedMatrix(L1)
BandedBlockBandedMatrix(L1,4)
BandedBlockBandedMatrix(L1,(4,4))

But neither of them works. It should be a $16 \times 16$ matrix. Someone can help me. Please

@eschnett
Copy link
Contributor

This is probably the same as #491 .

@eschnett
Copy link
Contributor

My comment above was wrong.

The matrices Dxx,Dyy, and L0 have the size (4, 6). They are not square because they expect two ghost points at the boundaries. You should expect at 16 x 36 matrix as result.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants