"Fossies" - the Fresh Open Source Software Archive

Member "petsc-3.12.4/docs/manualpages/Sys/PetscOptionsEList.html" (4 Feb 2020, 6684 Bytes) of package /linux/misc/petsc-3.12.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
    2 <HTML>
    3 <HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsEList.html" />
    4 <META NAME="GENERATOR" CONTENT="DOCTEXT">
    5 <TITLE>PetscOptionsEList</TITLE>
    6 </HEAD>
    7 <BODY BGCOLOR="FFFFFF">
    8    <div id="version" align=right><b>petsc-3.12.4 2020-02-04</b></div>
    9    <div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.12.4 v3.12.4 docs/manualpages/Sys/PetscOptionsEList.html "><small>Report Typos and Errors</small></a></div>
   10 <A NAME="PetscOptionsEList"><H1>PetscOptionsEList</H1></A>
   11 Puts a list of option values that a single one may be selected from 
   12 <H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
   13 <PRE>
   14 #include "petscsys.h"   
   15 <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A>  PetscOptionsEList_Private(PetscOptionItems *PetscOptionsObject,const char opt[],const char ltext[],const char man[],const char *const *list,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> ntext,const char currentvalue[],<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> *value,<A HREF="../Sys/PetscBool.html#PetscBool">PetscBool</A>  *set)
   16 </PRE>
   17 Logically Collective on the communicator passed in <A HREF="../Sys/PetscOptionsBegin.html#PetscOptionsBegin">PetscOptionsBegin</A>()
   18 <P>
   19 <H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
   20 <TABLE border="0" cellpadding="0" cellspacing="0">
   21 <TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>opt </B></TD><TD>- option name
   22 </TD></TR>
   23 <TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ltext </B></TD><TD>- short string that describes the option
   24 </TD></TR>
   25 <TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>man </B></TD><TD>- manual page with additional information on option
   26 </TD></TR>
   27 <TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>list </B></TD><TD>- the possible choices (one of these must be selected, anything else is invalid)
   28 </TD></TR>
   29 <TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ntext </B></TD><TD>- number of choices
   30 </TD></TR>
   31 <TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>currentvalue </B></TD><TD>- the current value; caller is responsible for setting this value correctly. Normally this is done with
   32 </TD></TR></TABLE>
   33 <pre>
   34                 PetscOptionsElist(..., obj-&gt;value,&amp;value,&amp;flg);
   35 </pre>
   36 <pre>
   37                 if (flg) {
   38 </pre>
   39 <P>
   40 <P>
   41 <H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
   42 <TABLE border="0" cellpadding="0" cellspacing="0">
   43 <TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>value </B></TD><TD>- the index of the value to return
   44 </TD></TR>
   45 <TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>set </B></TD><TD>- <A HREF="../Sys/PETSC_TRUE.html#PETSC_TRUE">PETSC_TRUE</A> if found, else <A HREF="../Sys/PETSC_FALSE.html#PETSC_FALSE">PETSC_FALSE</A>
   46 </TD></TR></TABLE>
   47 <P>
   48 
   49 <P>
   50 <H3><FONT COLOR="#CC3333">Notes</FONT></H3>
   51 Must be between a <A HREF="../Sys/PetscOptionsBegin.html#PetscOptionsBegin">PetscOptionsBegin</A>() and a <A HREF="../Sys/PetscOptionsEnd.html#PetscOptionsEnd">PetscOptionsEnd</A>()
   52 <P>
   53 If the user does not supply the option at all value is NOT changed. Thus
   54 you should ALWAYS initialize value if you access it without first checking if the set flag is true.
   55 <P>
   56 See <A HREF="../Sys/PetscOptionsFList.html#PetscOptionsFList">PetscOptionsFList</A>() for when the choices are given in a <A HREF="../Sys/PetscFunctionList.html#PetscFunctionList">PetscFunctionList</A>()
   57 <P>
   58 <H3><FONT COLOR="#CC3333">See Also</FONT></H3>
   59  <A HREF="../Sys/PetscOptionsGetInt.html#PetscOptionsGetInt">PetscOptionsGetInt</A>(), <A HREF="../Sys/PetscOptionsGetReal.html#PetscOptionsGetReal">PetscOptionsGetReal</A>(),
   60 <BR><A HREF="../Sys/PetscOptionsHasName.html#PetscOptionsHasName">PetscOptionsHasName</A>(), <A HREF="../Sys/PetscOptionsGetIntArray.html#PetscOptionsGetIntArray">PetscOptionsGetIntArray</A>(), <A HREF="../Sys/PetscOptionsGetRealArray.html#PetscOptionsGetRealArray">PetscOptionsGetRealArray</A>(), <A HREF="../Sys/PetscOptionsBool.html#PetscOptionsBool">PetscOptionsBool</A>(),
   61 <A HREF="../Sys/PetscOptionsName.html#PetscOptionsName">PetscOptionsName</A>(), <A HREF="../Sys/PetscOptionsBegin.html#PetscOptionsBegin">PetscOptionsBegin</A>(), <A HREF="../Sys/PetscOptionsEnd.html#PetscOptionsEnd">PetscOptionsEnd</A>(), <A HREF="../Sys/PetscOptionsHead.html#PetscOptionsHead">PetscOptionsHead</A>(),
   62 <A HREF="../Sys/PetscOptionsStringArray.html#PetscOptionsStringArray">PetscOptionsStringArray</A>(),<A HREF="../Sys/PetscOptionsRealArray.html#PetscOptionsRealArray">PetscOptionsRealArray</A>(), <A HREF="../Sys/PetscOptionsScalar.html#PetscOptionsScalar">PetscOptionsScalar</A>(),
   63 <A HREF="../Sys/PetscOptionsBoolGroupBegin.html#PetscOptionsBoolGroupBegin">PetscOptionsBoolGroupBegin</A>(), <A HREF="../Sys/PetscOptionsBoolGroup.html#PetscOptionsBoolGroup">PetscOptionsBoolGroup</A>(), <A HREF="../Sys/PetscOptionsBoolGroupEnd.html#PetscOptionsBoolGroupEnd">PetscOptionsBoolGroupEnd</A>(),
   64 <A HREF="../Sys/PetscOptionsFList.html#PetscOptionsFList">PetscOptionsFList</A>(), <A HREF="../Sys/PetscOptionsEnum.html#PetscOptionsEnum">PetscOptionsEnum</A>()
   65 <P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>intermediate<BR>
   66 <H3><FONT COLOR="#CC3333">Location</FONT></H3>
   67 </B><A HREF="../../../src/sys/objects/aoptions.c.html#PetscOptionsEList">src/sys/objects/aoptions.c</A>
   68 <P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
   69 <A HREF="../../../src/dm/field/examples/tutorials/ex1.c.html">src/dm/field/examples/tutorials/ex1.c.html</A><BR>
   70 <A HREF="../../../src/ksp/ksp/examples/tutorials/ex29.c.html">src/ksp/ksp/examples/tutorials/ex29.c.html</A><BR>
   71 <A HREF="../../../src/ksp/ksp/examples/tutorials/ex32.c.html">src/ksp/ksp/examples/tutorials/ex32.c.html</A><BR>
   72 <A HREF="../../../src/ksp/ksp/examples/tutorials/ex71.c.html">src/ksp/ksp/examples/tutorials/ex71.c.html</A><BR>
   73 <A HREF="../../../src/ksp/ksp/examples/tutorials/ex73.c.html">src/ksp/ksp/examples/tutorials/ex73.c.html</A><BR>
   74 <A HREF="../../../src/snes/examples/tutorials/ex12.c.html">src/snes/examples/tutorials/ex12.c.html</A><BR>
   75 <A HREF="../../../src/snes/examples/tutorials/ex62.c.html">src/snes/examples/tutorials/ex62.c.html</A><BR>
   76 <A HREF="../../../src/snes/examples/tutorials/ex77.c.html">src/snes/examples/tutorials/ex77.c.html</A><BR>
   77 <A HREF="../../../src/ts/examples/tutorials/ex48.c.html">src/ts/examples/tutorials/ex48.c.html</A><BR>
   78 <BR><A HREF="./index.html">Index of all Sys routines</A>
   79 <BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
   80 <BR><A HREF="../singleindex.html">Index of all manual pages</A>
   81 </BODY></HTML>