Date: 2026-03-31T13:22:59+00:00

Actual source code: rgimpl.h

      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: #pragma once

     13: #include <slepcrg.h>
     14: #include <slepc/private/slepcimpl.h>

     16: /* SUBMANSEC = RG */

     18: SLEPC_EXTERN PetscBool RGRegisterAllCalled;
     19: SLEPC_EXTERN PetscErrorCode RGRegisterAll(void);

     21: typedef struct _RGOps *RGOps;

     23: struct _RGOps {
     24:   PetscErrorCode (*istrivial)(RG,PetscBool*);
     25:   PetscErrorCode (*computecontour)(RG,PetscInt,PetscScalar*,PetscScalar*);
     26:   PetscErrorCode (*computebbox)(RG,PetscReal*,PetscReal*,PetscReal*,PetscReal*);
     27:   PetscErrorCode (*computequadrature)(RG,RGQuadRule,PetscInt,PetscScalar*,PetscScalar*,PetscScalar*);
     28:   PetscErrorCode (*checkinside)(RG,PetscReal,PetscReal,PetscInt*);
     29:   PetscErrorCode (*isaxisymmetric)(RG,PetscBool,PetscBool*);
     30:   PetscErrorCode (*setfromoptions)(RG,PetscOptionItems);
     31:   PetscErrorCode (*view)(RG,PetscViewer);
     32:   PetscErrorCode (*destroy)(RG);
     33: };

     35: struct _p_RG {
     36:   PETSCHEADER(struct _RGOps);
     37:   PetscBool   complement;    /* region is the complement of the specified one */
     38:   PetscReal   sfactor;       /* scaling factor */
     39:   PetscReal   osfactor;      /* old scaling factor, before RGPushScale */
     40:   void        *data;
     41: };

     43: /* show an inf instead of PETSC_MAX_REAL */
     44: #define RGShowReal(r) (double)((PetscAbsReal(r)>=PETSC_MAX_REAL)?10*(r):(r))