-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocalStiffnessMatrix.h
48 lines (33 loc) · 1.08 KB
/
LocalStiffnessMatrix.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// LocalStiffnessMatrix.h
//
#ifndef LOCALSTIFFNESSMATRIX_H
#define LOCALSTIFFNESSMATRIX_H
#include "Common.h"
#include "GradientMatrix.h"
#include "PropertyMatrix.h"
class LocalStiffnessMatrix
{
public:
double youngsm; // youngs modulus
double poissonsr; // poissons ratio
double a, b, c; // voxel sizes (x, y, z)
PetscErrorCode ierr; // petsc errorcode
PetscScalar *matrix; // local stiffness matrix
LocalStiffnessMatrix();
LocalStiffnessMatrix(const double a, const double b, const double c, const double ym, const double pr);
LocalStiffnessMatrix(const double a, const double b, const double c, const double ym, const double pr, GradientMatrix * GradientMatrices);
~LocalStiffnessMatrix();
// inline
// get matrix
PetscScalar* getmat(){ return (matrix); }
double getval(const unsigned int index)
{
return matrix[index];
}
protected:
PetscErrorCode create(GradientMatrix *GradientMatrices);
PetscErrorCode create();
void destroy();
};
#endif /* LOCALSTIFFNESSMATRIX_H */