-
Notifications
You must be signed in to change notification settings - Fork 4
/
SOMMG.h
34 lines (24 loc) · 1.03 KB
/
SOMMG.h
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
#ifndef SOMMG_H
#define SOMMG_H
// Include necessary libraries
#include <petsc.h>
#include <iostream>
#include <mpi.h>
/* -----------------------------------------------------------------------------
Authors: Niels Aage, Copyright (C) 2020
-------------------------------------------------------------------------- */
class SOMMG {
public:
// ------------- CONSTRUCT/DESTRUCT -------------------------------
SOMMG(Vec x, PetscInt order);
~SOMMG();
// ------------- REDUCED ORDER MATRIX -----------------------------
Vec *QQ, Pr; // Reduction "matrix" QQ and reduced load vector Pr
Mat Mr,Kr,Cr; // Reduced matrices
// ------------- METHODS ------------------------------------------
PetscErrorCode ConstructBasis(Mat K, Mat M, Mat C, Vec P, Vec N, PetscScalar om, KSP ksp);
private:
PetscInt reductionOrder; // degree of expansion
Vec *Qb; // Orthonormalization "matrix"
};
#endif