A Posteriori Equilibration

Asked by Thomas Fraunholz

Hallo,

I want to do some a posteriori error analysis and therefore need to do some equilibration on a discrete solution sigma_h living in VectorFunctionSpace(mesh, "DG", k), where k is the polynomial degree (and its a 2D mesh).

The idea is to find a solution sigma_eq living in FunctionSpace(T, "BDM", k) (yes T, we can do the equilibration seperately on every Triangle T), such that (latex notation)

for k == 1:
\int_E \sigma_eq \cdot n_E p_(k) ds = \int_E \sigma_h\cdot n_E p_(k) ds, E \in \partial T,

or for k > 1:
\int_E \sigma_eq \cdot n_E p_(k) ds = \int_E \sigma_h \cdot n_E p_(k) ds, E \in \partial T,
\int_T \sigma_eq \cdot grad(p_(k-1)) dx = \int_T \sigma_h \cdot grad(p_(k-1)) dx,
\int_T \sigma_eq \cdot curl(b_T) p_(k-2) dx = \int_T \sigma_h \cdot curl(b_T) p_(k-2) dx,

where n_E is the normal component to the edge E and p_blub denote the corresponding polynomial of degree blub on E or T. Moreover b_T is the Bubble function on T (thanks again to Marie).

OK. So far I realized (by checking dof on a simple mesh) my first problem is to get BDM elements which have discontinuities on every interior edge. This is perhaps related to the restriction argument in FunctionSpace(), but documentation serves not much detail about this feature. The other thing is that it is not very elegant to build a big matrice with independent blocks, so does anybody see a possibility to do the calculations locally on every T (OK, definig a single cell as a new mesh comes into mind but I think this isn't very elegant)?

I would be thankful for a good advice about this issue. Perhaps someone doing a posteriori error analysis had a similar problem.

Thanks in advance,
Thomas

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Thomas Fraunholz
Solved:
Last query:
Last reply:
Revision history for this message
Marie Rognes (meg-simula) said :
#1

Two comments:

1) BDM on single triangle is the same space as vector DG (or vector CG for that matter) on a triangle. So discontinuous BDMs would be the same space as vector DGs.

2) It just so happens that DOLFIN supplies also a LocalAssembler for assembling forms on a single cell:

http://fenicsproject.org/documentation/dolfin/1.0.0/cpp/programmers-reference/adaptivity/LocalAssembler.html#LocalAssembler

It is used internally in DOLFIN for the automated adaptivity: see for instance lines 266-304 in dolfin/adaptivity/ErrorControl.cpp
You could use this to assemble your forms and solve the local problems on each cell.

I'm not sure whether is suitably wrapped to Python though, but that could probably be fixed.

Revision history for this message
Thomas Fraunholz (sleater) said :
#2

1) Hm, very good point...

2) Sounds and reads promising. I'll check it out and report my experiences.

Thanks Marie!

Revision history for this message
Thomas Fraunholz (sleater) said :
#3

Ok. I got back to this issue today and tested a bit, e.g.

mesh = UnitSquare(3,3)
V = FunctionSpace(mesh, 'CG', 1)
u = TrialFunction(V)
v = TestFunction(V)

a = inner(grad(u),grad(v))*dx
A = Matrix()
cell_domains = MeshFunction("uint", mesh, mesh.topology().dim())
for c in cells(mesh):
    dolfin.cpp.LocalAssembler.assemble_cell(A, a, c, cell_domains)

Well, this would have been too easy... It says that the first argument is quite wrong. So I compared the Assembler and LocalAssembler cpp files and I think the basic problem is that LocalAssembler is using armadillo matrices. For the moment I can't see if those matrices are available to dolfin via python api. Has anybody an idea?

Revision history for this message
Thomas Fraunholz (sleater) said :
#4

I close this version since the c++ api offers enought to solve this issue.