1
//**************************************************************************
5
// This software is a result of the research described in the report
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.
11
// It is based on the Epetra, AztecOO, and ML packages defined in the Trilinos
12
// framework ( http://software.sandia.gov/trilinos/ ).
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
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.
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.
25
// Code Authors: U. Hetmaniuk (ulhetma@sandia.gov), R. Lehoucq (rblehou@sandia.gov)
27
//**************************************************************************
29
#ifndef ANASAZI_MODE_LAPLACE_3D_Q2_H
30
#define ANASAZI_MODE_LAPLACE_3D_Q2_H
32
#include "Epetra_ConfigDefs.h"
34
#include "Epetra_Comm.h"
35
#include "Epetra_CrsMatrix.h"
36
#include "Epetra_MultiVector.h"
37
#include "Epetra_RowMatrix.h"
39
#include "CheckingTools.h"
40
#include "ModeLaplace.h"
41
#include "SortingTools.h"
44
// Chaco partition routine
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,
54
class ModeLaplace3DQ2 : public ModeLaplace {
58
const CheckingTools myVerify;
59
const Epetra_Comm &MyComm;
60
const SortingTools mySort;
79
static const int dofEle;
80
static const int maxConnect;
82
static const double M_PI;
85
// Private member functions
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;
96
// Don't define these functions
97
ModeLaplace3DQ2(const ModeLaplace3DQ2 &ref);
98
ModeLaplace3DQ2& operator=(const ModeLaplace3DQ2 &ref);
102
ModeLaplace3DQ2(const Epetra_Comm &_Comm, double _Lx, int _nX, double _Ly, int _nY,
103
double _Lz, int _nZ);
107
const Epetra_CrsMatrix* getStiffness() const { return K; }
108
const Epetra_CrsMatrix* getMass() const { return M; }
110
double getFirstMassEigenValue() const;
112
int eigenCheck(const Epetra_MultiVector &Q, double *lambda, double *normWeight, bool smallest = true) const;
114
void memoryInfo() const;
115
void problemInfo() const;