Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Libmesh-users] Bug in dof_map.C

 [Libmesh-users] Bug in dof_map.C From: LengWei - 2008-12-24 08:38:10 ```Hi, I'm trying to implement the pressure convection-diffusion preconditioner for steady-state Navier-stokes equaions. I am not sure if I am doing it in an approperate way... Here is the outline: In general, use the pestc precondition shell matrix, specificly, * build subblock Matrix manually * extract subvector form vector, namely (u,v,w) and p from x, using variable_first_local_dof * create some solver to perform the inverse operation of matrix, or mat vec multiplication Is there a more decent way to do this? BTW, there is a bug in dof_map.C, which I check out from svn, around line 915, >> if (var == n_vars-1) _var_first_local_df.push_back(next_free_dof); _var_first_local_df[nvar+1] record the offset of vars, like [u_begin, v_begin, w_begin, p_begin, p_end], but without "if (var == n_vars-1)", it becomes [u_begin, u_end, v_begin, v_end, w_begin, w_end, p_begin, p_end] Regards, Lengwei ```

 [Libmesh-users] Bug in dof_map.C From: LengWei - 2008-12-24 08:38:10 ```Hi, I'm trying to implement the pressure convection-diffusion preconditioner for steady-state Navier-stokes equaions. I am not sure if I am doing it in an approperate way... Here is the outline: In general, use the pestc precondition shell matrix, specificly, * build subblock Matrix manually * extract subvector form vector, namely (u,v,w) and p from x, using variable_first_local_dof * create some solver to perform the inverse operation of matrix, or mat vec multiplication Is there a more decent way to do this? BTW, there is a bug in dof_map.C, which I check out from svn, around line 915, >> if (var == n_vars-1) _var_first_local_df.push_back(next_free_dof); _var_first_local_df[nvar+1] record the offset of vars, like [u_begin, v_begin, w_begin, p_begin, p_end], but without "if (var == n_vars-1)", it becomes [u_begin, u_end, v_begin, v_end, w_begin, w_end, p_begin, p_end] Regards, Lengwei ```
 Re: [Libmesh-users] Bug in dof_map.C From: Benjamin Kirk - 2008-12-24 15:18:37 ```> BTW, there is a bug in dof_map.C, which I check out from svn, > around line 915, > >>> if (var == n_vars-1) > _var_first_local_df.push_back(next_free_dof); > > _var_first_local_df[nvar+1] record the offset of vars, like > [u_begin, v_begin, w_begin, p_begin, p_end], > but without "if (var == n_vars-1)", it becomes > [u_begin, u_end, v_begin, v_end, w_begin, w_end, p_begin, p_end] This actually the expected behavior. Consider v_begin to be u_end in the C++ container sense - so to get all the u's: u: [u_begin, v_begin) v: [v_begin, w_begin) -Ben ```