On Jan 11, 2012, at 10:13 PM, Roy Stogner wrote:

> 
> On Wed, 11 Jan 2012, Ataollah Mesgarnejad wrote:
> 
>> On Jan 11, 2012, at 5:16 PM, Roy Stogner wrote:
>> 
>>> equation_systems_io.C, line 324.  If you tell read() to read the
>>> header, then it assumes that it's responsible for initializing
>>> everything too.
> 
>> So what would happen if EquationSystems::read() does not do the init
>> until later when I add the matrices?
> 
> If you call read with READ_HEADER set, and it doesn't do init(), then
> everybody else's code, which has been assuming the contrary, starts
> breaking.
> 
> If you call read without READ_HEADER set, then it won't do init(), you
> should be able to do init() yourself after matrices are added, and
> everything ought to work just the way you want.
> 
>> In other words what is the purpose of calling init inside
>> EquationSystems::read()
> 
> Probably just to make the typical users' code a little terser and more
> fail-safe.  That's why I'd have designed it that way, anyway, but I
> think it was Ben or John's API originally and they may have other
> considerations too.
> 
>> and is it really necessary as long as it's done later on at some
>> point before we start solution process?
> 
> Yes, if only for backwards compatibility.
> 
> What we really ought to do in the long run is enable addition of new
> matrices after init() - but for your purposes omitting READ_HEADER and
> doing the initialization yourself ought to work already.

Then thats what I'll do.
Thanks
Ata


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to