Believe it or not... Dr. Ben Kirk has thought of everything... and there is no reason for us lesser beings to burn brain cycles over this kind of thing ;-)
In this case what you need to do is create a CouplingMatrix (http://libmesh.sourceforge.net/doxygen/classCouplingMatrix.php ) and attach it to the DofMap _before_ compute_sparsity() gets called... You attach it to the DofMap by setting a public member: http://libmesh.sourceforge.net/doxygen/classDofMap.php#4d50b4c013a93b8036c126ced15ecbe6 Derek On Dec 4, 2009, at 12:27 AM, Vijay S. Mahadevan wrote: > Hi, > > I'm trying to figure out a clean way to find the nnz sparsity > structure for a given variable. That is given an EquationSystem and > its corresponding Dofmap, can I find the correct nnz structure to > create a matrix ignoring the coupling between variables. It is useful > for creating block preconditioners where the entire matrix (with all > coupling between variables) is not needed but just individual blocks > would be enough to perform Block-Jacobi type operations for the > preconditioner. > > I can always sweep through all the elements, compute the dofs for the > variable of interest and create this nnz but that seems hackish. This > information should definitely be derived from DofMap but looking at > the DofMap code, I could not figure out how this can be done correctly > either. Is there a simpler and efficient way to do this ? > > Vijay > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Libmesh-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
