ElectricField base Class and Homogene Class with tests

This commit is contained in:
Joachim Rupp
2020-07-10 14:28:52 +02:00
parent a40838df2d
commit 70c23ed59a
11 changed files with 151 additions and 7 deletions
+19
View File
@@ -0,0 +1,19 @@
#include "catch.hpp"
#include "vec3_container.hpp"
#include "Homogene.h"
SCENARIO("Test the vec3_container Constructor with Electric Field class", "[vec3_container.hpp]") {
GIVEN("Vec3 Container initilazed with a homogene electric field") {
Homogene electric_field(vec3(5,0,0));
Vec3_Container efeld(10, 10, 10, electric_field);
//vec3 value(5,0,0);
//vec3 value = blitz::TinyVector<double, 3>(5,0,0)
REQUIRE(efeld.get_data(vec3(0, 0, 0))[0] == 5 );
REQUIRE(efeld.get_data(vec3(0, 0, 0))[1] == 0 );
REQUIRE(efeld.get_data(vec3(0, 0, 0))[2] == 0 );
}