Actual source code: test4.c
slepc-3.11.2 2019-07-30
1: /*
2: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3: SLEPc - Scalable Library for Eigenvalue Problem Computations
4: Copyright (c) 2002-2019, Universitat Politecnica de Valencia, Spain
6: This file is part of SLEPc.
7: SLEPc is distributed under a 2-clause BSD license (see LICENSE).
8: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9: */
11: static char help[] = "Test setting FN parameters from the command line.\n\n";
13: #include <slepcfn.h>
15: int main(int argc,char **argv)
16: {
18: FN fn1,fn2;
20: SlepcInitialize(&argc,&argv,(char*)0,help);if (ierr) return ierr;
21: FNCreate(PETSC_COMM_WORLD,&fn1);
22: FNSetOptionsPrefix(fn1,"f1_");
23: FNSetFromOptions(fn1);
24: FNView(fn1,NULL);
25: FNDestroy(&fn1);
26: FNCreate(PETSC_COMM_WORLD,&fn2);
27: FNSetOptionsPrefix(fn2,"f2_");
28: FNSetFromOptions(fn2);
29: FNView(fn2,NULL);
30: FNDestroy(&fn2);
31: SlepcFinalize();
32: return ierr;
33: }
35: /*TEST
37: test:
38: suffix: 1
39: nsize: 1
40: args: -f1_fn_type exp -f1_fn_scale -2.5 -f2_fn_type rational -f2_fn_rational_numerator -1,1 -f2_fn_rational_denominator 1,-6,4
42: TEST*/