Dear all,

Please find attached a small test program. It initializes a system and then localizes the solution (without solving anything, just to keep the example short). At least this is what the program is supposed to do. What it really does is: It inizializes a system and then crashes. What did I do wrong? (I have to admit that I never used localize() before, so I might not have understood how to use it correctly.)

Best Regards,

Tim

--
Dr. Tim Kroeger
[email protected]            Phone +49-421-218-7710
[email protected]            Fax   +49-421-218-4236

Fraunhofer MEVIS, Institute for Medical Image Computing
Universitaetsallee 29, 28359 Bremen, Germany
#include <iostream>
#include <math.h>

#include "libmesh.h"
#include "mesh.h"
#include "mesh_generation.h"
#include "linear_implicit_system.h"
#include "equation_systems.h"
#include "numeric_vector.h"

#include "petsc_vector.h"
#include "utility.h"

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

  Mesh mesh (2);
  
  MeshTools::Generation::build_square (mesh, 
                                       15, 15,
                                       -1., 1.,
                                       -1., 1.,
                                       QUAD9);

  EquationSystems equation_systems (mesh);
  equation_systems.add_system<LinearImplicitSystem> ("Test");
  equation_systems.get_system("Test").add_variable("u", SECOND);
  equation_systems.init();

  const System& system = equation_systems.get_system("Test");
  const DofMap& dofMap = system.get_dof_map();
  AutoPtr<NumericVector<Number> > vector = NumericVector<Number>::build();

  system.solution->localize(*vector);
  
  return 0;
}

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to