-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
62 lines (44 loc) · 1.19 KB
/
main.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
52
53
54
55
56
57
58
59
60
61
62
// Include from the standard C++ library
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
// My own includes
#include <gsl/gsl_cblas.h>
#include <mesh.hpp>
#include "OperatorBuilds/operatorbuilds.hpp"
using namespace std;
/* An example of how to declare a BLAS function in this project
void cblas_sscal(const int N, const float alpha, float *x, const int incx);
An example of how to declare a LAPACK function in this project
extern "C" {
extern int dgeev_(char*,char*,int*,double*,int*,double*, double*, double*, int*, double*, int*, double*, int*, int*);
}
*/
double FormElem(const double *coord, const int ref){
switch (ref) {
case 0: {
return 1 - coord[0] - coord[1];
}
case 1: {
return coord[0];
}
case 2: {
return coord[1];
}
}
}
int main(int argc, char *argv[])
{
char filename[100] = "/home/tcimic/Projects/Laplacien/GMSHmesh/mesh/square.msh";
mesh Th(filename);
// cout << Th.NbTriangle() << endl;
double coord[2];
coord[0] = 0;
coord[1] = 0.25;
// printf("%f\n", FormElem(coord,1));
double *Mass;
Mass = MassAssem(Th.Triangle(), Th.Nodes(), Th.NbTriangle(), Th.NbNodes());
// deallocate
return 0;
}