Skip to content

Commit f74ad37

Browse files
author
Roberto Di Remigio
committed
Change names
1 parent 79f938a commit f74ad37

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/green/MetalSphere.cpp renamed to src/green/MetalNP.cpp

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

26-
#include "MetalSphere.hpp"
26+
#include "MetalNP.hpp"
2727

2828
#include <cmath>
2929
#include <ostream>
@@ -43,7 +43,7 @@ extern "C" void greens_function(const double * epssol, const double * epsre,
4343
const double * sphRadius, const double * ps, const double * p1, const double * p2,
4444
double * greenre, double * greenim);
4545

46-
double MetalSphere::operator()(double * source, double * probe) const
46+
double MetalNP::operator()(double * source, double * probe) const
4747
{
4848
// Calculation of the value of the Green's Function
4949
double epsre, epsim;
@@ -67,13 +67,13 @@ double MetalSphere::operator()(double * source, double * probe) const
6767
return greenre;
6868
}
6969

70-
double MetalSphere::derivative(const Eigen::Vector3d & direction,
70+
double MetalNP::derivative(const Eigen::Vector3d & direction,
7171
const Eigen::Vector3d & p1, const Eigen::Vector3d & p2) const
7272
{
7373
return epsSolvent_ * (this->derivativeProbe(direction, p1, p2));
7474
}
7575

76-
std::ostream & MetalSphere::printObject(std::ostream & os)
76+
std::ostream & MetalNP::printObject(std::ostream & os)
7777
{
7878
os << "Green's function type: metal sphere" << std::endl;
7979
os << "Permittivity (real part) = " << epsMetal_.real() << std::endl;

src/green/MetalSphere.hpp renamed to src/green/MetalNP.hpp

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

26-
#ifndef METALSPHERE_HPP
27-
#define METALSPHERE_HPP
26+
#ifndef METALNP_HPP
27+
#define METALNP_HPP
2828

2929
#include <complex>
3030
#include <iosfwd>
@@ -41,8 +41,8 @@ class Element;
4141
#include "GreensFunction.hpp"
4242
#include "GreensFunctionFactory.hpp"
4343

44-
/*! \file MetalSphere.hpp
45-
* \class MetalSphere
44+
/*! \file MetalNP.hpp
45+
* \class MetalNP
4646
* \brief Class to describe spherical metal nanoparticles.
4747
* \author Stefano Corni, Luca Frediani, Roberto Di Remigio
4848
* \date 2011, 2014
@@ -56,20 +56,20 @@ class Element;
5656
* http://dx.doi.org/10.1063/1.1558036
5757
*/
5858

59-
class MetalSphere : public GreensFunction<double>
59+
class MetalNP : public GreensFunction<double>
6060
{
6161
private:
6262
typedef std::complex<double> dcomplex;
6363
public:
64-
MetalSphere(double eps, double epsRe, double epsIm,
64+
MetalNP(double eps, double epsRe, double epsIm,
6565
const Eigen::Vector3d & pos, double radius)
6666
: GreensFunction<double>(false), epsSolvent_(eps), epsMetal_(dcomplex(epsRe, epsIm)),
6767
sphPosition_(pos), sphRadius_(radius) {}
68-
MetalSphere(double eps, double epsRe, double epsIm,
68+
MetalNP(double eps, double epsRe, double epsIm,
6969
const Eigen::Vector3d & pos, double radius, DiagonalIntegrator * diag)
7070
: GreensFunction<double>(false, diag), epsSolvent_(eps), epsMetal_(dcomplex(epsRe, epsIm)),
7171
sphPosition_(pos), sphRadius_(radius) {}
72-
virtual ~MetalSphere() {}
72+
virtual ~MetalNP() {}
7373
/*!
7474
* Returns value of the directional derivative of the
7575
* Greens's function for the pair of points p1, p2:
@@ -93,7 +93,7 @@ class MetalSphere : public GreensFunction<double>
9393

9494
virtual double epsilon() const { return epsSolvent_; } // This is just to get it to compile...
9595

96-
friend std::ostream & operator<<(std::ostream & os, MetalSphere & gf) {
96+
friend std::ostream & operator<<(std::ostream & os, MetalNP & gf) {
9797
return gf.printObject(os);
9898
}
9999
EIGEN_MAKE_ALIGNED_OPERATOR_NEW /* See http://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html */
@@ -114,21 +114,21 @@ class MetalSphere : public GreensFunction<double>
114114

115115
namespace
116116
{
117-
// The build functor and use of for_id are not necessary as MetalSphere
117+
// The build functor and use of for_id are not necessary as MetalNP
118118
// inherits from a GreensFunction<double>
119-
IGreensFunction * createMetalSphere(const greenData & _data)
119+
IGreensFunction * createMetalNP(const greenData & _data)
120120
{
121121
// The NP center is in a std::vector<double> but we need an Eigen::Vector3d
122122
// We are currently assuming that there is only one spherical metal NP
123123
Eigen::Vector3d center = Eigen::Vector3d::Zero();
124124
for (int i = 0; i < 3; ++i) {
125125
center(i) = _data.NPspheres[i];
126126
}
127-
return new MetalSphere(_data.epsilon, _data.epsilonReal, _data.epsilonImaginary, center, _data.NPradii, _data.integrator);
127+
return new MetalNP(_data.epsilon, _data.epsilonReal, _data.epsilonImaginary, center, _data.NPradii, _data.integrator);
128128
}
129-
const std::string METALSPHERE("MetalSphere");
130-
const bool registeredMetalSphere =
129+
const std::string METALNP("MetalNP");
130+
const bool registeredMetalNP =
131131
GreensFunctionFactory::TheGreensFunctionFactory().registerGreensFunction(
132-
METALSPHERE, createMetalSphere);
132+
METALNP, createMetalNP);
133133
}
134-
#endif // METALSPHERE_HPP
134+
#endif // METALNP_HPP

0 commit comments

Comments
 (0)