LCOV - code coverage report
Current view: top level - sys/classes/fn/tests - test4.c (source / functions) Hit Total Coverage
Test: SLEPc Lines: 15 15 100.0 %
Date: 2024-05-06 00:49:34 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       3             :    SLEPc - Scalable Library for Eigenvalue Problem Computations
       4             :    Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain
       5             : 
       6             :    This file is part of SLEPc.
       7             :    SLEPc is distributed under a 2-clause BSD license (see LICENSE).
       8             :    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       9             : */
      10             : 
      11             : static char help[] = "Test setting FN parameters from the command line.\n\n";
      12             : 
      13             : #include <slepcfn.h>
      14             : 
      15           1 : int main(int argc,char **argv)
      16             : {
      17           1 :   FN             fn1,fn2;
      18             : 
      19           1 :   PetscFunctionBeginUser;
      20           1 :   PetscCall(SlepcInitialize(&argc,&argv,(char*)0,help));
      21           1 :   PetscCall(FNCreate(PETSC_COMM_WORLD,&fn1));
      22           1 :   PetscCall(FNSetOptionsPrefix(fn1,"f1_"));
      23           1 :   PetscCall(FNSetFromOptions(fn1));
      24           1 :   PetscCall(FNView(fn1,NULL));
      25           1 :   PetscCall(FNDestroy(&fn1));
      26           1 :   PetscCall(FNCreate(PETSC_COMM_WORLD,&fn2));
      27           1 :   PetscCall(FNSetOptionsPrefix(fn2,"f2_"));
      28           1 :   PetscCall(FNSetFromOptions(fn2));
      29           1 :   PetscCall(FNView(fn2,NULL));
      30           1 :   PetscCall(FNDestroy(&fn2));
      31           1 :   PetscCall(SlepcFinalize());
      32             :   return 0;
      33             : }
      34             : 
      35             : /*TEST
      36             : 
      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
      41             : 
      42             : TEST*/

Generated by: LCOV version 1.14