Have a look at systems_of_equations_ex6. You can do "petsc_linear_solver->set_solver_configuration(petsc_solver_config);", where petsc_solver_config is a subclass of SolverConfiguration, and you put your solver config inside the virtual configure_solver method. This will make sure that the solver config stuff is called at the appropriate time so that it is not overriden.
David On Wed, Jul 20, 2016 at 2:31 PM, Michael Povolotskyi <mpovo...@purdue.edu> wrote: > thank you, John. > I need to do in the code. > If I get ksp object from the PetscLinearSolver object, it might not help > me, because the ::solve() method of the PetscLinearSolver will override > my changes. > Am I right? > Michael. > > On 07/20/2016 02:28 PM, John Peterson wrote: > > > > > > On Wed, Jul 20, 2016 at 12:20 PM, Michael Povolotskyi > > <mpovo...@purdue.edu <mailto:mpovo...@purdue.edu>> wrote: > > > > Dear Libmesh developers/users, > > I have the following question: > > > > How to configure the linear solver of a linear system to use MUMPS > > package available though PETSc? > > In PETSc I would do something like this: > > > > ierr = KSPSetType(ksp,KSPPREONLY); > > ierr = PCSetType(pc,PCLU); > > ierr = PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS); > > > > > > You can do it from the command line: > > > > -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package mumps > > > > If you want to do it in code, you can always call ksp() and pc() to > > get the corresponding objects from a PetscLinearSolver object, and > > make PETSc calls directly on them. > > > > -- > > John > > -- > Michael Povolotskyi, PhD > Research Assistant Professor > Network for Computational Nanotechnology > Hall for Discover and Learning Research, Room 441 > 207 South Martin Jischke Drive > West Lafayette, IN 47907 > Phone (765) 4949396 > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > Libmesh-users mailing list > Libmesh-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libmesh-users > ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users