PCFIELDSPLIT
Barry Smith
bsmith at mcs.anl.gov
Mon Jul 6 14:44:50 CDT 2009
On Jul 6, 2009, at 2:22 PM, Ryan Yan wrote:
> Hi, All,
> I am reading a large Block Compressed Row Storage PETSc from an
> application into PETSc binary files.
>
> And I use matload to load this PETSc binar matrix as mpiaij. Since
> the matrix is resulting from a finite volume discretization with
> degree of freedom 5 at each cell center, what I am going to is use
> pcfieldsplit and PCFieldSplitGetSubKSP. For each filed I want to
> use the pc type hypre, and hypre type euclid.
>
> My question is: is there any way to send this euclid information by
> a function call, instead of command line parameter. The thing is
> that I want to save some typing, just in case that there are ten
> fields. The way that I am using now is "-fieldsplit_4_sub_pc_type
> hypre, -fieldsplit_4_sub_pc_hypre_type euclid".
>
You can put them in a file called .petscrc or another file and
list that filename in PetscInitialize()
You can call PetscOptionsSet("-
fieldsplit_4_sub_pc_hypre_type","euclid"); in your code right after
PetscInitialize().
Barry
>
> Notice that PCSetType can only pass in the "PCHYPRE".
>
> Thank you very much,
>
> Yan
More information about the petsc-users
mailing list