Date: 2024-10-28T09:14:52+00:00

Actual source code: test3.c
slepc-3.22.1 2024-10-28
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:   PetscFunctionBeginUser;
     21:   PetscCall(SlepcInitialize(&argc,&argv,NULL,help));
     22:   PetscCall(PetscOptionsGetBool(NULL,NULL,"-vertical",&vertical,NULL));

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

     34: /*TEST

     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

     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

     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

     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

     95: TEST*/