From: <tim@ce...>  20061107 09:58:37

Dear Roy and Ben and all, Thank you very much for your help. In fact, Ben's patch helps. However, since in my production code, I don't compute the minimum and maximum (at least not so often), I have written the following function, which I call after each refinement operation: void postpareRefinement(EquationSystems& es) { const Mesh& mesh = es.get_mesh(); std::vector<unsigned int> dof_indices; for(unsigned int i=0; i<es.n_systems(); i++) { System& system = es.get_system(i); const DofMap& dof_map = system.get_dof_map(); MeshBase::const_element_iterator el = mesh.active_local_elements_begin(); const MeshBase::const_element_iterator end_el = mesh.active_local_elements_end(); for ( ; el != end_el; ++el) { Elem* elem = *el; dof_map.dof_indices (elem, dof_indices); const unsigned int n_dofs = dof_indices.size(); for (unsigned int l=0; l<n_dofs; l++) { system.solution>set(dof_indices[l], (*system.current_local_solution)(dof_indices[l])); } } system.solution>close(); } } This works, but I wonder whether there might be something simpler. Note that in my production code, I have several systems in one EquationSystem object, and I typically solve one of them, then refine, solve again etc. I won't touch the other systems before the first system is solved satisfactorily. Best Regards, Tim 