Re: [Libmesh-users] problem with EquationSystems in a loop

2012-02-08 Thread Roy Stogner
On Wed, 8 Feb 2012, water force wrote: > Yes this algorithm seems uncommon because the material properties > associated with these meshes are different. Is there any other > elegant way to do this? It should have been obvious from your code, but no - if your material properties affect the Jacobi

Re: [Libmesh-users] problem with EquationSystems in a loop

2012-02-08 Thread water force
Thanks for your comments! A bug in my assemble function did result in the segfault. Actually I used attach_assemble_object in my code but made a mistake when passing the string sys_name to the constructor in the assembly class. Yes this algorithm seems uncommon because the material properties assoc

Re: [Libmesh-users] problem with EquationSystems in a loop

2012-02-07 Thread John Peterson
On Tue, Feb 7, 2012 at 3:23 PM, water force wrote: > Hello, > > I have a couple of meshes, each with the same linear equations and boundary > conditions. Then I tried to solve them in a loop in the following way: > > for (int i = 0; i < number_of_meshes; i++) > { >    EquationSystems es( mesh[i] )

Re: [Libmesh-users] problem with EquationSystems in a loop

2012-02-07 Thread Roy Stogner
On Tue, 7 Feb 2012, water force wrote: > I have a couple of meshes, each with the same linear equations and boundary > conditions. Then I tried to solve them in a loop in the following way: > > for (int i = 0; i < number_of_meshes; i++) > { >EquationSystems es( mesh[i] ); >es.add_system(s

[Libmesh-users] problem with EquationSystems in a loop

2012-02-07 Thread water force
Hello, I have a couple of meshes, each with the same linear equations and boundary conditions. Then I tried to solve them in a loop in the following way: for (int i = 0; i < number_of_meshes; i++) { EquationSystems es( mesh[i] ); es.add_system(sys_name); es.get_system(sys_name).add_va