Ben, Thanks for the prompt reply.
A clarification regarding what you said: > The DofMap will add all face neighbor degrees of freedom to an element's > coupled dofs if > > (1) all the variables in the system are discontinuous, or > (2) the command line option '--implicit_neighbor_dofs' is specified. In my system, all variables use disconitnuous basis. And now I tried to run the code with --implicit_neighbor_dofs in command line. But I still get only the local element dofs and not the neighboring element dofs when I populate dofs with the call "dof_map.dof_indices(...)". Is this what is to be expected or did I try something else than what you suggested ? I just need DofMap to tell me which other dof my current dofs are coupled to. From what I understand, your reply answers that but somehow I do not see the same in my code. Am i missing something ? Vijay On Fri, Nov 7, 2008 at 11:31 AM, Benjamin Kirk <[EMAIL PROTECTED]> wrote: > >> I'm not sure if this is a stupid question but I'm not entirely sure as >> to how you would find the nonzeros per row in a DG discretization. >> This is not obvious to me since in say an advection system, the flux >> at the boundaries couple the dofs in one cell to the next. And hence, >> the dof_map does not have any idea about this discretization or >> coupling of variables. In the continuous FEM case, the dof_map does >> provide the connectivity correctly since the mesh_nodes are the dofs >> in the discretization. > > In DG discretizations the degrees of freedom in any given element are > typically coupled to all the degrees of freedom in its face-neighbors. > >> Any ideas as to how I can possibly access the location of nonzeros per >> row by just looking at the final assembled matrix ? I saw that there >> is a update_sparsity_pattern routine in SparseMatrix but this is not >> overloaded in PetscMatrix. I guess I am looking for something like the >> sparsity_pattern object, or am I way off on my interpretation of what >> this means ? > > The DofMap will add all face neighbor degrees of freedom to an element's > coupled dofs if > > (1) all the variables in the system are discontinuous, or > (2) the command line option '--implicit_neighbor_dofs' is specified. > > The role of the sparsity pattern is to define the graph structure of the > system matrix. So, the DofMap builds this graph, and then passess it off to > any associated matrices. It is then destroyed because it takes a fair bit > of memory and, in theory, should not be needed after the matrices are > reinitialized with the proper structure. > > In the case of PETSc it does not actually need the graph of the matrix - the > number of on- and off-processor nonzeros per row will suffice. Of course, > internal to the DofMap the sparsity pattern is computed anyway to get this > information. > > If you look in the laspack and trilinos matrix implementations you will see > where the sparsity pattern is actually used. > > Hope this helps, > > -Ben > > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
