This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Solving a pde with weak discontinuities using PUM, problems

0 votes

I want to solve a pde with a weak discontinuity with the PUM library. To start with easier examples I considered the problem from the fenics tutorial, chapter " Handling domains with different materials" (http://fenicsproject.org/documentation/tutorial/materials.html) . I used a mesh which has no triangle-edges along the discontinuity surfaces (otherwise I get error messages using PUM and I guess fenics can solve the problem well without PUM), e.g. $$ mesh = UnitSquareMesh(25,25,"left")$$.
I managed to write PUM-code which gives me a solution to this problem, but I have to use an additional term in the variational formulation to force the PUM-solution to be a "more continous" solution like the analytical solution (otherwise I just get $$sol = 0, y < 0.5$$ and $$sol = 1, y > 0.5$$ which is of course a solution in the enriched function space to the real problem).
As a next step, I want to estimate the error between the analytical solution (given in the tutorial) and the PUM-solution to see how good this "forcing into continuity" works. But I can't manage to compare the analytical solution with the PUM-solution because I dont know the right Functionspace in which I can represent both functions and calculate for example the difference. If I try to interpolate the analytical solution over the enriched PUM Functionspace, I get a strong discontinous function, which doesn't look like the actual solution along the line $y = 0.5$. On the other hand, I dont want to interpolate my PUM-solution over a "CG-1" function space, because I think it will change the calculated solution too much.
Has anybody an idea how I can compare the two functions and estimate for example the L2-error?

Thanks for helping me out.

asked Dec 11, 2013 by soply FEniCS Novice (400 points)

2 Answers

0 votes

I was discussing the PUM library with my colleague last week and I think it is no longer maintained... So beware!

So I think you are including a strong discontinuity enrichment when infact you want a weakly discontinuous solution. Could you explain further how you are "forcing the continuity"? With some kind of penalty term on the boundary?

answered Dec 20, 2013 by jack.hale FEniCS Novice (240 points)

Yes that's right, because PUM always uses enrichment with heavyside-functions and I want to try to solve the problem with PUM. At the moment I'm adding the term
$$ c*\int [u][v] dx = 0$$ in the variational formulation, where $c$ is a weight, $u$ is the trial function and $v$ is the test function.

0 votes

As Jack said, the PUM library is no longer maintained. A new effort is underway at

https://bitbucket.org/terafrac/terafrac

It's at a very early stage.

answered Dec 23, 2013 by Garth N. Wells FEniCS Expert (35,930 points)

Thanks for the information. I'll have a look at the terafrac project.

Do you vaguely know when the first stable release could be expected?

No, but expect it to move forward rapidly in the next 6 months.

...