5050 *
5151 * Calculates the diagonal elements of S as:
5252 * \f[
53- * S_{ii} = factor_ * \sqrt{\frac{4\pi}{a_i}}
53+ * S_{ii} = factor * \sqrt{\frac{4\pi}{a_i}}
5454 * \f]
5555 * while the diagonal elements of D are:
5656 * \f[
57- * D_{ii} = -factor_ * \sqrt{\frac{\pi}{a_i}} \frac{1}{R_I}
57+ * D_{ii} = -factor * \sqrt{\frac{\pi}{a_i}} \frac{1}{R_I}
5858 * \f]
5959 */
6060
6161struct CollocationIntegrator
6262{
63- CollocationIntegrator () : factor_(1.07 ) {}
63+ CollocationIntegrator () : factor(1.07 ) {}
64+ CollocationIntegrator (double f) : factor(f) {}
6465 ~CollocationIntegrator () {}
6566
6667 /* *@{ Single and double layer potentials for a Vacuum Green's function by collocation */
@@ -71,7 +72,7 @@ struct CollocationIntegrator
7172 template <typename DerivativeTraits>
7273 Eigen::MatrixXd singleLayer (const Vacuum<DerivativeTraits, CollocationIntegrator> & gf, const std::vector<Element> & e) const {
7374 return integrator::singleLayer (e,
74- pcm::bind (integrator::SI, this ->factor_ , 1.0 , pcm::_1),
75+ pcm::bind (integrator::SI, this ->factor , 1.0 , pcm::_1),
7576 pcm::bind (&Vacuum<DerivativeTraits, CollocationIntegrator>::kernelS, gf, pcm::_1, pcm::_2));
7677 }
7778 /* ! \tparam DerivativeTraits how the derivatives of the Greens's function are calculated
@@ -81,7 +82,7 @@ struct CollocationIntegrator
8182 template <typename DerivativeTraits>
8283 Eigen::MatrixXd doubleLayer (const Vacuum<DerivativeTraits, CollocationIntegrator> & gf, const std::vector<Element> & e) const {
8384 return integrator::doubleLayer (e,
84- pcm::bind (integrator::DI, this ->factor_ , pcm::_1),
85+ pcm::bind (integrator::DI, this ->factor , pcm::_1),
8586 pcm::bind (&Vacuum<DerivativeTraits, CollocationIntegrator>::kernelD, gf, pcm::_1, pcm::_2, pcm::_3));
8687 }
8788 /* *@}*/
@@ -94,7 +95,7 @@ struct CollocationIntegrator
9495 template <typename DerivativeTraits>
9596 Eigen::MatrixXd singleLayer (const UniformDielectric<DerivativeTraits, CollocationIntegrator> & gf, const std::vector<Element> & e) const {
9697 return integrator::singleLayer (e,
97- pcm::bind (integrator::SI, this ->factor_ , gf.epsilon (), pcm::_1),
98+ pcm::bind (integrator::SI, this ->factor , gf.epsilon (), pcm::_1),
9899 pcm::bind (&UniformDielectric<DerivativeTraits, CollocationIntegrator>::kernelS, gf, pcm::_1, pcm::_2));
99100 }
100101 /* ! \tparam DerivativeTraits how the derivatives of the Greens's function are calculated
@@ -104,7 +105,7 @@ struct CollocationIntegrator
104105 template <typename DerivativeTraits>
105106 Eigen::MatrixXd doubleLayer (const UniformDielectric<DerivativeTraits, CollocationIntegrator> & gf, const std::vector<Element> & e) const {
106107 return integrator::doubleLayer (e,
107- pcm::bind (integrator::DI, this ->factor_ , pcm::_1),
108+ pcm::bind (integrator::DI, this ->factor , pcm::_1),
108109 pcm::bind (&UniformDielectric<DerivativeTraits, CollocationIntegrator>::kernelD, gf, pcm::_1, pcm::_2, pcm::_3));
109110 }
110111 /* *@}*/
@@ -148,7 +149,7 @@ struct CollocationIntegrator
148149 for (size_t i = 0 ; i < mat_size; ++i) {
149150 // Fill diagonal
150151 // Diagonal of S inside the cavity
151- double Sii_I = factor_ * std::sqrt (4 * M_PI / e[i].area ());
152+ double Sii_I = factor * std::sqrt (4 * M_PI / e[i].area ());
152153 // "Diagonal" of Coulomb singularity separation coefficient
153154 double coulomb_coeff = gf.coefficientCoulomb (e[i].center (), e[i].center ());
154155 // "Diagonal" of the image Green's function
@@ -177,9 +178,9 @@ struct CollocationIntegrator
177178 double area = e[i].area ();
178179 double radius = e[i].sphere ().radius ;
179180 // Diagonal of S inside the cavity
180- double Sii_I = factor_ * std::sqrt (4 * M_PI / area);
181+ double Sii_I = factor * std::sqrt (4 * M_PI / area);
181182 // Diagonal of D inside the cavity
182- double Dii_I = -factor_ * std::sqrt (M_PI/ area) * (1.0 / radius);
183+ double Dii_I = -factor * std::sqrt (M_PI/ area) * (1.0 / radius);
183184 // "Diagonal" of Coulomb singularity separation coefficient
184185 double coulomb_coeff = gf.coefficientCoulomb (e[i].center (), e[i].center ());
185186 // "Diagonal" of the directional derivative of the Coulomb singularity separation coefficient
@@ -205,7 +206,7 @@ struct CollocationIntegrator
205206 /* *@}*/
206207
207208 // / Scaling factor for the collocation formulas
208- double factor_ ;
209+ double factor ;
209210};
210211
211212#endif // COLLOCATIONINTEGRATOR_HPP
0 commit comments