Skip to content

Two questions in the demo MixedPoisson.py #91

@yoczhang

Description

@yoczhang

Dear Mikael,
In the MixedPoisson.py, I have two questions:

1 . How to modify it to periodic boundary conditions in both x- and y-directions. I tried to change SD = FunctionSpace(N, family, bc =(0, 0)) to SD = FunctionSpace(N, family), but an error occurred.

2 . For the mixed formulation
$$
g - \nabla(u) &= 0 \
\nabla \cdot g &= f \
$$
g is a vector denoted by g=(g0, g1), g and u are trial functions, let p=(p0, p1) and q are test functions.

If I don't want to use the VT = VectorSpace(TT) to get the space g belongs to, and then M = BlockMatrix(A00+A01+A10) to generate the final matrix, I want to get the final matrix (by myself) like this:

[ A0   O   B0' ]
[  O   A1  B1' ]
[ B0   B1   O  ]

where A0=(p0, g0), A1=(p1, g1), O is zero matrix, B0=(q, g1_x), B1=(q, g2_y).

Is this possible, and if so, can a complete code or demo be provided?

Thank you very much!

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