Commit 97cb3986 authored by Laurent Belcour's avatar Laurent Belcour

Small changes to have compilation in the new lib loading system

parent 2c63cea8
......@@ -119,8 +119,21 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
// TODO Specify the delta in case
// Handle multiple dim
double dt = args.get_float("dt", 0.1);
v[dimX() + dimY()+i] = v[dimX() + i] * (1.0 - dt) ;
v[dimX() + 2*dimY()+i] = v[dimX() + i] * (1.0 + dt) ;
if(std::abs(v[dimX() + i]) > 0.0)
{
#ifdef RELATIVE_ERROR
v[dimX() + dimY()+i] = v[dimX() + i] * (1.0 - dt) ;
v[dimX() + 2*dimY()+i] = v[dimX() + i] * (1.0 + dt) ;
#endif
v[dimX() + dimY()+i] = std::max(v[dimX() + i] - dt, 0.0) ;
v[dimX() + 2*dimY()+i] = v[dimX() + i] + dt ;
}
else
{
v[dimX() + dimY()+i] = 0.0 ;
v[dimX() + 2*dimY()+i] = dt ;
}
}
}
......
......@@ -14,6 +14,11 @@
#define BUFFER_SIZE 10000
fitter* provide_fitter()
{
return new rational_fitter_dca();
}
data* rational_fitter_dca::provide_data() const
{
return new vertical_segment() ;
......
......@@ -12,6 +12,11 @@
#include <QTime>
fitter* provide_fitter()
{
return new rational_fitter_eigen();
}
data* rational_fitter_eigen::provide_data() const
{
return new vertical_segment() ;
......
......@@ -18,6 +18,11 @@
#include "quadratic_program.h"
fitter* provide_fitter()
{
return new rational_fitter_parallel();
}
data* rational_fitter_parallel::provide_data() const
{
return new vertical_segment() ;
......@@ -85,6 +90,7 @@ bool rational_fitter_parallel::fit_data(const data* dat, function* fit, const ar
#endif
omp_set_num_threads(nb_cores) ;
std::vector<rational_function*> rs;
for(int j=0; j<nb_cores; ++j)
{
......@@ -108,7 +114,7 @@ bool rational_fitter_parallel::fit_data(const data* dat, function* fit, const ar
int nb_sol_found = 0;
int np, nq ;
// #pragma omp parallel for
#pragma omp parallel for
for(int j=1; j<i; ++j)
{
int temp_np = i - j;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment