diff --git a/.travis.yml b/.travis.yml index 28d8e125..f13a2fc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -109,7 +109,7 @@ install: # hdf5 - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo $apt_get_install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" libpango-1.0-0 libpangocairo-1.0-0 libhdf5-dev; fi - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo $apt_get_install hdf5-tools; fi - - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install hdf5 --with-cxx; fi + - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install hdf5; fi # gnuplot-iostream - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo $apt_get_install gnuplot-nox; fi diff --git a/tests/sandbox/convergence_adv_diffusion/convergence_adv_diffusion.cpp b/tests/sandbox/convergence_adv_diffusion/convergence_adv_diffusion.cpp index 881302bf..59d52d07 100644 --- a/tests/sandbox/convergence_adv_diffusion/convergence_adv_diffusion.cpp +++ b/tests/sandbox/convergence_adv_diffusion/convergence_adv_diffusion.cpp @@ -41,6 +41,7 @@ err_t test(int np) time = 1.0, dx = 2.0 * pi / (np - 1), dt = 0.4 * dx, + advective_vel = 1.0, mu = 0.001; int nt = time / dt; @@ -54,6 +55,7 @@ err_t test(int np) p.di = dx; p.dt = dt; p.mu = mu; + p.advective_vel = advective_vel; concurr::serial< slv_t, @@ -62,11 +64,11 @@ err_t test(int np) blitz::firstIndex i; - run.advectee(0) = exact_f{0., mu}(i * dx); + run.advectee(0) = exact_f{0., mu, advective_vel}(i * dx); run.advectee(1) = 0; decltype(run.advectee()) true_solution(run.advectee().shape()); - true_solution = exact_f{time, mu}(i * dx); + true_solution = exact_f{time, mu, advective_vel}(i * dx); run.advance(nt); diff --git a/tests/sandbox/convergence_adv_diffusion/solver.hpp b/tests/sandbox/convergence_adv_diffusion/solver.hpp index d8e460fd..eee2f8b5 100644 --- a/tests/sandbox/convergence_adv_diffusion/solver.hpp +++ b/tests/sandbox/convergence_adv_diffusion/solver.hpp @@ -18,11 +18,11 @@ using real_t = double; struct exact_f { - real_t t, mu; + real_t t, mu, advective_vel; real_t operator()(const real_t x) const { - return 2 + std::sin(x - t) * std::exp(-mu * t); + return 2 + std::sin(x - advective_vel * t) * std::exp(-mu * t); } BZ_DECLARE_FUNCTOR(exact_f); @@ -71,7 +71,7 @@ class adv_diffusion_solver : public libmpdataxx::solvers::mpdata_rhs_vipdt, mu}(ii * this->di); } this->xchng_sclr(tmp); - this->vip_stash(-1)[0](i) = 1 + diffusive_vel(tmp, i, this->di, mu); + this->vip_stash(-1)[0](i) = advective_vel + diffusive_vel(tmp, i, this->di, mu); if (parent_t::div3_mpdata) { @@ -101,7 +101,7 @@ class adv_diffusion_solver : public libmpdataxx::solvers::mpdata_rhs_vipdt, mu}(ii * this->di); } this->xchng_sclr(tmp); - this->vip_stash(-2)[0](i) = 1 + diffusive_vel(tmp, i, this->di, mu); + this->vip_stash(-2)[0](i) = advective_vel + diffusive_vel(tmp, i, this->di, mu); } } @@ -111,7 +111,7 @@ class adv_diffusion_solver : public libmpdataxx::solvers::mpdata_rhs_vipi; this->xchng_sclr(psi); - this->vips()[0](i) = 1 + diffusive_vel(psi, i, this->di, mu); + this->vips()[0](i) = advective_vel + diffusive_vel(psi, i, this->di, mu); return parent_t::calc_gc(); } @@ -120,7 +120,7 @@ class adv_diffusion_solver : public libmpdataxx::solvers::mpdata_rhs_vip