dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #21197
Re: Mesh refinement broken
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.
Garth
> 2. The refine() function works as expected in Python:
>
> mesh = refine(mesh)
>
> should work fine since refine() returns a shared_ptr in Python.
>
> 3. A hierarchy of meshes is now stored as part of the mesh, accessed
> by the parent() and child() functions. There are also coarse() and
> fine() functions for accessing the coarsest and finest meshes in a
> hierarchy.
>
> 4. Other classes like Function, FunctionSpace, Form, VariationalProblem
> can now also been refined. This functionality is untested and will
> need some further debugging before it can be used in the
> AdaptiveVariationalSolver class.
>
> --
> Anders
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
Follow ups
References