Commit f3cc075f authored by Kirill Terekhov's avatar Kirill Terekhov
Browse files

DrawGrid: fix texture generation for colorbar when state is loaded from file;...

DrawGrid: fix texture generation for colorbar when state is loaded from file; report max of absolute and relative norm in inner solvers; fix openmp compilation in k3biilu solver
parent 9aebc13a
......@@ -126,7 +126,7 @@ namespace INMOST
for (int q = 0; q < samples + 2; ++q)
{
float t = 1.0f*q / static_cast<float>(samples + 1);
color_t c = pick_color(t);
color_t c = pick_color(t*(max-min)+min);
//countour lines
//if( ((q+1) % 128 == 0 || (q+1) % 128 == 127) && (q+1) < samples )
// c = pick_color(1-t) + color_t(0,2*t*(1-t),0);
......
......@@ -2628,7 +2628,7 @@ int main(int argc, char ** argv)
glEnable(GL_DEPTH_TEST);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
color_bar::InitColorBarTexture();
glHint(GL_POLYGON_SMOOTH_HINT,GL_NICEST);
......@@ -2640,6 +2640,8 @@ int main(int argc, char ** argv)
glutReshapeFunc(reshape);
color_bar::InitColorBarTexture();
if( !input_dely.empty() )
{
for(size_t k = 0; k < input_dely.size(); ++k)
......
......@@ -624,7 +624,7 @@ namespace INMOST
//std::cout << "iter " << last_it << " residual " << resid << std::endl;
//std::cout << "iter " << last_it << " resid " << resid << "\r";
//printf("iter %3d resid %12g | %12g relative %12g | %12g\r", last_it, resid, atol, resid / resid0, rtol);
printf("iter %3d resid %12g | %g\r", last_it, resid, atol);
printf("iter %3d resid %12g | %g\r", last_it, resid, std::max(atol,resid0*rtol));
fflush(stdout);
}
}
......@@ -1224,7 +1224,7 @@ namespace INMOST
#pragma omp single
#endif
{
printf("iter %3d resid %12g | %g\r", last_it, resid, atol);
printf("iter %3d resid %12g | %g\r", last_it, resid, std::max(atol,resid0*rtol));
fflush(stdout);
}
}
......@@ -1456,7 +1456,7 @@ namespace INMOST
//std::cout << "iter " << last_it << " residual " << resid << std::endl;
//std::cout << "iter " << last_it << " resid " << resid << "\r";
//printf("iter %3d resid %12g | %12g relative %12g | %12g\r",last_it,resid,atol,resid/resid0,rtol);
printf("iter %3d resid %12g | %g\r", last_it, resid, atol);
printf("iter %3d resid %12g | %g\r", last_it, resid, std::max(atol,resid0*rtol));
fflush(stdout);
}
}
......@@ -1792,7 +1792,7 @@ namespace INMOST
#pragma omp single
#endif
{
printf("iter %3d resid %12g | %g\r", last_it, resid, atol);
printf("iter %3d resid %12g | %g\r", last_it, resid, std::max(atol,resid0*rtol));
//printf("iter %3d resid %12g | %g rho %e beta %e alpha %e omega %e\n", last_it, resid, atol,rho,beta,alpha,omega);
fflush(stdout);
}
......
......@@ -8,6 +8,7 @@
#define TURN_ON_EX
#if defined(TURN_ON_EX)
#include "inmost_options.h"
#ifndef USE_MPI
#define USE_MPI
......@@ -53,6 +54,9 @@
#if defined(USE_OMP)
#define USE_THREADS
#include <omp.h>
#pragma message("Using openmp threads in k3d")
#else
#pragma message("Not using openmp threads in k3d")
#endif
#ifndef USE_MPI
......@@ -1877,4 +1881,4 @@ namespace k3d
} // namespace k3d
#endif
\ No newline at end of file
#endif
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