-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFiniteElement.h
More file actions
37 lines (33 loc) · 1.35 KB
/
Copy pathFiniteElement.h
File metadata and controls
37 lines (33 loc) · 1.35 KB
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
#pragma once
#include <array>
#include <vector>
#include <map>
#include <cmath>
#include <iostream>
#include "Defines.h"
using namespace std;
class FiniteElement {
private:
unsigned int m_id;
array<unsigned int, NODES_PER_ELEMENT> m_nodes_id;
array<double, COORDS_PER_NODE> m_center;
array<double, NODES_PER_ELEMENT> m_a_coeff, m_b_coeff, m_c_coeff, m_d_coeff;
double m_volume;
private:
void initCenter(const vector<array<double, COORDS_PER_NODE>>* coord_array);
void initVolume(const vector<array<double, COORDS_PER_NODE>>* coord_array);
void initShapeFunctions(const vector<array<double, COORDS_PER_NODE>>* coord_array);
double calcDeleterminantPtr(double* matrix[3][3]) const;
double calcDeterminant(const double matrix[][3]) const;
public:
FiniteElement(unsigned int id, const array<unsigned int, NODES_PER_ELEMENT>* nodes_id,
const vector<array<double, COORDS_PER_NODE>>* coord_array);
unsigned int getID() const;
const array<unsigned int, NODES_PER_ELEMENT>* getNodesId() const;
const array<double, COORDS_PER_NODE>* getCenter() const;
const array<double, NODES_PER_ELEMENT>* getCoeffsA() const;
const array<double, NODES_PER_ELEMENT>* getCoeffsB() const;
const array<double, NODES_PER_ELEMENT>* getCoeffsC() const;
const array<double, NODES_PER_ELEMENT>* getCoeffsD() const;
double getVolume() const;
};