On Thu, 26 May 2016, David Knezevic wrote:

P.S. I meant to say that I'd be happy to make a PR with that fix,
but I wasn't sure what the best way to fix this is.

Neither am I.  Since most of our FunctionBase subclasses don't require
init() the problem just never occurred to me when I was creating
clone().

Inside MeshFunction::clone() we could check if the original
MeshFunction is initialized and if it is then initialize the clone?
That seems reasonable to me.

It's definitely the most robust thing to do.  But we should document
the requirement in FunctionBase::clone() too, so nobody else making
subclasses falls into the same mistake.

As long as I'm begging, would you add a unit test too?  I'm going to
be making at least one more functionality pass and possibly one more
optimization pass over the new projection code this year, and I'd hate
to regress this again.
---
Roy
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to