dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17726
Re: Mesh refinement copying problems
-
To:
DOLFIN Mailing List <dolfin@xxxxxxxxxxxxxxxxxxx>
-
From:
Anders Logg <logg@xxxxxxxxx>
-
Date:
Fri, 26 Feb 2010 11:54:54 +0100
-
In-reply-to:
<20100226085448.GN14928@olorin>
-
User-agent:
Mutt/1.5.20 (2009-06-14)
On Fri, Feb 26, 2010 at 09:54:49AM +0100, Anders Logg wrote:
> There seems to be a problem with the new approach to mesh refinement
> (return by value).
>
> Try the following simple test (in Python):
>
> mesh = UnitSquare(3, 3)
> new_mesh = refine(mesh)
>
> This generates the following output:
>
> Mesh empty constructor: this = 11fb880
> Mesh empty constructor: this = c03f63c0
> Calling uniform refinement free function: mesh = 11fb880
> Mesh empty constructor: this = c03f6160
> Mesh assignment operator: this = c03f63c0
> Mesh destructor: this = c03f6160
> Mesh copy constructor: this = 21eefb0
> Mesh assignment operator: this = 21eefb0
> Mesh destructor: this = c03f63c0
> Mesh destructor: this = 21eefb0
> Mesh destructor: this = 11fb880
>
> I would have expected to see two constructors, two destructors and
> zero copy constructors, but one extra mesh seems to be created.
This should be fixed now. The above test now creates the following output:
Mesh empty constructor: this = 189e0c0
Mesh empty constructor: this = 1889af0
Calling uniform refinement free function with output argument: mesh = 189e0c0
Mesh destructor: this = 1889af0
Mesh destructor: this = 189e0c0
--
Anders
Attachment:
signature.asc
Description: Digital signature
References