From: Michael Povolotskyi <povolotskyi@in...>  20050929 15:19:25

Dear Libmesh developers, I'm implementing additional DOF in the way you suggested. 1) I define a new variable of type monomial constant. 2) I define two vectors that store DOF numbers: vector dof_indices is defined by dof_map.dof_indices (elem, dof_indices) and add_dofs_vector is defined by my routines. I built a matrix block that couples "normal" and additional variables: Ke_u_add.resize(dof_indices.size(), add_dofs_vector.size() ); 3) If there is no adaptive mesh refinement I simply use system.matrix>add_matrix(Ke_u_add,dof_indices,add_dofs_vector); and everything works. In the case of adaptive mesh refinement I try to use dof_map.constrain_element_matrix(Ke_u_add,dof_indices,add_dofs_vector); and then system.matrix>add_matrix(Ke_u_add,dof_indices,add_dofs_vector); This does not work because dof_map.constrain_element_matrix changes size of dof_indices and does not change size of Ke_u_add. What is wrong in my approach? Thank you very much, Michael. 