Actual source code: test4.c

slepc-3.17.0 2022-03-31
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-, 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: {
 17:   FN             fn1,fn2;

 19:   SlepcInitialize(&argc,&argv,(char*)0,help);
 20:   FNCreate(PETSC_COMM_WORLD,&fn1);
 21:   FNSetOptionsPrefix(fn1,"f1_");
 22:   FNSetFromOptions(fn1);
 23:   FNView(fn1,NULL);
 24:   FNDestroy(&fn1);
 25:   FNCreate(PETSC_COMM_WORLD,&fn2);
 26:   FNSetOptionsPrefix(fn2,"f2_");
 27:   FNSetFromOptions(fn2);
 28:   FNView(fn2,NULL);
 29:   FNDestroy(&fn2);
 30:   SlepcFinalize();
 31:   return 0;
 32: }

 34: /*TEST

 36:    test:
 37:       suffix: 1
 38:       nsize: 1
 39:       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

 41: TEST*/