Poster of Linux kernelThe best gift for a Linux geek
petsc_linear_solver.h

petsc_linear_solver.h

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

petsc_linear_solver.h -  

SYNOPSIS


 

Classes


class PetscLinearSolver< T >
 

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 62 of file petsc_linear_solver.h.  

Function Documentation

 

PetscErrorCode __libmesh_petsc_preconditioner_apply (void *ctx, Vecx, Vecy)This function is called by PETSc to acctually apply the preconditioner. ctx will hold the Preconditioner.

Definition at line 51 of file petsc_linear_solver.C.

References Preconditioner< T >::apply().

Referenced by PetscNonlinearSolver< T >::init(), and PetscLinearSolver< T >::init().

  {
    Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number>*>(ctx);

    PetscVector<Number> x_vec(x);
    PetscVector<Number> y_vec(y);

    preconditioner->apply(x_vec,y_vec);

    return 0;
  }
 

PetscErrorCode __libmesh_petsc_preconditioner_apply (PC, Vecx, Vecy)

Definition at line 73 of file petsc_linear_solver.C.

References Preconditioner< T >::apply().

  {
    void *ctx;
    PetscErrorCode ierr = PCShellGetContext(pc,&ctx);CHKERRQ(ierr);
    Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number>*>(ctx);

    PetscVector<Number> x_vec(x);
    PetscVector<Number> y_vec(y);

    preconditioner->apply(x_vec,y_vec);

    return 0;
  }
 

PetscErrorCode __libmesh_petsc_preconditioner_setup (PC)

Definition at line 63 of file petsc_linear_solver.C.

References Preconditioner< T >::init().

  {
    void *ctx;
    PetscErrorCode ierr = PCShellGetContext(pc,&ctx);CHKERRQ(ierr);
    Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number>*>(ctx);
    preconditioner->init();

    return 0;
  }
 

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 42 of file petsc_linear_solver.C.

References Preconditioner< T >::init().

Referenced by PetscNonlinearSolver< T >::init(), and PetscLinearSolver< T >::init().

  {
    Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number>*>(ctx);
    preconditioner->init();

    return 0;
  }
 

Variable Documentation

 

EXTERN_C_FOR_PETSC_BEGIN EXTERN_C_FOR_PETSC_END typedef int PetscErrorCodePetsc include files.

Definition at line 61 of file petsc_linear_solver.h.  

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Classes
Typedefs
Functions
Variables
Typedef Documentation
typedef int PetscInt
Function Documentation
PetscErrorCode __libmesh_petsc_preconditioner_apply (void *ctx, Vecx, Vecy)This function is called by PETSc to acctually apply the preconditioner. ctx will hold the Preconditioner.
PetscErrorCode __libmesh_petsc_preconditioner_apply (PC, Vecx, Vecy)
PetscErrorCode __libmesh_petsc_preconditioner_setup (PC)
PetscErrorCode __libmesh_petsc_preconditioner_setup (void *ctx)This function is called by PETSc to initialize the preconditioner. ctx will hold the Preconditioner.
Variable Documentation
EXTERN_C_FOR_PETSC_BEGIN EXTERN_C_FOR_PETSC_END typedef int PetscErrorCodePetsc include files.
Author

This document was created by man2html, using the manual pages.
Time: 21:52:24 GMT, April 16, 2011