Actual source code: test4.c

slepc-3.6.3 2016-03-29
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain

  6:    This file is part of SLEPc.

  8:    SLEPc is free software: you can redistribute it and/or modify it under  the
  9:    terms of version 3 of the GNU Lesser General Public License as published by
 10:    the Free Software Foundation.

 12:    SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
 13:    WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
 14:    FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
 15:    more details.

 17:    You  should have received a copy of the GNU Lesser General  Public  License
 18:    along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
 19:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 20: */

 22: static char help[] = "Test setting FN parameters from the command line.\n\n";

 24: #include <slepcfn.h>

 28: int main(int argc,char **argv)
 29: {
 31:   FN             fn1,fn2;

 33:   SlepcInitialize(&argc,&argv,(char*)0,help);
 34:   FNCreate(PETSC_COMM_WORLD,&fn1);
 35:   FNSetOptionsPrefix(fn1,"f1_");
 36:   FNSetFromOptions(fn1);
 37:   FNView(fn1,NULL);
 38:   FNDestroy(&fn1);
 39:   FNCreate(PETSC_COMM_WORLD,&fn2);
 40:   FNSetOptionsPrefix(fn2,"f2_");
 41:   FNSetFromOptions(fn2);
 42:   FNView(fn2,NULL);
 43:   FNDestroy(&fn2);
 44:   SlepcFinalize();
 45:   return 0;
 46: }