-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.cpp
More file actions
54 lines (38 loc) · 1.24 KB
/
Copy pathmain.cpp
File metadata and controls
54 lines (38 loc) · 1.24 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <cstdio>
#include <iostream>
#include <gmsh.h>
#include <cmath>
#include <vector>
#include <fstream>
#include "gmsh.h"
#include "mesh.hpp"
#include "solver.hpp"
#include "parameters.hpp"
// Main of the program.
int main(int argc, char **argv)
{
Parameters simulInfos(argv[1]);
std::vector<int> elementType;
std::vector<std::vector<std::size_t>> bin, bin1;
gmsh::vectorpair dimTags;
gmsh::initialize(argc, argv);
gmsh::option::setNumber("General.Terminal", 1);
gmsh::option::setNumber("Mesh.SaveAll", 1);
gmsh::open(simulInfos.mshPath());
// Gets all elements in the mesh.
gmsh::model::mesh::getElements(elementType,
bin,
bin1,
gmsh::model::getDimension());
gmsh::model::getEntities(dimTags,
gmsh::model::getDimension());
if(elementType.size() > 1)
{
gmsh::logger::write("No hybrid mesh can be taken into account.");
}
Element mainElements(simulInfos.gaussType(), elementType[0], dimTags[0].second);
mainElements.frontierAndNeighbouring(simulInfos.gaussType());
solver(simulInfos, mainElements);
gmsh::finalize();
return 0;
}