Skip to content

Commit 2a7e901

Browse files
author
Roberto Di Remigio
committed
Some clean-up
1 parent 4026182 commit 2a7e901

File tree

4 files changed

+21
-96
lines changed

4 files changed

+21
-96
lines changed

tests/wavelet_cavity/wavelet_cavity_C6H6.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ struct WaveletCavityC6H6Test {
6060
Eigen::Vector3d H6( 3.616, 0.776, -9.196);
6161

6262
std::vector<Sphere> spheres;
63-
Sphere sph1(C1, 3.212534412);
64-
Sphere sph2(C2, 3.212534412);
65-
Sphere sph3(C3, 3.212534412);
66-
Sphere sph4(C4, 3.212534412);
67-
Sphere sph5(C5, 3.212534412);
68-
Sphere sph6(C6, 3.212534412);
63+
Sphere sph1(C1, 1.53);
64+
Sphere sph2(C2, 1.53);
65+
Sphere sph3(C3, 1.53);
66+
Sphere sph4(C4, 1.53);
67+
Sphere sph5(C5, 1.53);
68+
Sphere sph6(C6, 1.53);
6969

70-
Sphere sph7(H1, 2.267671349);
71-
Sphere sph8(H2, 2.267671349);
72-
Sphere sph9(H3, 2.267671349);
73-
Sphere sph10(H4, 2.267671349);
74-
Sphere sph11(H5, 2.267671349);
75-
Sphere sph12(H6, 2.267671349);
70+
Sphere sph7(H1, 1.06);
71+
Sphere sph8(H2, 1.06);
72+
Sphere sph9(H3, 1.06);
73+
Sphere sph10(H4, 1.06);
74+
Sphere sph11(H5, 1.06);
75+
Sphere sph12(H6, 1.06);
7676

7777
spheres.push_back(sph1);
7878
spheres.push_back(sph2);
@@ -110,7 +110,7 @@ struct WaveletCavityC6H6Test {
110110
*/
111111
BOOST_FIXTURE_TEST_CASE(size, WaveletCavityC6H6Test)
112112
{
113-
int size = 4288;
113+
int size = 6912;
114114
int actualSize = cavity.size();
115115
BOOST_REQUIRE_EQUAL(size, actualSize);
116116
}
@@ -120,7 +120,7 @@ BOOST_FIXTURE_TEST_CASE(size, WaveletCavityC6H6Test)
120120
*/
121121
BOOST_FIXTURE_TEST_CASE(area, WaveletCavityC6H6Test)
122122
{
123-
double area = 146.41490284471513;
123+
double area = 95.909894964414121;
124124
double actualArea = cavity.elementArea().sum();
125125
BOOST_REQUIRE_CLOSE(area, actualArea, 1.0e-10);
126126
}
@@ -130,7 +130,7 @@ BOOST_FIXTURE_TEST_CASE(area, WaveletCavityC6H6Test)
130130
*/
131131
BOOST_FIXTURE_TEST_CASE(volume, WaveletCavityC6H6Test)
132132
{
133-
double volume = 153.3346491517182;
133+
double volume = 69.622821450340595;
134134
Eigen::Matrix3Xd elementCenter = cavity.elementCenter();
135135
Eigen::Matrix3Xd elementNormal = cavity.elementNormal();
136136
double actualVolume = 0;

tests/wem_lin/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ set(list_of_libraries solver green bi_operators cavity wemFiles wemSolvers wavca
33
list(APPEND external_libraries ${ZLIB_LIBRARIES})
44
# wem_lin_point test not yet done
55
# add_boosttest(wem_lin_point "${list_of_libraries}" "${external_libraries}")
6-
add_boosttest(wem_lin_NH3 "${list_of_libraries}" "${external_libraries}")
7-
add_boosttest(wem_con_NH3 "${list_of_libraries}" "${external_libraries}")
8-
add_boosttest(wem_lin_benzene "${list_of_libraries}" "${external_libraries}")
6+
add_boosttest(wem_lin_NH3 "${list_of_libraries}" "${external_libraries}")
7+
add_boosttest(wem_con_NH3 "${list_of_libraries}" "${external_libraries}")
8+
add_boosttest(wem_lin_C6H6 "${list_of_libraries}" "${external_libraries}")

tests/wem_lin/wem_lin_benzene.cpp renamed to tests/wem_lin/wem_lin_C6H6.cpp

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
/* pcmsolver_copyright_end */
2525

26-
#define BOOST_TEST_MODULE WEMSolverbenzene
26+
#define BOOST_TEST_MODULE WEMSolverC6H6
2727

2828
#include <boost/test/unit_test.hpp>
2929
#include <boost/test/floating_point_comparison.hpp>
@@ -41,26 +41,11 @@
4141
#include "WaveletCavity.hpp"
4242

4343
/*! \class WEMSolver
44-
* \test \b benzene tests WEMSolver with linear ansatz functions using ammonia and a wavelet cavity
44+
* \test \b C6H6 tests WEMSolver with linear ansatz functions using ammonia and a wavelet cavity
4545
*/
46-
BOOST_AUTO_TEST_CASE(benzene)
46+
BOOST_AUTO_TEST_CASE(C6H6)
4747
{
48-
printf("STARTING TEST\n");
4948
// Set up cavity
50-
/*
51-
Eigen::Vector3d C1(-0.694303272975, -0.000000000000, -1.202568545351);
52-
Eigen::Vector3d C2( 0.694303272975, 0.000000000000, -1.202568545351);
53-
Eigen::Vector3d C3( 1.388606546154, 0.000000000000, 0.000000000000);
54-
Eigen::Vector3d C4( 0.694303272975, 0.000000000000, 1.202568545351);
55-
Eigen::Vector3d C5(-0.694303272975, -0.000000000000, 1.202568545351);
56-
Eigen::Vector3d C6(-1.388606546154, -0.000000000000, 0.000000000000);
57-
Eigen::Vector3d H1(-1.235418032354, -0.000000000000, -2.139806800843);
58-
Eigen::Vector3d H2( 1.235418032354, 0.000000000000, -2.139806800843);
59-
Eigen::Vector3d H3( 2.470836065313, 0.000000000000, 0.000000000000);
60-
Eigen::Vector3d H4( 1.235418032354, 0.000000000000, 2.139806800843);
61-
Eigen::Vector3d H5(-1.235418032354, -0.000000000000, 2.139806800843);
62-
Eigen::Vector3d H6(-2.470836065313, -0.000000000000, 0.000000000000);
63-
*/
6449
Eigen::Vector3d C1( 5.274, 1.999, -8.568);
6550
Eigen::Vector3d C2( 6.627, 2.018, -8.209);
6651
Eigen::Vector3d C3( 7.366, 0.829, -8.202);
@@ -75,21 +60,6 @@ BOOST_AUTO_TEST_CASE(benzene)
7560
Eigen::Vector3d H6( 3.616, 0.776, -9.196);
7661

7762
std::vector<Sphere> spheres;
78-
/*
79-
Sphere sph1(C1, 3.212534412);
80-
Sphere sph2(C2, 3.212534412);
81-
Sphere sph3(C3, 3.212534412);
82-
Sphere sph4(C4, 3.212534412);
83-
Sphere sph5(C5, 3.212534412);
84-
Sphere sph6(C6, 3.212534412);
85-
86-
Sphere sph7(H1, 2.267671349);
87-
Sphere sph8(H2, 2.267671349);
88-
Sphere sph9(H3, 2.267671349);
89-
Sphere sph10(H4, 2.267671349);
90-
Sphere sph11(H5, 2.267671349);
91-
Sphere sph12(H6, 2.267671349);
92-
*/
9363
Sphere sph1(C1, 1.53);
9464
Sphere sph2(C2, 1.53);
9565
Sphere sph3(C3, 1.53);
@@ -120,12 +90,9 @@ BOOST_AUTO_TEST_CASE(benzene)
12090
double probeRadius = 1.385; // Probe Radius for water
12191
int patchLevel = 3;
12292
double coarsity = 0.5;
123-
printf("TEST 1\n");
12493
WaveletCavity cavity(spheres, probeRadius, patchLevel, coarsity);
125-
printf("TEST 1a\n");
12694
cavity.readCavity("molec_dyadic.dat");
12795

128-
printf("TEST 2\n");
12996
CollocationIntegrator * diag = new CollocationIntegrator();
13097
double permittivity = 78.39;
13198
Vacuum<AD_directional> * gfInside = new Vacuum<AD_directional>();

tests/wem_lin/wem_lin_NH3.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -60,48 +60,6 @@ BOOST_AUTO_TEST_CASE(NH3)
6060
spheres.push_back(sph2);
6161
spheres.push_back(sph3);
6262
spheres.push_back(sph4);
63-
/*
64-
Eigen::Vector3d C1(-0.694303272975, -0.000000000000, -1.202568545351);
65-
Eigen::Vector3d C2( 0.694303272975, 0.000000000000, -1.202568545351);
66-
Eigen::Vector3d C3( 1.388606546154, 0.000000000000, 0.000000000000);
67-
Eigen::Vector3d C4( 0.694303272975, 0.000000000000, 1.202568545351);
68-
Eigen::Vector3d C5(-0.694303272975, -0.000000000000, 1.202568545351);
69-
Eigen::Vector3d C6(-1.388606546154, -0.000000000000, 0.000000000000);
70-
Eigen::Vector3d H1(-1.235418032354, -0.000000000000, -2.139806800843);
71-
Eigen::Vector3d H2( 1.235418032354, 0.000000000000, -2.139806800843);
72-
Eigen::Vector3d H3( 2.470836065313, 0.000000000000, 0.000000000000);
73-
Eigen::Vector3d H4( 1.235418032354, 0.000000000000, 2.139806800843);
74-
Eigen::Vector3d H5(-1.235418032354, -0.000000000000, 2.139806800843);
75-
Eigen::Vector3d H6(-2.470836065313, -0.000000000000, 0.000000000000);
76-
77-
std::vector<Sphere> spheres;
78-
Sphere sph1(C1, 3.212534412);
79-
Sphere sph2(C2, 3.212534412);
80-
Sphere sph3(C3, 3.212534412);
81-
Sphere sph4(C4, 3.212534412);
82-
Sphere sph5(C5, 3.212534412);
83-
Sphere sph6(C6, 3.212534412);
84-
85-
Sphere sph7(H1, 2.267671349);
86-
Sphere sph8(H2, 2.267671349);
87-
Sphere sph9(H3, 2.267671349);
88-
Sphere sph10(H4, 2.267671349);
89-
Sphere sph11(H5, 2.267671349);
90-
Sphere sph12(H6, 2.267671349);
91-
92-
spheres.push_back(sph1);
93-
spheres.push_back(sph2);
94-
spheres.push_back(sph3);
95-
spheres.push_back(sph4);
96-
spheres.push_back(sph5);
97-
spheres.push_back(sph6);
98-
spheres.push_back(sph7);
99-
spheres.push_back(sph8);
100-
spheres.push_back(sph9);
101-
spheres.push_back(sph10);
102-
spheres.push_back(sph11);
103-
spheres.push_back(sph12);
104-
*/
10563
double probeRadius = 1.385; // Probe Radius for water
10664
int patchLevel = 2;
10765
double coarsity = 0.5;

0 commit comments

Comments
 (0)