petsc_linear_solver.h File Reference
Go to the source code of this file.
Classes | |
| class | libMesh::PetscLinearSolver< T > |
Namespaces | |
| namespace | libMesh |
Typedefs | |
| typedef int | PetscInt |
Functions | |
| PetscErrorCode | __libmesh_petsc_preconditioner_setup (void *ctx) |
| PetscErrorCode | __libmesh_petsc_preconditioner_apply (void *ctx, Vec x, Vec y) |
| PetscErrorCode | __libmesh_petsc_preconditioner_setup (PC) |
| PetscErrorCode | __libmesh_petsc_preconditioner_apply (PC, Vec x, Vec y) |
Variables | |
| EXTERN_C_FOR_PETSC_BEGIN EXTERN_C_FOR_PETSC_END typedef int | PetscErrorCode |
Typedef Documentation
| typedef int PetscInt |
Definition at line 61 of file petsc_linear_solver.h.
Function Documentation
| PetscErrorCode __libmesh_petsc_preconditioner_apply | ( | PC | , | |
| Vec | x, | |||
| Vec | y | |||
| ) |
Definition at line 91 of file petsc_linear_solver.C.
00092 { 00093 void *ctx; 00094 PetscErrorCode ierr = PCShellGetContext(pc,&ctx);CHKERRQ(ierr); 00095 Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number>*>(ctx); 00096 00097 PetscVector<Number> x_vec(x); 00098 PetscVector<Number> y_vec(y); 00099 00100 preconditioner->apply(x_vec,y_vec); 00101 00102 return 0; 00103 }
| PetscErrorCode __libmesh_petsc_preconditioner_apply | ( | void * | ctx, | |
| Vec | x, | |||
| Vec | y | |||
| ) |
This function is called by PETSc to acctually apply the preconditioner. ctx will hold the Preconditioner.
Definition at line 62 of file petsc_linear_solver.C.
Referenced by libMesh::PetscNonlinearSolver< T >::init(), and libMesh::PetscLinearSolver< T >::init().
| PetscErrorCode __libmesh_petsc_preconditioner_setup | ( | PC | ) |
Definition at line 74 of file petsc_linear_solver.C.
References libMesh::err.
00075 { 00076 void *ctx; 00077 PetscErrorCode ierr = PCShellGetContext(pc,&ctx);CHKERRQ(ierr); 00078 Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number>*>(ctx); 00079 00080 if(!preconditioner->initialized()) 00081 { 00082 err<<"Preconditioner not initialized! Make sure you call init() before solve!"<<std::endl; 00083 libmesh_error(); 00084 } 00085 00086 preconditioner->setup(); 00087 00088 return 0; 00089 }
| PetscErrorCode __libmesh_petsc_preconditioner_setup | ( | void * | ctx | ) |
This function is called by PETSc to initialize the preconditioner. ctx will hold the Preconditioner.
Definition at line 46 of file petsc_linear_solver.C.
References libMesh::err.
Referenced by libMesh::PetscNonlinearSolver< T >::init(), and libMesh::PetscLinearSolver< T >::init().
00047 { 00048 Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number>*>(ctx); 00049 00050 if(!preconditioner->initialized()) 00051 { 00052 err<<"Preconditioner not initialized! Make sure you call init() before solve!"<<std::endl; 00053 libmesh_error(); 00054 } 00055 00056 preconditioner->setup(); 00057 00058 return 0; 00059 }
Variable Documentation
| EXTERN_C_FOR_PETSC_BEGIN EXTERN_C_FOR_PETSC_END typedef int PetscErrorCode |
Petsc include files.
Definition at line 60 of file petsc_linear_solver.h.
Referenced by DMCreate_libMesh(), DMCreateDomainDecomposition_libMesh(), DMCreateDomainDecompositionDM_libMesh(), DMCreateFieldDecomposition_libMesh(), DMCreateFieldDecompositionDM_libMesh(), DMCreateGlobalVector_libMesh(), DMCreateLibMesh(), DMCreateMatrix_libMesh(), DMDestroy_libMesh(), DMFunction_libMesh(), DMJacobian_libMesh(), DMLibMeshCreateDomainDecompositionDM(), DMLibMeshCreateFieldDecompositionDM(), DMLibMeshGetBlocks(), DMLibMeshGetSystem(), DMLibMeshGetVariables(), DMLibMeshParseDecompositionDescriptor_Private(), DMLibMeshSetSystem(), DMLibMeshSetUpName_Private(), DMSetUp_libMesh(), DMVariableBounds_libMesh(), and DMView_libMesh().
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:49 UTC
Hosted By: