Weak formulation including sum of jump terms

Asked by Anders Pettersson

Hi!
I am trying to solve an initial value problem in 1D assuming discontinuous trial functions of order q and continuous test functions of order q+1. Is there any clever way of doing this in FEniCS? In my weak formulation I get a sum of "jump terms" over the discontinuities, and can't find out how to handle it.
Thanks.

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
Anders Logg (logg) said :
#1

On Fri, Mar 09, 2012 at 05:41:01PM -0000, Anders Pettersson wrote:
> New question #190190 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/190190
>
> Hi! I am trying to solve an initial value problem in 1D assuming
> discontinuous trial functions of order q and continuous test
> functions of order q+1. Is there any clever way of doing this in
> FEniCS? In my weak formulation I get a sum of "jump terms" over the
> discontinuities, and can't find out how to handle it.

Are you sure you are not doing the opposite? Continuous trial
functions of order q and discontinuous test functions of order q - 1?
This would be the cG(q) method.

This is currently not implemented as part of DOLFIN (it used to
be). This functionality has been temporarily moved to a separate
repository but will be moved back in new form (integrated into the
form compiler FFC) later.

In the meantime, you can access the cG(q) and dG(q) method from here:

  https://launchpad.net/tanganyika

--
Anders

Revision history for this message
Anders Pettersson (fridasvelander) said :
#2

Yes, I'm sure of that! I have something like

http://www.codecogs.com/latex/eqneditor.php
\begin{cases}
\sum_{n=1}^N \int_{I_n}(\dot x(t) - a(t)x(t)) v(t) dt + \sum_{n=0}^N [x]_n v_n = 0 \\
x(0)=x_0
\end{cases}

as variational formulation.

Okay, good to know about the cG and dG methods!

Thanks very much for your help!

Revision history for this message
Anders Logg (logg) said :
#3

On Fri, Mar 09, 2012 at 07:25:46PM -0000, Anders Pettersson wrote:
> Question #190190 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/190190
>
> Anders Pettersson posted a new comment:
> Yes, I'm sure of that! I have something like
>
> http://www.codecogs.com/latex/eqneditor.php
> \begin{cases}
> \sum_{n=1}^N \int_{I_n}(\dot x(t) - a(t)x(t)) v(t) dt + \sum_{n=0}^N [x]_n v_n = 0 \\
> x(0)=x_0
> \end{cases}
>
> as variational formulation.
>
> Okay, good to know about the cG and dG methods!
>
> Thanks very much for your help!

It might actually be possible to do this in DOLFIN using the built-in
jump() and avg() operators. I haven't used them myself in 1-D, but it
might be possible. Look at the DG Poisson demo and see what happens.
All the spaces you need are available.

--
Anders

Can you help with this problem?

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

To post a message you must log in.