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 RGIsAxisymmetric.\n\n"; 12 : 13 : #include <slepcrg.h> 14 : 15 9 : int main(int argc,char **argv) 16 : { 17 9 : RG rg; 18 9 : PetscBool vertical=PETSC_FALSE,symm; 19 : 20 9 : PetscFunctionBeginUser; 21 9 : PetscCall(SlepcInitialize(&argc,&argv,NULL,help)); 22 9 : PetscCall(PetscOptionsGetBool(NULL,NULL,"-vertical",&vertical,NULL)); 23 : 24 9 : PetscCall(RGCreate(PETSC_COMM_WORLD,&rg)); 25 9 : PetscCall(RGSetFromOptions(rg)); 26 9 : PetscCall(RGViewFromOptions(rg,NULL,"-rg_view")); 27 9 : PetscCall(RGIsAxisymmetric(rg,vertical,&symm)); 28 16 : PetscCall(PetscPrintf(PETSC_COMM_WORLD,"The region is %saxisymmetric with respect to the %s axis\n",symm?"":"NOT ",vertical?"vertical":"horizontal")); 29 9 : PetscCall(RGDestroy(&rg)); 30 9 : PetscCall(SlepcFinalize()); 31 : return 0; 32 : } 33 : 34 : /*TEST 35 : 36 : testset: 37 : output_file: output/test3_hor_yes.out 38 : test: 39 : suffix: 1 40 : test: 41 : suffix: 1_ellipse 42 : args: -rg_type ellipse -rg_ellipse_center 2 -rg_ellipse_radius 1 43 : test: 44 : suffix: 1_interval 45 : args: -rg_type interval -rg_interval_endpoints -2,2,-1,1 46 : test: 47 : suffix: 1_ring 48 : args: -rg_type ring -rg_ring_center 2 -rg_ring_radius 1 -rg_ring_startangle 0.1 -rg_ring_endangle 0.9 49 : 50 : testset: 51 : output_file: output/test3_ver_yes.out 52 : args: -vertical 53 : test: 54 : suffix: 2 55 : test: 56 : suffix: 2_ellipse 57 : args: -rg_type ellipse -rg_ellipse_center 2i -rg_ellipse_radius 1 58 : requires: complex 59 : test: 60 : suffix: 2_interval 61 : args: -rg_type interval -rg_interval_endpoints -2,2,-1,1 62 : test: 63 : suffix: 2_ring 64 : args: -rg_type ring -rg_ring_center 2i -rg_ring_radius 1 -rg_ring_startangle 0.2 -rg_ring_endangle 0.3 65 : requires: complex 66 : 67 : testset: 68 : output_file: output/test3_hor_no.out 69 : test: 70 : suffix: 3_ellipse 71 : args: -rg_type ellipse -rg_ellipse_center 2i -rg_ellipse_radius 1 72 : requires: complex 73 : test: 74 : suffix: 3_interval 75 : args: -rg_type interval -rg_interval_endpoints -2,2,0,1 76 : requires: complex 77 : test: 78 : suffix: 3_ring 79 : args: -rg_type ring -rg_ring_center 2 -rg_ring_radius 1 -rg_ring_startangle 0.1 -rg_ring_endangle 0.7 80 : requires: complex 81 : 82 : testset: 83 : output_file: output/test3_ver_no.out 84 : args: -vertical 85 : test: 86 : suffix: 4_ellipse 87 : args: -rg_type ellipse -rg_ellipse_center 2 -rg_ellipse_radius 1 88 : test: 89 : suffix: 4_interval 90 : args: -rg_type interval -rg_interval_endpoints 0,2,-1,1 91 : test: 92 : suffix: 4_ring 93 : args: -rg_type ring -rg_ring_center 2 -rg_ring_radius 1 -rg_ring_startangle 0.1 -rg_ring_endangle 0.9 94 : 95 : TEST*/