On Wed, 21 Jan 2009, Derek Gaston wrote: > So, I have one big coupled implicit system.... and then a smaller > implicit system for each variable in the coupled system. I need to > copy the entries from the RHS vector for the big system that > correspond to one variable into the RHS vector for the small system... > > Looking around it appears as though Petsc's VecScatter is exactly what > I want.... it takes a list of indices to copy from and to... the > problem I'm having is with the indices.
If all these systems are on the same mesh, no communication should be necessary. You'll still have to use PETSc APIs, but the existing NumericVector::insert() interface might suffice and stay Trilinos-compatible. > Obviously the dof_indices (of each system) are both what I want to > copy from and too.... but they are only defined in the context of one > element... I really need to have the global list of all of the > dof_indices for a variable. Not if you do the insert()s element by element. (or element-by-element for elem dofs and node by node for node dofs) > Finally: am I going about this all wrong? Is there a better (easier) > way? If I was doing this, I'd first extend System::project_vector() to take a variable specifying projection of only one variable at a time, then if I was worried about efficiency I'd add another overload replacing fptr and gptr with identification of another system and variable so as to avoid the MeshFunction construction and octree lookups. But that would only count as an easier way if it already existed, and "better" depends on whether you like or dislike "more flexible and less efficient". --- Roy ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
