Todd Oliver found and partially tracked down an ugly bug; I think I've
got it pinned down to a libHilbert interface issue.

A test code which breaks is attached.  Originally we had to do some
refinement to trigger the problem but now literally all it does is
generate a 1D mesh and write it out.  The first argument is the number
of elements.  1 through 3071 work.  3072 (and many other larger mesh
sizes, sparsely scattered...) fails.

Todd triggered the bug at a tot_val_size assertion in the I/O code,
but the underlying problem turns out to be duplicate HilbertIndices
leading to duplicate renumbered node ids.  I've updated the svn head
to test for duplicate HilbertIndices and print them out as soon as
they're found in MeshCommunication::assign_global_indices().

I'm still not sure *why* the duplicate indices are occuring, and I'm
at the point where more eyes might be helpful.
---
Roy
#include <iostream>

#include "libmesh.h"
#include "serial_mesh.h"
#include "equation_systems.h"
//#include "mesh_refinement.h"
#include "explicit_system.h"
#include "mesh_generation.h"

// The main program.
int main (int argc, char** argv)
{
  if (argc<2)
    {
      std::cout << "Must provide number of elements!" << std::endl;
      return -1;
    }

  unsigned int Nelem = atoi(argv[1]);

  // Initialize libmesh
  LibMeshInit init(argc, argv);

  // Build a mesh
  SerialMesh mesh(1);

  MeshTools::Generation::build_line(mesh, Nelem,
                                    0.0, 1.0,
                                    EDGE2);

//  mesh.print_info();

  // Build EquationSystems
  EquationSystems es(mesh);

  // Add a phony system
  ExplicitSystem& sys = es.add_system<ExplicitSystem>("test");

  sys.add_variable("foo", FIRST);

  // Init
  es.init();
    
//    es.print_info();

  es.write("test.xda", libMeshEnums::WRITE,
           EquationSystems::WRITE_DATA |
           EquationSystems::WRITE_ADDITIONAL_DATA);

  return 0;
}


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to