[Dune] How can I make a 2d integration in a 3d grid?

Leidenberger Patrick Patrick.Leidenberger at psi.ch
Wed Nov 8 16:06:06 CET 2006


Hi all,

at first thank's a lot for the help with the resize of the BCRSMatrix. It would be nice to have such a function but only if I can do algebra with it. But I can work without it too.

Now I have a new problem: 2d integration in a 3d ALUGrid. The essential part of my code looks like this:

typedef typename G::template Codim<1>::LeafIterator FaceLeafIterator;

for(FaceLeafIterator faceIter = (*grid_).template leafbegin<codimofface>();
    faceIter != (*grid_).template leafend<codimofface>(); ++faceIter)
{
  Dune::GeometryType gtf = faceIter->geometry().type();
  Dune::QuadratureRule<ct,dim-1> const& rule = Dune::QuadratureRules <ct,dim-1>::rule(gtf,quadratureorder_);
  for(typename Dune::QuadratureRule<ct,dim-1>::const_iterator i=rule.begin(); i != rule.end(); ++i)
  {
    double weight =  i->weight();
    Dune::FieldVector<ct,dim-1> position = i->position();
    double detjac = faceIter->geometry().integrationElement(position);
    ...
   }
}

The compilation works. But if I run the code the last line (get the integrationElement) causes an error:

terminate called after throwing an instance of 'Dune::FMatrixError'
p0_1262:  p4_error: interrupt SIGx: 6

What is the right way to do an integration over a face?

I need this to implement absorbing boundary conditions for electromagnetic waves.

Best regards

Patrick




More information about the Dune mailing list