DiffEqOperators.jl icon indicating copy to clipboard operation
DiffEqOperators.jl copied to clipboard

concretization of High Dimension PDE

Open Song921012 opened this issue 3 years ago • 2 comments

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

Song921012 avatar Oct 03 '21 17:10 Song921012

This is probably the same as https://github.com/SciML/DiffEqOperators.jl/issues/491 .

eschnett avatar Jan 12 '22 18:01 eschnett

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.

eschnett avatar Jan 13 '22 19:01 eschnett