DG PeriodicBoundary

Asked by Miro

Hi, I tried to make DG work in periodic domain following the code in demo/undocumented/periodic.
The program crashes when constructing the function space. Can someone point out, what I am doing
wrong? I am running trunk version of dolfin. Thanks.

from dolfin import *

mesh = UnitSquareMesh(4,4)

class PeriodicBoundary(SubDomain):

    def inside(self, x, on_boundary):
        return bool(x[0] < DOLFIN_EPS and x[0] > -DOLFIN_EPS and on_boundary)

    def map(self, x, y):
        y[0] = x[0] - 1.0
        y[1] = x[1]

pbc = PeriodicBoundary()

V = FunctionSpace(mesh,'DG',1,constrained_domain=pbc) #<----segmentation fault

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Garth Wells (garth-wells) said :
#1

It doesn't segfault for me, but it does report an error.

Revision history for this message
Garth Wells (garth-wells) said :
#2

Note that DG methods are not supported with periodic bcs - integration on periodic facets is not in place.

Revision history for this message
Miro (miroslav-kuchta) said :
#3

Thanks Garth for reply, are there plans to add support for periodic bcs and DG?

Can you help with this problem?

Provide an answer of your own, or ask Miro for more information if necessary.

To post a message you must log in.