Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread Tim Kroeger
Dear John, On Tue, 17 Nov 2009, John Peterson wrote: > Despite it being Item 9 in the 3rd ed. of "Effective C++" I admit to > being unaware that you should never call virtual functions in (base > class) constructors or destructors! Nice to hear that I'm not the only person here that didn't know

Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread Derek Gaston
Sorry guys... I'm sitting in technical talks at Supercomputing 09 right now... I'll try to look at this tonight and get back to you... Derek Sent from my iPhone On Nov 17, 2009, at 8:35 AM, John Peterson wrote: > On Tue, Nov 17, 2009 at 9:23 AM, Roy Stogner > wrote: >> >> On Tue, 17 Nov 2009,

Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread John Peterson
On Tue, Nov 17, 2009 at 9:23 AM, Roy Stogner wrote: > > On Tue, 17 Nov 2009, Tim Kroeger wrote: > >> On Tue, 17 Nov 2009, Boyce Griffith wrote: >> > Can't you just call clear() in ~MyPreconditioner()? Sure, I can.  Actually, that's what I'm doing now.  But for that, still the me

Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread Roy Stogner
On Tue, 17 Nov 2009, Tim Kroeger wrote: > On Tue, 17 Nov 2009, Boyce Griffith wrote: > Can't you just call clear() in ~MyPreconditioner()? >>> >>> Sure, I can. Actually, that's what I'm doing now. But for that, still the >>> method Preconditioner::clear() does not have to exist, does it? >

Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread Boyce Griffith
>> Can't you just call clear() in ~MyPreconditioner()? > > Sure, I can. Actually, that's what I'm doing now. But for that, > still the method Preconditioner::clear() does not have to exist, does > it? I haven't used the Preconditioner class in libMesh, but this kind of init()/clear() functio

Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread Tim Kroeger
On Tue, 17 Nov 2009, Boyce Griffith wrote: >>> Can't you just call clear() in ~MyPreconditioner()? >> >> Sure, I can. Actually, that's what I'm doing now. But for that, still the >> method Preconditioner::clear() does not have to exist, does it? > > I haven't used the Preconditioner class in l

Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread David Knezevic
>> Can't you just call clear() in ~MyPreconditioner()? > > Sure, I can. Actually, that's what I'm doing now. But for that, > still the method Preconditioner::clear() does not have to exist, does it? True, it doesn't have to exist... I guess it is included for consistency with, say, System::cl

Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread Tim Kroeger
Dear David, On Tue, 17 Nov 2009, David Knezevic wrote: > Can't you just call clear() in ~MyPreconditioner()? Sure, I can. Actually, that's what I'm doing now. But for that, still the method Preconditioner::clear() does not have to exist, does it? Best Regards, Tim -- Dr. Tim Kroeger tim.

Re: [Libmesh-devel] Preconditioner

2009-11-17 Thread David Knezevic
Can't you just call clear() in ~MyPreconditioner()? Tim Kroeger wrote: > Dear all, > > There is a misleading matter in the Preconditioner class. That is, > the virtual destructor calls clear(), which is itself a virtual > function that does nothing. In my derived class (let's call it > MyP

[Libmesh-devel] Preconditioner

2009-11-17 Thread Tim Kroeger
Dear all, There is a misleading matter in the Preconditioner class. That is, the virtual destructor calls clear(), which is itself a virtual function that does nothing. In my derived class (let's call it MyPreconditioner), I am overloading the clear() method to free some memory that is allo