Actual source code: itcl.c
1: /*
2: Code for setting EPS options from the options database.
3: */
5: #include src/eps/epsimpl.h
6: #include "petscsys.h"
10: /*@C
11: EPSSetOptionsPrefix - Sets the prefix used for searching for all
12: EPS options in the database.
14: Collective on EPS
16: Input Parameters:
17: + eps - the eigensolver context
18: - prefix - the prefix string to prepend to all EPS option requests
20: Notes:
21: A hyphen (-) must NOT be given at the beginning of the prefix name.
22: The first character of all runtime options is AUTOMATICALLY the
23: hyphen.
25: For example, to distinguish between the runtime options for two
26: different EPS contexts, one could call
27: .vb
28: EPSSetOptionsPrefix(eps1,"eig1_")
29: EPSSetOptionsPrefix(eps2,"eig2_")
30: .ve
32: Level: advanced
34: .seealso: EPSAppendOptionsPrefix(), EPSGetOptionsPrefix()
35: @*/
36: int EPSSetOptionsPrefix(EPS eps,char *prefix)
37: {
41: PetscObjectSetOptionsPrefix((PetscObject)eps, prefix);
42: STSetOptionsPrefix(eps->OP,prefix);
43: return(0);
44: }
45:
48: /*@C
49: EPSAppendOptionsPrefix - Appends to the prefix used for searching for all
50: EPS options in the database.
52: Collective on EPS
54: Input Parameters:
55: + eps - the eigensolver context
56: - prefix - the prefix string to prepend to all EPS option requests
58: Notes:
59: A hyphen (-) must NOT be given at the beginning of the prefix name.
60: The first character of all runtime options is AUTOMATICALLY the hyphen.
62: Level: advanced
64: .seealso: EPSSetOptionsPrefix(), EPSGetOptionsPrefix()
65: @*/
66: int EPSAppendOptionsPrefix(EPS eps,char *prefix)
67: {
71: PetscObjectAppendOptionsPrefix((PetscObject)eps, prefix);
72: STAppendOptionsPrefix(eps->OP,prefix);
73: return(0);
74: }
78: /*@C
79: EPSGetOptionsPrefix - Gets the prefix used for searching for all
80: EPS options in the database.
82: Not Collective
84: Input Parameters:
85: . eps - the eigensolver context
87: Output Parameters:
88: . prefix - pointer to the prefix string used is returned
90: Notes: On the fortran side, the user should pass in a string 'prefix' of
91: sufficient length to hold the prefix.
93: Level: advanced
95: .seealso: EPSSetOptionsPrefix(), EPSAppendOptionsPrefix()
96: @*/
97: int EPSGetOptionsPrefix(EPS eps,char **prefix)
98: {
102: PetscObjectGetOptionsPrefix((PetscObject)eps, prefix);
103: return(0);
104: }