Hi,

I am trying to add a variable after calling init() on an
ImplicitSystem. I do not change the mesh but just want to reallocate
the matrices and vectors and retain the values that already exist in
the vectors and matrices. I am not sure whether I'm using libMesh
objects the way they are not supposed to be used but let me know if
this is possible.

I use libmesh configured with petsc-3.0. The order of calls I perform
are along the following lines:

system.add_variable("newvar", FIRST, LAGRANGE) ;

system.get_dof_map().distribute_dofs(system.get_mesh());

// Recreate any hanging node constraints
system.get_dof_map().create_dof_constraints(_mesh);

// Apply any user-defined constraints
system.user_constrain();

// Expand any recursive constraints
system.get_dof_map().process_constraints();

// And clean up the send_list before we use it again
system.get_dof_map().prepare_send_list();

// Restrict/prolong and reallocate the vectors
system.prolong_vectors();

system.reinit() ;

When I debug the above piece of code, it segfaults in prolong_vectors.
Is this supposed to be called only when mesh is changed or can this
actually accomodate changes in dof_map also ? If this is not the
calling sequence, any help along the right path will be immensely
helpful !

Thanks in advance.
Vijay

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to