Hi Michael,

I'm not a libmesh developer, but I have had a very similar problem in 
the context of first reading in data for a system from file, in which 
case I believe the system is inited, and then add another system to the 
EquationSystems, and then init again. The issue was not related to using 
the same mesh for two systems within the same EquationSystems (which 
shouldn't be a problem), but rather to calling init() twice.

My workaround to do first add the first system, and then read the second 
system from file, something like

sys = es.ad_system()
sys.add_variable()
es.read()

that is, I am not calling init() explicitly because that's done by 
es.read().

Did you try

EquationSystems es(mesh);
es.add_system(...); //add fist system
es.init();
/* do domething with the first system*/

es.add_system(...); //ad second system
es.reinit();
/* do domething with the second system*/


?

Best,
Jens






this precise problem earlier

On 07/26/2013 12:43 PM, Michael Povolotskyi wrote:
> Dear Libmesh developers,
> recently I moved from the version 0.7 to 0.9.
> Unfortunately my code stopped working.
> It seems to me that I'm doing something wrong with libmesh.
> I need to do the following:
> solve two systems on the same mesh, and exchange data between them.
>
> So, I have done something like this
>
> EquationSystems es(mesh);
> es.add_system(...); //add fist system
> es.init();
> /* do domething with the first system*/
>
> es.add_system(...); //ad second system
> es.init();
> /* do domething with the second system*/
>
> this used to work in the old version, but now what happens is that the
> second system has 2 times more DOFs than it should.
> I modified my code in such a way that instead of initializing es, I'm
> initializing just the newly created system.
> This seems to work.
>
> My question:
> when it is appropriate to initialize the System object, and when one has
> to initialize the EquationSystems object?
> Thank you,
> Michael.
>


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to