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

petsc_linear_solver.C

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

NAME

petsc_linear_solver.C -  

SYNOPSIS


 

Typedefs


typedef int PetscErrorCode

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 pc)

PetscErrorCode __libmesh_petsc_preconditioner_apply (PC pc, Vec x, Vec y)
 

Typedef Documentation

 

typedef int PetscErrorCode

Definition at line 36 of file petsc_linear_solver.C.  

typedef int PetscInt

Definition at line 37 of file petsc_linear_solver.C.  

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 (PCpc, 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 (PCpc)

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;
  }
 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Typedefs
Functions
Typedef Documentation
typedef int PetscErrorCode
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 (PCpc, Vecx, Vecy)
PetscErrorCode __libmesh_petsc_preconditioner_setup (PCpc)
PetscErrorCode __libmesh_petsc_preconditioner_setup (void *ctx)This function is called by PETSc to initialize the preconditioner. ctx will hold the Preconditioner.
Author

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