← Back to team overview

dolfin team mailing list archive

Re: Mesh refinement broken

 

On Wed, Feb 02, 2011 at 06:56:02PM +0000, Garth N. Wells wrote:
>
>
> On 02/02/11 10:55, Anders Logg wrote:
> > On Mon, Jan 31, 2011 at 09:40:19AM +0100, Anders Logg wrote:
> >> I'm working on a fix. The problem wasn't visible when DOLFIN_NOPLOT
> >> was not set.
> >
> > This should now be fixed. There might still be some minor issues that
> > the buildbot will pick up.
> >
> > Here's a short summary of what has changed:
> >
> > 1. The refine() function returns a reference to the refined mesh
> > instead of return-by-value in C++. The following no longer works:
> >
> >   mesh = refine(mesh);
> >
> > Instead, one must do
> >
> >   Mesh& refined_mesh = refine(mesh);
> >
> > or equivalently
> >
> >   refine(mesh);
> >   Mesh& refined_mesh = mesh.child();
> >
>
> Can get a shared pointer? Otherwise we're in trouble if mesh goes out of
> scope.

One can use

  mesh.parent_shared_ptr()
  mesh.child_shared_ptr()

--
Anders



Follow ups

References