Hi all,

I'm having several EquationSystems, and also several Systems within each 
EquationSystems, and I'm using ExodusII_IO().write_equation_systems() 
for plotting.

In optimized mode I do get correct results, but in devel or debug mode I 
get an error when plotting. I've cooked up a minimalistic example with 
several systems and two EquationSystems to illustrate the issue.

The example triggers an error in devel or debug mode at the last 
(plotting) line of the code (see stack further below). The thing that 
confuses me the most is that if I either comment out everything related 
to second_equation_systems OR everything related to second_system, I do 
not get an error. This is particularly confusing as 
second_equation_systems does not have anything to do with neither the 
plotting or the other two systems.

Any ideas?

Best,
Jens



Here's the code example:

int main (int argc, char** argv)
{
   LibMeshInit init (argc, argv);

   Mesh mesh;
   mesh.read( "meshfile" );

   EquationSystems equation_systems(mesh);
   LinearImplicitSystem & system = 
equation_systems.add_system<LinearImplicitSystem> ("system");
   system.add_variable("u");

   LinearImplicitSystem & second_system = 
equation_systems.add_system<LinearImplicitSystem> ("second_system");
   second_system.add_variable("v");

   equation_systems.init();

   EquationSystems second_equation_systems(mesh);
   second_equation_systems.read("some_other_stored_eq_systems",
                             READ,
                             EquationSystems::READ_HEADER |
                             EquationSystems::READ_DATA |
                             EquationSystems::READ_ADDITIONAL_DATA);

   ExodusII_IO(mesh).write_equation_systems("test.e", 
system.get_equation_systems());
}

and the error stack is:

Assertion `s < this->n_systems()' failed.
s = 1
this->n_systems() = 1
Stack frames: 8
0: libMesh::print_trace(std::ostream&)
1: libMesh::DofObject::dof_number(unsigned int, unsigned int, unsigned 
int) const
2: libMesh::DofMap::dof_indices(libMesh::Elem const*, 
std::vector<unsigned int, std::allocator<unsigned int> >&, unsigned int) 
const
3: libMesh::EquationSystems::build_solution_vector(std::vector<double, 
std::allocator<double> >&, std::set<std::string, std::less<std::string>, 
std::allocator<std::string> > const*) const
4: 
libMesh::MeshOutput<libMesh::MeshBase>::write_equation_systems(std::string 
const&, libMesh::EquationSystems const&, std::set<std::string, 
std::less<std::string>, std::allocator<std::string> > const*)






------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to