On Thu, Jul 18, 2013 at 12:51 PM, Bishesh Khanal <[email protected]>wrote:
> Thanks Jed. I implemented a 2D case which worked when running the program > with the options: -pc_type fieldsplit -pc_fieldsplit_type schur > -pc_fieldsplit_detect_saddle_point > But I encountered some problems when using following options (this set of > options is based on one of the tutorial slides in the website for > multiphysics problem): > -ksp_type fgmres -pc_type mg -mg_levels_ksp_type fgmres > -mg_levels_ksp_max_it 2 -mg_levels_pc_type fieldsplit > -mg_levels_pc_fieldsplit_detect_saddle_point ‐mg_levels_pc_fieldsplit_type > schur -mg_levels_pc_fieldsplit_factorization_type full > -mg_levels_pc_fieldsplit_schur_precondition user > -mg_levels_fieldsplit_0_ksp_type preonly -mg_levels_fieldsplit_0_pc_type > sor -mg_levels_fieldsplit_0_pc_sor_forward -mg_levels_fieldsplit_0_ksp_type > gmres -mg_levels_fieldsplit_0_pc_type none -mg_levels_fieldsplit_ksp_max_it > 5 -mg_coarse_pc_type svd > > The relevant error messages: > [1]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [1]PETSC ERROR: Invalid argument! > [1]PETSC ERROR: Unknown logical value: ‐mg_levels_pc_fieldsplit_type! > [1]PETSC ERROR: > ------------------------------------------------------------------------ > [1]PETSC ERROR: Petsc Release Version 3.4.1, Jun, 10, 2013 > ... > [1]PETSC ERROR: PetscOptionsStringToBool() line 173 in > /home/bkhanal/Documents/softwares/petsc-3.4.1/src/sys/objects/options.c > [1]PETSC ERROR: PetscOptionsGetBool() line 1530 in > /home/bkhanal/Documents/softwares/petsc-3.4.1/src/sys/objects/options.c > [1]PETSC ERROR: PCSetFromOptions_FieldSplit() line 1060 in > /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/pc/impls/fieldsplit/fieldsplit.c > These line numbers do not match the source. How did you install? https://bitbucket.org/petsc/petsc/src/160ea6873d9fa631d01b6f8a2d8b12aece7dfb61/src/ksp/pc/impls/fieldsplit/fieldsplit.c?at=maint#cl-1060 Matt > [1]PETSC ERROR: PCSetFromOptions() line 174 in > /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/pc/interface/pcset.c > [1]PETSC ERROR: KSPSetFromOptions() line 357 in > /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/ksp/interface/itcl.c > [1]PETSC ERROR: PCSetUp_MG() line 677 in > /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/pc/impls/mg/mg.c > [1]PETSC ERROR: PCSetUp() line 890 in > /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/pc/interface/precon.c > [1]PETSC ERROR: KSPSetUp() line 278 in > /home/bkhanal/Documents/softwares/petsc-3.4.1/src/ksp/ksp/interface/itfunc.c > ... > And the warnings: > > WARNING! There are options you set that were not used! > WARNING! could be spelling mistake, etc! > Option left: name:-mg_coarse_pc_type value: svd > Option left: name:-mg_levels_fieldsplit_0_ksp_type value: gmres > Option left: name:-mg_levels_fieldsplit_0_pc_sor_forward (no value) > Option left: name:-mg_levels_fieldsplit_0_pc_type value: none > Option left: name:-mg_levels_fieldsplit_ksp_max_it value: 5 > Option left: name:-mg_levels_ksp_max_it value: 2 > Option left: name:-mg_levels_ksp_type value: fgmres > Option left: name:-mg_levels_pc_fieldsplit_factorization_type value: full > Option left: name:-mg_levels_pc_fieldsplit_schur_precondition value: user > > Is it that -mg_levels_pc_fieldsplit_type should be followed by some "bool" > value ? 1 ? true ? > I tried using "true", then it did not give any error but the following > warnings: > WARNING! There are options you set that were not used! > WARNING! could be spelling mistake, etc! > Option left: name:-mg_coarse_pc_type value: svd > Option left: name:-mg_levels_fieldsplit_0_pc_sor_forward (no value) > Option left: name:-mg_levels_pc_fieldsplit_factorization_type value: full > > I ran the program for the small size. Now, before I implement the 3D case > with this approach instead of trying the implementation of Augmented > Lagrangian method (M2 in previous email) my question is: > If I use the Petsc with the method you suggested (PCFieldSplit, multigrid > for momentum etc), tentatively how much of computing resources and the > corresponding time would it require to solve the problem of the size I want > (around 250^3 grid sized domain) ? > > > > On Wed, Jul 17, 2013 at 9:48 PM, Jed Brown <[email protected]> wrote: > >> Bishesh Khanal <[email protected]> writes: >> >> > Now, I implemented two different approaches, each for both 2D and 3D, in >> > MATLAB. It works for the smaller sizes but I have problems solving it >> for >> > the problem size I need (250^3 grid size). >> > I use staggered grid with p on cell centers, and components of v on cell >> > faces. Similar split up of K to cell center and faces to account for the >> > variable viscosity case) >> >> Okay, you're using a staggered-grid finite difference discretization of >> variable-viscosity Stokes. This is a common problem and I recommend >> starting with PCFieldSplit with Schur complement reduction (make that >> work first, then switch to block preconditioner). You can use PCLSC or >> (probably better for you), assemble a preconditioning matrix containing >> the inverse viscosity in the pressure-pressure block. This diagonal >> matrix is a spectrally equivalent (or nearly so, depending on >> discretization) approximation of the Schur complement. The velocity >> block can be solved with algebraic multigrid. Read the PCFieldSplit >> docs (follow papers as appropriate) and let us know if you get stuck. >> > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
