From: David Knezevic <dknez@MIT.EDU>  20090418 21:31:03

So, I'd really like to add this system.add_variable(foo,SCALAR) functionality to libMesh. I've been poking around the library, but I'm not really sure how to get started, so I could definitely use some pointers... It seems to me that the important details for this are in DofMap, for storing and retrieving the dof index of the scalar variable, as well as for setting the sparsity pattern/number of nonzeros...? Some thoughts I've had are:  Add a new enum SCALAR to FEFamily (or alternatively, a new enum SCALAR to Order)?  Short circuit all the loops over elements for DOF counting in DofMap for SCALAR variables, and instead store the dof index of each SCALAR variable in a vector in DofMap?  However, I can't see where in the code one should compute the dof index of a SCALAR variable in the first place?  Ben, regarding setting the nonzero count and the number of rows that you mentioned; where is this controlled? In SparsityPattern? As you can probably tell, I'm not very familiar with the guts of the library, so any help would be appreciated! Regards, Dave Kirk, Benjamin (JSCEG311) wrote: > system.add_variable(foo,SCALAR); as the interface? > > We jist then add the number of such variables into the nonzero count for each row, and add a number of rows of full width. > ?? > > > > >  Original Message  > From: Derek Gaston <friedmud@...> > To: libmeshusers@... <libmeshusers@...> > Sent: Wed Mar 25 11:14:35 2009 > Subject: [Libmeshusers] Adding one more equation... > > So... I got a question from one of my colleagues this morning about adding > just one more equation (one more row and column to the matrix) to an > existing NonlinearImplicitSystem. Essentially, this is adding one global > scalar equation. In this case both the row and column are actually going to > be dense... > Any ideas on this? It's almost like I need to add a node that's connected > to every other node... or something. > > Thanks, > Derek >  > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers >  > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 