3
* Copyright (C) 2010 Fabien Chereau
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
#include "tests/testRefractionExtinction.hpp"
26
QTEST_MAIN(TestRefractionExtinction)
28
void TestRefractionExtinction::initTestCase()
32
void TestRefractionExtinction::testBase()
34
RefractionExtinction refExt;
37
refExt.forward(&v, &mag, 1);
44
refExt.setExtinctionCoefficient(0.25);
45
refExt.setTemperature(15.0);
46
refExt.setPressure(1000.0);
47
refExt.forward(&vert, &mag, 1);
49
QVERIFY(vert[2]==1.0);
51
Vec3d neg(std::sqrt(2.0),0.,std::sqrt(2.0));
53
refExt.forward(&neg, &mag, 1);
55
QVERIFY(neg[2]==std::sqrt(2.0));
58
void TestRefractionExtinction::benchmark()