~chaffra/+junk/trilinos

« back to all changes in this revision

Viewing changes to packages/anasazi/util/ModeLaplace/ModeLaplace3DQ2.h

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme, Johannes Ring
  • Date: 2009-12-13 12:53:22 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091213125322-in0nrdjc55deqsw9
Tags: 10.0.3.dfsg-1
[Christophe Prud'homme]
* New upstream release

[Johannes Ring]
* debian/patches/libname.patch: Add prefix 'libtrilinos_' to all
  libraries. 
* debian/patches/soname.patch: Add soversion to libraries.
* debian/watch: Update download URL.
* debian/control:
  - Remove python-numeric from Build-Depends (virtual package).
  - Remove automake and autotools from Build-Depends and add cmake to
    reflect switch to CMake.
  - Add python-support to Build-Depends.
* debian/rules: 
  - Cleanup and updates for switch to CMake.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//**************************************************************************
 
2
//
 
3
//                                 NOTICE
 
4
//
 
5
// This software is a result of the research described in the report
 
6
//
 
7
// " A comparison of algorithms for modal analysis in the absence 
 
8
//   of a sparse direct method", P. Arbenz, R. Lehoucq, and U. Hetmaniuk,
 
9
//  Sandia National Laboratories, Technical report SAND2003-1028J.
 
10
//
 
11
// It is based on the Epetra, AztecOO, and ML packages defined in the Trilinos
 
12
// framework ( http://software.sandia.gov/trilinos/ ).
 
13
//
 
14
// The distribution of this software follows also the rules defined in Trilinos.
 
15
// This notice shall be marked on any reproduction of this software, in whole or
 
16
// in part.
 
17
//
 
18
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
 
19
// license for use of this work by or on behalf of the U.S. Government.
 
20
//
 
21
// This program is distributed in the hope that it will be useful, but
 
22
// WITHOUT ANY WARRANTY; without even the implied warranty of
 
23
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
24
//
 
25
// Code Authors: U. Hetmaniuk (ulhetma@sandia.gov), R. Lehoucq (rblehou@sandia.gov)
 
26
//
 
27
//**************************************************************************
 
28
 
 
29
#ifndef ANASAZI_MODE_LAPLACE_3D_Q2_H
 
30
#define ANASAZI_MODE_LAPLACE_3D_Q2_H
 
31
 
 
32
#include "Epetra_ConfigDefs.h"
 
33
 
 
34
#include "Epetra_Comm.h"
 
35
#include "Epetra_CrsMatrix.h"
 
36
#include "Epetra_MultiVector.h"
 
37
#include "Epetra_RowMatrix.h"
 
38
 
 
39
#include "CheckingTools.h"
 
40
#include "ModeLaplace.h"
 
41
#include "SortingTools.h"
 
42
 
 
43
 
 
44
// Chaco partition routine
 
45
#ifdef _USE_CHACO
 
46
extern "C" {
 
47
  int interface(int, int*, int*, int *, float*, float*, float*, float*, char*,
 
48
                char*, short int*, int, int, int[3], double*, int, int, int, int,
 
49
                int, double, long);
 
50
}
 
51
#endif
 
52
 
 
53
 
 
54
class ModeLaplace3DQ2 : public ModeLaplace {
 
55
 
 
56
  private:
 
57
 
 
58
    const CheckingTools myVerify;
 
59
    const Epetra_Comm &MyComm;
 
60
    const SortingTools mySort;
 
61
 
 
62
    Epetra_Map *Map;
 
63
    Epetra_CrsMatrix *K;
 
64
    Epetra_CrsMatrix *M;
 
65
 
 
66
    double Lx;
 
67
    int nX;
 
68
 
 
69
    double Ly;
 
70
    int nY;
 
71
 
 
72
    double Lz;
 
73
    int nZ;
 
74
 
 
75
    double *x;
 
76
    double *y;
 
77
    double *z;
 
78
 
 
79
    static const int dofEle;
 
80
    static const int maxConnect;
 
81
#ifndef M_PI
 
82
    static const double M_PI;
 
83
#endif
 
84
 
 
85
    // Private member functions
 
86
    void preProcess();
 
87
    void makeMap();
 
88
    int countElements(bool *isTouched);
 
89
    void makeMyElementsTopology(int *elemTopo, bool *isTouched);
 
90
    void makeMyConnectivity(int *elemTopo, int numEle, int *connectivity, int *numNz);
 
91
    void makeStiffness(int *elemTopo, int numEle, int *connectivity, int *numNz);
 
92
    void makeElementaryStiffness(double *kel) const;
 
93
    void makeMass(int *elemTopo, int numEle, int *connectivity, int *numNz);
 
94
    void makeElementaryMass(double *kel) const;
 
95
 
 
96
    // Don't define these functions
 
97
    ModeLaplace3DQ2(const ModeLaplace3DQ2 &ref);
 
98
    ModeLaplace3DQ2& operator=(const ModeLaplace3DQ2 &ref);
 
99
 
 
100
  public:
 
101
 
 
102
    ModeLaplace3DQ2(const Epetra_Comm &_Comm, double _Lx, int _nX, double _Ly, int _nY,
 
103
                    double _Lz, int _nZ);
 
104
 
 
105
    ~ModeLaplace3DQ2();
 
106
 
 
107
    const Epetra_CrsMatrix* getStiffness() const { return K; }
 
108
    const Epetra_CrsMatrix* getMass()      const { return M; }
 
109
 
 
110
    double getFirstMassEigenValue() const;
 
111
 
 
112
    int eigenCheck(const Epetra_MultiVector &Q, double *lambda, double *normWeight, bool smallest = true) const;
 
113
 
 
114
    void memoryInfo() const;
 
115
    void problemInfo() const;
 
116
 
 
117
};
 
118
 
 
119
#endif