File: cgenprba.h

package info (click to toggle)
arpack%2B%2B 2.3-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,548 kB
  • ctags: 3,751
  • sloc: cpp: 16,612; sh: 8,819; ansic: 2,312; makefile: 257
file content (52 lines) | stat: -rw-r--r-- 967 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
   ARPACK++ v1.0 8/1/1997
   c++ interface to ARPACK code.

   MODULE CGenPrbA.h
   Very simple template class intended to illustrate how to
   use ARPACK++ to find some few eigenvalues and eigenvectors
   of complex generalized problems in regular mode.

   ARPACK Authors
      Richard Lehoucq
      Danny Sorensen
      Chao Yang
      Dept. of Computational & Applied Mathematics
      Rice University
      Houston, Texas
*/

#ifndef CGENPRBA_H
#define CGENPRBA_H

#include "arcomp.h"
#include "blas1c.h"
#include "cmatrixc.h"
#include "cmatrixd.h"


template <class T>
struct ComplexGenProblemA {

  ComplexMatrixC<T> A;
  ComplexMatrixD<T> B;

  void MultOPv(arcomplex<T>* v, arcomplex<T>* w)
  // Matrix vector subroutine where the matrix is inv(B)*A.
  {

    A.MultMv(v, w);
    B.SolveM(w);

  } // MultOPv.

  ComplexGenProblemA(int nx): A(nx), B(nx) 
  // Constructor.
  {
    B.FactorM();
  }

}; // struct ComplexGenProblemA.

#endif // CGENPRBA_H