[petsc-users] Variable ordering in PC FieldSplit
Subramanya G
subramanya.g at gmail.com
Tue Jul 9 20:57:32 CDT 2013
Hi Barry,
Thanks. I've been looking at KSP/ex43.C and from what I understand the
following are the main steps.
PCFieldSplitSetBlockSize
<http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitSetBlockSize.html#PCFieldSplitSetBlockSize>(pc,3);
// Total number of fields
PCFieldSplitSetFields
<http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitSetFields.html#PCFieldSplitSetFields>(pc,"u",2,ufields,ufields);
// split into groups (u and v)
PCFieldSplitSetFields
<http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitSetFields.html#PCFieldSplitSetFields>(pc,"p",1,pfields,pfields);
// p
I am unable to see where petsc expects to know whether the values in
node major or variable major order.
Thanks,
Subramanya
Subramanya G Sadasiva,
Graduate Research Assistant,
Hierarchical Design and Characterization Laboratory,
School of Mechanical Engineering,
Purdue University.
"The art of structure is where to put the holes"
Robert Le Ricolais, 1894-1977
On Tue, Jul 9, 2013 at 9:49 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> PCFieldsplit is officially neutral as to the arrangement. One can
> define IS's to select any arbitrary subset of variables for each field.
>
> Unofficially we generally recommend node major order, it generally is
> more computationally efficient and the code is a bit easier to use with
> this default.
>
> Barry
>
> On Jul 9, 2013, at 8:41 PM, subramanya sadasiva <subramanya.g at gmail.com>
> wrote:
>
> > I have a small question about the use of PC field split, does it expect
> variables to be arranged in a particular fashion? Should it be variable
> major (all degrees of freedom corresponding to the first followed by all
> degrees of freedom corresponding to the next) or node major ( all degrees
> of freedom corresponding to each node - with a sub block structure . Is
> there some way of switching between the two ?
> > Thanks,
> > Subramanya Sadasiva
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130709/bdfa6a03/attachment.html>
More information about the petsc-users
mailing list