On Wed, 13 Jan 2010, Vijay S. Mahadevan wrote:

> I understand that. Again, I was talking about SpecialSnowFlakeSystem
> which will fail all the "ifs" and hence throw an error at the end,

Not if you don't override its parent's system_type() method.  Then
the string that gets written out (and so eventually read in) will
match a libMesh parent class, the add_system<Parent>("name") call will be
made.  Because a system with "name" already exists the add_system()
call will just do a get_system(), and because Parent is a parent class
of SpecialSnowflake the dynamic_cast in get_system will still be happy.

I'm not just guessing or deducing this behavior; this is how my code
works, and it doesn't throw errors in EquationSystems::read().

> even if it has been added by the SnowFlake aware CustomEquationSystem
> a-priori. SpecialSnowFlakeSystem is the reason why I've been arguing
> to make add_system(type, name) virtual. If no one else finds this
> useful, I can make this as my specific change in my working copy.

We'll leave it in the SVN head.  It's a trivial overhead, and even if
there's a better solution for your problem, it might be useful for
other reasons we haven't thought of yet.
---
Roy

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to