Date: 2022-08-09T09:05:31+00:00

Actual source code: test3.c
slepc-3.17.2 2022-08-09
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 RGIsAxisymmetric.\n\n";

     13: #include <slepcrg.h>

     15: int main(int argc,char **argv)
     16: {
     17:   RG             rg;
     18:   PetscBool      vertical=PETSC_FALSE,symm;

     20:   SlepcInitialize(&argc,&argv,(char*)0,help);
     21:   PetscOptionsGetBool(NULL,NULL,"-vertical",&vertical,NULL);

     23:   RGCreate(PETSC_COMM_WORLD,&rg);
     24:   RGSetFromOptions(rg);
     25:   RGViewFromOptions(rg,NULL,"-rg_view");
     26:   RGIsAxisymmetric(rg,vertical,&symm);
     27:   PetscPrintf(PETSC_COMM_WORLD,"The region is %saxisymmetric with respect to the %s axis\n",symm?"":"NOT ",vertical?"vertical":"horizontal");
     28:   RGDestroy(&rg);
     29:   SlepcFinalize();
     30:   return 0;
     31: }

     33: /*TEST

     35:    testset:
     36:       output_file: output/test3_hor_yes.out
     37:       test:
     38:          suffix: 1
     39:       test:
     40:          suffix: 1_ellipse
     41:          args: -rg_type ellipse -rg_ellipse_center 2 -rg_ellipse_radius 1
     42:       test:
     43:          suffix: 1_interval
     44:          args: -rg_type interval -rg_interval_endpoints -2,2,-1,1
     45:       test:
     46:          suffix: 1_ring
     47:          args: -rg_type ring -rg_ring_center 2 -rg_ring_radius 1 -rg_ring_startangle 0.1 -rg_ring_endangle 0.9

     49:    testset:
     50:       output_file: output/test3_ver_yes.out
     51:       args: -vertical
     52:       test:
     53:          suffix: 2
     54:       test:
     55:          suffix: 2_ellipse
     56:          args: -rg_type ellipse -rg_ellipse_center 2i -rg_ellipse_radius 1
     57:          requires: complex
     58:       test:
     59:          suffix: 2_interval
     60:          args: -rg_type interval -rg_interval_endpoints -2,2,-1,1
     61:       test:
     62:          suffix: 2_ring
     63:          args: -rg_type ring -rg_ring_center 2i -rg_ring_radius 1 -rg_ring_startangle 0.2 -rg_ring_endangle 0.3
     64:          requires: complex

     66:    testset:
     67:       output_file: output/test3_hor_no.out
     68:       test:
     69:          suffix: 3_ellipse
     70:          args: -rg_type ellipse -rg_ellipse_center 2i -rg_ellipse_radius 1
     71:          requires: complex
     72:       test:
     73:          suffix: 3_interval
     74:          args: -rg_type interval -rg_interval_endpoints -2,2,0,1
     75:          requires: complex
     76:       test:
     77:          suffix: 3_ring
     78:          args: -rg_type ring -rg_ring_center 2 -rg_ring_radius 1 -rg_ring_startangle 0.1 -rg_ring_endangle 0.7
     79:          requires: complex

     81:    testset:
     82:       output_file: output/test3_ver_no.out
     83:       args: -vertical
     84:       test:
     85:          suffix: 4_ellipse
     86:          args: -rg_type ellipse -rg_ellipse_center 2 -rg_ellipse_radius 1
     87:       test:
     88:          suffix: 4_interval
     89:          args: -rg_type interval -rg_interval_endpoints 0,2,-1,1
     90:       test:
     91:          suffix: 4_ring
     92:          args: -rg_type ring -rg_ring_center 2 -rg_ring_radius 1 -rg_ring_startangle 0.1 -rg_ring_endangle 0.9

     94: TEST*/