On Thu, 22 Apr 2010 09:32:12 -0400, Boyce Griffith <[email protected]> wrote: > How should one setup the index set? Is it just a mapping from Vec index > to field index? E.g., each Vec entry is assigned to field 0 or 1 (or 2 > or ...)?
If your variables are interlaced like u0,v0,w0,u1,v1,w1,... Then you can (a) set a block size for the matrix with MatSetBlockSize, (b) use BAIJ in which case the block size is built in, or (c) use -pc_fieldsplit_block_size. Then to define the splits, use -pc_fieldsplit_0_fields 0,3 -pc_fieldsplit_1_fields 1 -pc_fieldsplit_2_fields 2,4,5 to split six fields into three splits of sizes 2,1,3. For something more general, use ISCreate() and PCFieldSplitSetIS(). The index sets should be created on the same communicator as the matrix and contain the global indices corresponding to the desired field. So if we had two processors with two nodes each (24 dofs total), the splits above would be given by the following index sets (where '|' separates processors): split0: 0 3 6 9 | 12 15 18 21 split1: 1 7 | 13 19 split2: 2 4 5 8 10 11 | 14 16 17 20 22 23 I hope this is clear. > For now, I am just assembling the whole system. I am also using > bi-/trilinear elements --- I recall you sending some emails to the list > about getting better performance with unassembled systems, but that this > was mainly for higher order elements. Am I remembering correctly? Yeah, unassembled doesn't pay off for Q_1 elements. But if you have a system J = [A B; C D] and use a preconditioner that needs these blocks separately, then *purely to reduce total memory usage*, you might want to define the action of J in terms of these separate blocks (rather than assembling J and extracting the blocks). It's easy enough to define this with MatShell, I think generic support is coming in the next few months (so that this choice can become a runtime option). Jed ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
