Actual source code: acoustic_wave_1d.c

slepc-3.10.1 2018-10-23
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-2018, 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: */
 10: /*
 11:    This example implements one of the problems found at
 12:        NLEVP: A Collection of Nonlinear Eigenvalue Problems,
 13:        The University of Manchester.
 14:    The details of the collection can be found at:
 15:        [1] T. Betcke et al., "NLEVP: A Collection of Nonlinear Eigenvalue
 16:            Problems", ACM Trans. Math. Software 39(2), Article 7, 2013.

 18:    The acoustic_wave_1d problem is a QEP from an acoustics application.
 19:    Here we solve it with the eigenvalue scaled by the imaginary unit, to be
 20:    able to use real arithmetic, so the computed eigenvalues should be scaled
 21:    back.
 22: */

 24: static char help[] = "Quadratic eigenproblem from an acoustics application (1-D).\n\n"
 25:   "The command line options are:\n"
 26:   "  -n <n>, where <n> = dimension of the matrices.\n"
 27:   "  -z <z>, where <z> = impedance (default 1.0).\n\n";

 29: #include <slepcpep.h>

 31: int main(int argc,char **argv)
 32: {
 33:   Ma