From: Kirk, Benjamin (JSCEG311) <benjamin.kirk1@na...>  20121206 17:57:38

On Dec 5, 2012, at 4:00 PM, Derek Gaston <friedmud@...> wrote: > We also have other users solving with 20200 variables of the same > kind (again, usually first or second order Lagrange) but they might > also have 14 variables of another kind (like cubic hermites) mixed in >  but not always. OK, based on this and Saurabh's feedback it is clear going straight to the type (2) optimizations, while more difficult, is the way to go. I'm going to focus on the DOF indexing part of this for now and then do the block matrix support later. Note the block matrix support will still only be restricted to when all the variables in a system are of the same type, though. To support the general case of multiple variables of different types (Derek's 20 linear lagrange + 4 cubic hermites, for example) I'm proposing we introduce the construct "VariableGroup", which is just like the current Variable except it supports an arbitrary number of variables with the same finite element approximation type and subdomain restriction. So to implement a system of Derek's type that would be two variable groups. To take advantage of this at the DofObject level, the DOF indexing will need to loop quickest within the variable groups. This is because the DofObject does not know anything about the topology of the mesh or anything. So the DOF index offset between two variables within a VariableGroup should not depend on the number of elements in the mesh in any way. Specifically, to number DOFs efficiently will require something like this: for each VariableGroup for each Node for each Variable in the VariableGroup for each Component in the Variable … … … for each Element for each Variable in the VariableGroup for each Component in the Variable … … … … When we only have one Variable per VariableGroup this is exactly the indexing we currently get (without node_major_dofs, anyway). With multiple Variables in a VariableGroup, however, the indexing and resulting sparse matrix ordering will be different. Ben 