On Fri, 25 Jan 2013, Jens Lohne Eftang wrote: > So I want to have an EquationSystems that holds two systems, one that is > read from file, and one that is not. > > I tried a couple of things: > > Read system from file, then adding another system, then init() > > and > > add a system, then init(), and then read from file. > > None of this works and seems to, when I print_info(), duplicate the > number of dofs in whatever system is inited twice. Also, if I add a > vector to this system the size of that vector is twice as large as it > should be.
> What does seem to work is to first add a system, and then read from > file, and not call init() at all. Is this the right way to do this? I > guess it makes sense since read() also initializes ... I'd have said that the right ways to do things would be either the way you ended up doing things, or read(), then add_system(), then reinit(). I highly doubt we support that latter option currently, but we've changed things in the past to add similar support for adding-vectors-after-init, adding-matrices-after-init... I don't have time to add similar support myself at the moment but I'd be willing to help if you wanted to work on a patch. On the other hand, if the way you're doing things now works then that should be fine. I'd still suggest contributing a short miscellaneous example program that exercises that functionality, though; it's merely good luck that it's working now and you might not want to rely on continued good luck alone to prevent regressions. --- Roy ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
