On Thu, 1 Apr 2010, Andrea Hawkins wrote:

> Hmm... I still get the same error.
>
> It doesn't appear that there is a check in EquationSystems::read() to
> see if the system exists.

There's no check in EquationSystems::read() - there's one in
EquationSystems::add_system().

But wait - maybe you're not getting to the templated add_system(),
because the non-templated add_system() found an unrecognized sys_type
in the restart file?  For my trick to work, your derived system can't
override TransientNonlinearImplicitSystem::system_type() -
system_type() is what gets written out to file, and if you write
"MyOwnSystem" out then the non-templated add_system() won't know what
to do with that.

I'll modify the non-templated add_system() in the svn head, to have it
not throw an error if there's already a system of the same name.
That'll make your existing files readable via my trick, and hopefully
will make it easier for others.
---
Roy

> On Thu, Apr 1, 2010 at 3:27 PM, Roy Stogner <[email protected]> wrote:
>>
>> On Thu, 1 Apr 2010, Andrea Hawkins wrote:
>>
>>> I've created a system which inherits public
>>> TransientNonlinearImplicitSystem. This works fine, but when I write
>>> out the equation system and try to restart from some point, I get the
>>> error that it doesn't recognize my system and so cannot read the
>>> solution.
>>>
>>> It looks like when I call equation_systems.add_system templated with
>>> my system name it works fine, but when the equation_systems.read
>>> attempts to add systems it calls an add_system which is not templated,
>>> but passes the type as a variable.
>>>
>>> Is there an easy work around? Somewhere I could cast my system to
>>> something else?
>>
>> The trick is to handle the add_system yourself, before calling
>> EquationSystems::read().  That way when read() calls add_system(), it
>> will notice that a system with the same name already exists and it
>> will use that.
>> ---
>> Roy
>>
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to