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.

Usage of boundary conditions with higher dimensional operators #245

@LouieSlocombe

Description

@LouieSlocombe

Hi,
I apologise if this is the wrong channel to ask this type of question. But, from reading the documentation it is not clear to me how one would go about combing boundary conditions with higher dimensional operators.
As an example, say I wanted to impose Dirichlet boundary conditions on the following problem,
$u_{t} = u_{xx} + u_{yy}
I would start with something like this...

using DiffEqOperators

N = 64
x = range(-5, stop=5, length=N)
y = transpose(x)
dx = x[2]-x[1]

u = exp.(-x.^2 .-x'.^2)

Dxx = CenteredDifference{1}(2,2,dx,N)
Dyy = CenteredDifference{2}(2,2,dx,N)
L = Dxx + Dyy

Qx, Qy= MultiDimBC(Dirichlet0BC(eltype(u)),size(u))
Q = compose(Qx, Qy)

L * Q * u # DimensionMismatch

Could somebody suggest a correct way to go about it? Many thanks in advance!

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