Skip to content
Snippets Groups Projects
Commit 2b3d3040 authored by Denis Louis's avatar Denis Louis
Browse files

only one main.cpp file

parent 70b972db
No related merge requests found
#include "functionsBEM.hpp"
#include <gmsh.h>
#include <iostream>
int main(int argc, char **argv)
{
if (argc < 2)
{
std::cout << "Usage: " << argv[0] << " <geo_file>\n";
return 0;
}
gmsh::initialize();
gmsh::open(argv[1]);
gmsh::model::mesh::generate(2);
// will map the 1d element tag onto the corresponding electroPressure resulting from BEM code
std::map<int, double> electrostaticPressure;
int nbViews = 0;
//solverBEM(argc, argv, finalElementTags, electrostaticPressure, nbViews);
solverBEM(argc, argv, electrostaticPressure, nbViews);
std::map<int, double>::iterator it;
for (it = electrostaticPressure.begin(); it != electrostaticPressure.end(); it++)
{
std::cout << it->first // string (key)
<< ':'
<< it->second // string's value
<< std::endl;
}
gmsh::fltk::run();
gmsh::finalize();
return 0;
}
\ No newline at end of file
#include "functionsFEM.hpp"
#include <gmsh.h>
#include <iostream>
#include <omp.h>
int main(int argc, char **argv)
{
if (argc < 2)
{
std::cout << "Usage: " << argv[0] << " <geo_file>\n";
return 0;
}
// If compiled with OpenMP support, gmsh::initialize
// also sets the number of threads to "General.NumThreads".
int nthreads = omp_get_max_threads();
gmsh::initialize();
omp_set_num_threads(nthreads);
gmsh::open(argv[1]);
gmsh::model::mesh::generate(2);
Eigen::initParallel();
std::map<int, double> electrostaticPressure;
solverFEM(argc, argv, electrostaticPressure,0);
gmsh::fltk::run();
gmsh::finalize();
return 0;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment