-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGradientMatrix.h
More file actions
45 lines (30 loc) · 839 Bytes
/
GradientMatrix.h
File metadata and controls
45 lines (30 loc) · 839 Bytes
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
//
// GradientMatrix.h
//
#ifndef GRADIENTMATRIX_H
#define GRADIENTMATRIX_H
#include "Common.h"
#include "IntegrationMatrix.h"
class GradientMatrix
{
public:
GradientMatrix();
GradientMatrix(double a_size, double b_size, double c_size, int n_num);
~GradientMatrix();
// get matrix and transpose
Mat* getmat(){ return (&matrix); }
Mat* getmat_t(){ return (&transpose); }
double getJdet() const { return Jdet; }
protected:
int n; // n
double a, b, c; // voxel sizes (x, y, z)
IntegrationMatrix integMtx;
Diff_Ni_j diffMtx;
double Jdet;
Mat matrix; // petsc matrix
Mat transpose; // transpose of pmatrix
PetscErrorCode ierr; // petsc errorcode
PetscErrorCode create();
PetscErrorCode destroy();
};
#endif /* GRADIENTMATRIX_H */