1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="https://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetBalance.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<link rel="stylesheet" href="/slepc.css" type="text/css">
<TITLE>EPSSetBalance</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>slepc-3.22.2 2024-12-02</b></div>
<div id="bugreport" align=right><a href="mailto:slepc-maint@upv.es?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: slepc-3.22.2 v3.22.2 docs/manualpages/EPS/EPSSetBalance.html "><small>Report Typos and Errors</small></a></div>
<H1>EPSSetBalance</H1>
Specifies the balancing technique to be employed by the eigensolver, and some parameters associated to it.
<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
<PRE>
#include "slepceps.h"
<A HREF="https://petsc.org/release/manualpages/Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../EPS/EPSSetBalance.html#EPSSetBalance">EPSSetBalance</A>(<A HREF="../EPS/EPS.html#EPS">EPS</A> eps,<A HREF="../EPS/EPSBalance.html#EPSBalance">EPSBalance</A> bal,<A HREF="https://petsc.org/release/manualpages/Sys/PetscInt.html#PetscInt">PetscInt</A> its,<A HREF="https://petsc.org/release/manualpages/Sys/PetscReal.html#PetscReal">PetscReal</A> cutoff)
</PRE>
Logically Collective
<P>
<H3><FONT COLOR="#883300">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eps </B></TD><TD> - the eigensolver context
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bal </B></TD><TD> - the balancing method, one of <A HREF="../EPS/EPSBalance.html#EPSBalance">EPS_BALANCE_NONE</A>, <A HREF="../EPS/EPSBalance.html#EPSBalance">EPS_BALANCE_ONESIDE</A>,
<A HREF="../EPS/EPSBalance.html#EPSBalance">EPS_BALANCE_TWOSIDE</A>, or <A HREF="../EPS/EPSBalance.html#EPSBalance">EPS_BALANCE_USER</A>
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>its </B></TD><TD> - number of iterations of the balancing algorithm
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cutoff </B></TD><TD> - cutoff value
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#883300">Options Database Keys</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance <method> </B></TD><TD> - the balancing method, where <method> is one of
'none', 'oneside', 'twoside', or 'user'
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance_its <its> </B></TD><TD> - number of iterations
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-eps_balance_cutoff <cutoff> </B></TD><TD> - cutoff value
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#883300">Notes</FONT></H3>
When balancing is enabled, the solver works implicitly with matrix DAD^-1,
where D is an appropriate diagonal matrix. This improves the accuracy of
the computed results in some cases. See the SLEPc Users Manual for details.
<P>
Balancing makes sense only for non-Hermitian problems when the required
precision is high (i.e. a small tolerance such as 1e-15).
<P>
By default, balancing is disabled. The two-sided method is much more
effective than the one-sided counterpart, but it requires the system
matrices to have the <A HREF="https://petsc.org/release/manualpages/Mat/MatMultTranspose.html#MatMultTranspose">MatMultTranspose</A> operation defined.
<P>
The parameter 'its' is the number of iterations performed by the method. The
cutoff value is used only in the two-side variant. Use <A HREF="https://petsc.org/release/manualpages/Sys/PETSC_DETERMINE.html#PETSC_DETERMINE">PETSC_DETERMINE</A> to assign
a reasonably good value, or <A HREF="https://petsc.org/release/manualpages/Sys/PETSC_CURRENT.html#PETSC_CURRENT">PETSC_CURRENT</A> to leave the value unchanged.
<P>
User-defined balancing is allowed provided that the corresponding matrix
is set via <A HREF="../ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</A>.
<P>
<P>
<H3><FONT COLOR="#883300">See Also</FONT></H3>
<A HREF="../EPS/EPSGetBalance.html#EPSGetBalance">EPSGetBalance</A>(), <A HREF="../EPS/EPSBalance.html#EPSBalance">EPSBalance</A>, <A HREF="../ST/STSetBalanceMatrix.html#STSetBalanceMatrix">STSetBalanceMatrix</A>()
<BR><P><B></B><H3><FONT COLOR="#883300">Level</FONT></H3>intermediate<BR>
<H3><FONT COLOR="#883300">Location</FONT></H3>
</B><A HREF="../../../src/eps/interface/epsopts.c.html#EPSSetBalance">src/eps/interface/epsopts.c</A>
<BR><BR><A HREF="./index.html">Index of all EPS routines</A>
<BR><A HREF="../../../docs/manual.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|