Subject: [Syfi-dev] [HG syfi] fixed memory bug

From: [email-masked] (SyFi)
Date: Mon, 27 Aug 2007 22:02:46 +0200 (CEST)

One or more new changesets pushed to the primary SyFi repository.
A short summary of the last three changesets is included below.

changeset:   698:2d63445d19a697c4105b4298b92d98579fab85d9
tag:         tip
user:        "Kent-Andre Mardal <[email-masked]>"
date:        Mon Aug 27 22:02:35 2007 +0200
files:       doc/manual/syfi-user-manual.pdf syfi/ArnoldFalkWintherWeakSym.cpp syfi/Bubble.cpp syfi/CrouzeixRaviart.cpp syfi/DiscontinuousLagrange.cpp syfi/FE.cpp syfi/FE.h syfi/Hermite.cpp syfi/Lagrange.cpp syfi/Nedelec.cpp syfi/Nedelec2Hdiv.cpp syfi/Nedelec2HdivPtv.cpp syfi/P0.cpp syfi/Polygon.cpp syfi/Polygon.h syfi/RaviartThomas.cpp syfi/Robust.cpp syfi/RobustPtv.cpp
description:
fixed memory bug

changeset:   697:ae3408a5e75c28f26bf1c34d5c88892648bef63d
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Mon Aug 27 14:58:40 2007 +0200
files:       python/sfc/UserForm.py
description:
bugfix

changeset:   696:4c450defd34286c6cf49f11dde31647b30f40403
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Mon Aug 27 14:58:20 2007 +0200
files:       python/sfc/UFCCell.py python/sfc/UserForm.py python/sfc/__init__.py python/tests/SFC-tests/callback_forms.py
description:
Implemented FFC-like syntax for defining elements in coefficient types.
Next step is generating code for subcomponents.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/syfi

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Tue, 28 Aug 2007 09:42:01 +0200

> files:       doc/manual/syfi-user-manual.pdf syfi/ArnoldFalkWintherWeakSym.cpp syfi/Bubble.cpp syfi/CrouzeixRaviart.cpp syfi/DiscontinuousLagrange.cpp syfi/FE.cpp syfi/FE.h syfi/Hermite.cpp syfi/La…

Have you actually tested this fix?

The copy constructor Polygon::Polygon(const Polygon & p) is not
virtual (and cannot be in C++) and thus won't invoke the copy
constructor for the subclass, f.ex. Line::Line(const Line & l). The
copied object isn't any longer a Line, but a Polygon, and calling
integrate will only invoke Polygon::integrate which throws an
exception.

-- 
Martin

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Tue, 28 Aug 2007 09:43:11 +0200

> integrate will only invoke Polygon::integrate which throws an

Actually, it never gets that far and just segfaults.

-- 
Martin

---

From: Kent-Andre Mardal <[email-masked]>
Date: Tue, 28 Aug 2007 10:57:17 +0200

> integrate will only invoke Polygon::integrate which throws an

Yes, I saw that just after I submitted. I'll put in constructors.

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Tue, 28 Aug 2007 10:58:09 +0200

> Yes, I saw that just after I submitted. I'll put in constructors.

No. I've reverted it. It just won't work this way. You can't have
virtual constructors in C++.

-- 
Martin