New periodic bc fails for discontinuous elements

Bug #1131088 reported by Garth Wells
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
New
Undecided
Unassigned

Bug Description

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

Revision history for this message
Garth Wells (garth-wells) wrote :

DG methods will not work because integrals over periodic facets is not supported yet.

Is it still sensible that a DofMap does something for discontinuous elements of order p > 0?

Revision history for this message
Anders Logg (logg) wrote : Re: [Bug 1131088] Re: New periodic bc fails for discontinuous elements

On Thu, Feb 21, 2013 at 08:31:26AM -0000, Garth Wells wrote:
> DG methods will not work because integrals over periodic facets is not
> supported yet.
> Is it still sensible that a DofMap does something for discontinuous
> elements of order p > 0?

I'm not sure. The sensible thing would be to treat the periodic
boundary as a regular interior facet with correct jump terms. That
might be nice to have but might be difficult to implement. What's
needed is to define the two neighboring cells of those periodic facets
in the right way.

--
Anders

Revision history for this message
Garth Wells (garth-wells) wrote :

On 22 February 2013 18:59, Anders Logg <email address hidden> wrote:
> On Thu, Feb 21, 2013 at 08:31:26AM -0000, Garth Wells wrote:
>> DG methods will not work because integrals over periodic facets is not
>> supported yet.
>> Is it still sensible that a DofMap does something for discontinuous
>> elements of order p > 0?
>
> I'm not sure. The sensible thing would be to treat the periodic
> boundary as a regular interior facet with correct jump terms. That
> might be nice to have but might be difficult to implement. What's
> needed is to define the two neighboring cells of those periodic facets
> in the right way.
>

Eventually yes, but the immediate question is how should it behave
now, i.e. error or no error. There may be cases using discontinuous p
> 0 that do not involve facet integrals (?).

Garth

> --
> Anders
>
> --
> You received this bug notification because you are a member of DOLFIN
> Core Team, which is subscribed to DOLFIN.
> https://bugs.launchpad.net/bugs/1131088
>
> Title:
> New periodic bc fails for discontinuous elements
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dolfin/+bug/1131088/+subscriptions

--
Garth N. Wells
Department of Engineering, University of Cambridge
http://www.eng.cam.ac.uk/~gnw20

Revision history for this message
Anders Logg (logg) wrote :

On Fri, Feb 22, 2013 at 07:26:16PM -0000, Garth Wells wrote:
>>
>> I'm not sure. The sensible thing would be to treat the periodic
>> boundary as a regular interior facet with correct jump terms. That
>> might be nice to have but might be difficult to implement. What's
>> needed is to define the two neighboring cells of those periodic facets
>> in the right way.
>>
> Eventually yes, but the immediate question is how should it behave
> now, i.e. error or no error. There may be cases using discontinuous p
> 0 that do not involve facet integrals (?).

Yes, but then the boundary dofs should not be matched, or maybe that's
not what you were suggesting. If the boundary dofs are matched then a
certain set of facets in the periodic mesh would be special. The
solution would be continuous along the periodic boundary but not
otherwise.

--
Anders

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.