[Dune] Re: Anfrage 2d integration in 3d grids.

Christian Engwer christi at uni-hd.de
Wed Nov 8 18:04:45 CET 2006


Hi Patrick,

> What is the correct way to do this? I uses:
> try
> { 
>   double detjac = faceIter->geometry().integrationElement(position);
> }
> catch (Dune::Exception& error)
> {
>   DUNE_THROW(Dune::Exception,"" << error << ""); 
> }

No, you don't want to throw the exception, you want to catch it.

You should do something like this:

try
{ 
  double detjac = faceIter->geometry().integrationElement(position);
}
catch (Dune::Exception& error)
{
  std::cerr << "DUNE ERROR: " << error.what() << std::endl;
  exit(1);
}

usually you do this in your main() function.

Christian




More information about the Dune mailing list