-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathElement.cpp
53 lines (44 loc) · 1.07 KB
/
Element.cpp
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
49
50
51
#include "Element.h"
#include <stdio.h>
#include <ctime>
#include <string>
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
Element::Element() {
this->id_element = 0;
for (int i = 0; i < 4; i++) { //bo 4 elementy w id elementu
this->id_node[i] = 0;
this->id_walls[i] = 0;
this->localvectorP[i] = 0;
}
this->localmatrixH = new double*[4];
for (int i = 0; i < 4; i++) {
this->localmatrixH[i] = new double[4];
}
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
this->localmatrixH[i][j] = 0;
}
}
}
Element::Element(int id, int*id_nodes, int*id_walls, double**localmatrixH, double*localvectorP) {
this->id_element = id;
for (int i = 0; i < 4; i++)
{
this->id_node[i] = id_nodes[i];
this->id_walls[i] = id_walls[i];
this->localvectorP[i] = localvectorP[i];
}
this->localmatrixH = new double*[4];
for (int i = 0; i < 4; i++) {
this->localmatrixH[i] = new double[4];
}
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
this->localmatrixH[i][j] = localmatrixH[i][j];
}
}
}
Element::~Element(){}