On Sat, 18 Apr 2009, David Knezevic wrote: > 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 non-zeros...?
That's right. > Some thoughts I've had are: > > - Add a new enum SCALAR to FEFamily (or alternatively, a new enum SCALAR > to Order)? FEFamily. The Order would then specify how many scalars to add. Maybe next write an FE<SCALAR> specialization? Something that acted sort of like a discontinuous monomial element? That might help avoiding the need to add special cases to a lot of loops in the library later. > - Short circuit all the loops over elements for DOF counting in DofMap > for SCALAR variables, If the FE<SCALAR> claimed to have zero dofs per element, DofMap would basically skip right over it... but I'm not sure that's an intuitive behavior; this might be a loop you really do want a special case on. > and instead store the dof index of each SCALAR variable in a vector > in DofMap? Right. > - However, I can't see where in the code one should compute the dof > index of a SCALAR variable in the first place? That's all in dof_map.C. > - Ben, regarding setting the nonzero count and the number of rows that > you mentioned; where is this controlled? In SparsityPattern? In SparseMatrix, I believe, although the code to build the sparsity pattern is in DofMap. --- Roy ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
