Subversion Repositories slepc-dev

Rev

Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1490 Rev 1504
Line 31... Line 31...
@*/
@*/
PetscErrorCode SVDSolve(SVD svd)
PetscErrorCode SVDSolve(SVD svd)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
  PetscTruth     flg;
  PetscTruth     flg;
  int            i;
  PetscInt       i;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
 
 
  if (!svd->setupcalled) { ierr = SVDSetUp(svd);CHKERRQ(ierr); }
  if (!svd->setupcalled) { ierr = SVDSetUp(svd);CHKERRQ(ierr); }
Line 80... Line 80...
      which convergence was successfully reached, or failure was detected.  
      which convergence was successfully reached, or failure was detected.  
      Call SVDGetConvergedReason() to determine if the solver converged or
      Call SVDGetConvergedReason() to determine if the solver converged or
      failed and why.
      failed and why.
 
 
@*/
@*/
PetscErrorCode SVDGetIterationNumber(SVD svd,int *its)
PetscErrorCode SVDGetIterationNumber(SVD svd,PetscInt *its)
{
{
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
  PetscValidIntPointer(its,2);
  PetscValidIntPointer(its,2);
  *its = svd->its;
  *its = svd->its;
Line 143... Line 143...
   This function should be called after SVDSolve() has finished.
   This function should be called after SVDSolve() has finished.
 
 
   Level: beginner
   Level: beginner
 
 
@*/
@*/
PetscErrorCode SVDGetConverged(SVD svd,int *nconv)
PetscErrorCode SVDGetConverged(SVD svd,PetscInt *nconv)
{
{
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
  PetscValidIntPointer(nconv,2);
  PetscValidIntPointer(nconv,2);
  if (svd->reason == SVD_CONVERGED_ITERATING) {
  if (svd->reason == SVD_CONVERGED_ITERATING) {
Line 181... Line 181...
 
 
   Level: beginner
   Level: beginner
 
 
.seealso: SVDSolve(),  SVDGetConverged()
.seealso: SVDSolve(),  SVDGetConverged()
@*/
@*/
PetscErrorCode SVDGetSingularTriplet(SVD svd, int i, PetscReal *sigma, Vec u, Vec v)
PetscErrorCode SVDGetSingularTriplet(SVD svd, PetscInt i, PetscReal *sigma, Vec u, Vec v)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
  PetscReal      norm;
  PetscReal      norm;
  int            j;
  PetscInt       j;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
  PetscValidPointer(sigma,3);
  PetscValidPointer(sigma,3);
  if (svd->reason == SVD_CONVERGED_ITERATING) {
  if (svd->reason == SVD_CONVERGED_ITERATING) {
Line 242... Line 242...
 
 
   Level: beginner
   Level: beginner
 
 
.seealso: SVDSolve(), SVDGetConverged(), SVDComputeRelativeError()
.seealso: SVDSolve(), SVDGetConverged(), SVDComputeRelativeError()
@*/
@*/
PetscErrorCode SVDComputeResidualNorms(SVD svd, int i, PetscReal *norm1, PetscReal *norm2)
PetscErrorCode SVDComputeResidualNorms(SVD svd, PetscInt i, PetscReal *norm1, PetscReal *norm2)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
  Vec            u,v,x = PETSC_NULL,y = PETSC_NULL;
  Vec            u,v,x = PETSC_NULL,y = PETSC_NULL;
  PetscReal      sigma;
  PetscReal      sigma;
 
 
Line 301... Line 301...
 
 
   Level: beginner
   Level: beginner
 
 
.seealso: SVDSolve(), SVDComputeResidualNorms()
.seealso: SVDSolve(), SVDComputeResidualNorms()
@*/
@*/
PetscErrorCode SVDComputeRelativeError(SVD svd, int i, PetscReal *error)
PetscErrorCode SVDComputeRelativeError(SVD svd,PetscInt i,PetscReal *error)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
  PetscReal      sigma,norm1,norm2;
  PetscReal      sigma,norm1,norm2;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
Line 337... Line 337...
   These counters are reset to zero at each successive call to SVDSolve().
   These counters are reset to zero at each successive call to SVDSolve().
 
 
   Level: intermediate
   Level: intermediate
 
 
@*/
@*/
PetscErrorCode SVDGetOperationCounters(SVD svd,int* matvecs,int* dots)
PetscErrorCode SVDGetOperationCounters(SVD svd,PetscInt* matvecs,PetscInt* dots)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);
  PetscValidHeaderSpecific(svd,SVD_COOKIE,1);