Skip to content

Logarithmic scale for integration of the spherical diffuse green's function - #109

Merged
robertodr merged 35 commits into
PCMSolver:release/1.Yfrom
ilfreddy:logscale
Feb 27, 2018
Merged

robertodr merged 35 commits into
PCMSolver:release/1.Yfrom
ilfreddy:logscale

Conversation

@ilfreddy

Copy link
Copy Markdown
Collaborator

Description

The integration of the differential equation for the angular momentum component is now performed after a second change of variables. The asymptotic solution is no longer logarithmic but linear.
The component at L=0 has now been reintroduced. Without it, we don't get the correct solvation energy.

Motivation and Context

The radial integration was originally performed with an adaptive integrator. That was problematic for thin interfaces, because the integrator would sometimes make use of very large steps and then suddenly skyp the "interesting" part of the domain. We then switched to a non-adaptive one. On the other hand the non adaptive algorithm diverges for the asymptotic solution, which is logarithmic. Changing variable (y=log(r)) eliminates the problem altogether.

How Has This Been Tested?

I have tested several interfaces (eps=1,2,80, all 9 combinations) for a spherical interface of radius=3Å and with a point charge is a cavity of 1.44Å, placed at 0, 3, 6 and 9 (centre, at the interface, right outside and far from the interface respectively).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
    L=0 reintroduced and fixed stability problems of the integrator.
  • New feature (non-breaking change which adds functionality)
    New interface profile, with parametrization similar to Fosso-Tande/Harrison article.

Questions

We need to understand the L=0 issue properly.

@ilfreddy ilfreddy changed the title [WIP]: Logarithmic scale for integration of the spherical diffuse green's function Logarithmic scale for integration of the spherical diffuse green's function Nov 30, 2017
@robertodr

robertodr commented Nov 30, 2017 •

Copy link
Copy Markdown
Member

Great work @ilfreddy! You should rebase to the most recent release/1.Y branch. We can't merge this otherwise. Let me know if you need help with that. It's going to be soooo much fun to merge this and #107!!

namespace odeint = boost::numeric::odeint;
odeint::bulirsch_stoer_dense_out<StateVariable> stepper(
parms.eps_abs_, parms.eps_rel_, parms.factor_x_, parms.factor_dxdt_);
odeint::runge_kutta4<StateVariable> stepper;

@robertodr robertodr Nov 30, 2017 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it works with a fourth-order Runge-Kutta integrator? Have you tried with the Runge-Kutta-Fehlberg 7(8)? If we can keep RK4 instead of RKF78 it's going to be even simpler to ditch Boost.Odeint!

Comment thread src/green/SphericalDiffuse.cpp Outdated
double r1 = (sp + this->origin_).norm();
double r2 = (pp + this->origin_).norm();

double y1 = log(r1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use std::log


/*! \file OneLayerLog.hpp
* \class OneLayerLog
* \brief A dielectric profile based on the Harrison and Fosso-Tande work

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a reference in the pcmsolver.bib file under doc and cite it here?

Comment thread src/interface/Meddle.cpp Outdated

TIMER_ON("Meddle::initStaticSolver");
initStaticSolver();
// exit(-1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean up this debugging comment.

Comment thread src/interface/Meddle.cpp Outdated
// Dot product of MEP and ASC surface function
double energy =
functions_[std::string(mep_name)].dot(functions_[std::string(asc_name)]);
std::cout << functions_[std::string(mep_name)] << std::endl;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean up these debug prints

Comment thread src/solver/SolverImpl.cpp Outdated
TIMER_OFF("Computing DI");
TIMER_ON("Computing SE");
Eigen::MatrixXd SE = op.computeS(cav, gf_o);
// exit(-1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this commented out line.

Comment thread src/green/SphericalDiffuse.cpp Outdated
double r_infinity_ =
this->profile_.center() + 30.0; /*! Upper bound of the integration interval */

double y_0_ = log(r_0_);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use std::log

Comment thread src/green/SphericalDiffuse.cpp Outdated

double y_0_ = log(r_0_);
double y_infinity_ = log(r_infinity_);
double observer_step_ = 1.0e-2 * this->profile_.width() / this->profile_.center(); /*! Time step between observer calls */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 to tie the step of the integrator to the actual shape of the profile. We will have to rethink the use of this->profile_.center() when #107 (which makes MembraneTanh actually usable) is merged in.

Comment thread src/green/SphericalDiffuse.cpp Outdated
for (int L = 0; L <= maxLGreen_; ++L) {
RadialFunction<StateType, LnTransformedRadial, Zeta> tmp_zeta_(L, y_0_, y_infinity_, eval_, params_);
zeta_.push_back(tmp_zeta_);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the two loops can be merged into just one loop.

Comment thread src/green/SphericalDiffuse.cpp Outdated
/* Zeta and Omega are now on a logarithmic scale We need to pass the
arguments in the correct scale and then use the chain rule to get
the proper derivative */
double y1 = log(r1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use std::log

Comment thread CHANGELOG.md
file, instead of overwriting the user provided file. The temporary file is
removed after it has been parsed. Fixes #91 as noted by @ilfreddy.
- Use Runge-Kutta-Fehlberg 7(8) ODE solver to integrate the radial equation
in the spherical diffuse Green's function class.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add/edit the CHANGELOG.md for your changes?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line in the changelog outdated? It seems so. If yes, please remove.

@robertodr robertodr added this to the v1.2.0 milestone Dec 3, 2017
robertodr and others added 15 commits December 14, 2017 18:23
We also check if we are either end of the sorted array of
input parameters, so that we don't fall off of it when
interpolating.
Runge-Kutta-Fehlberg 7(8) replaces the Bulirsch-Stoer integrator.
RKF78 is non-adaptive and is cheaper than BS. It is possible to use more
spherical harmonics in the expansion of the Green's function radial
part.
In particular, with a cavity inside a bubble, the result is identical to vacuum (no dielectric effect)
I suspect this is connected to the removal of the L=0 component from the image part of the Green's function.

Additional note: the integration of the radial part of the green's function can be significantly simplified by making heavilly use of the asymptotic solutions
Moreover I believe that an additional change of variable would make the integration even faster, because, in a logarithmic scale all components are straight lines, except for a small deviation in the interfacial region. Maybe solving directly for Gimg could indeed help.
@MinazoBot

MinazoBot commented Feb 20, 2018 •

Copy link
Copy Markdown
646 Errors
🚫 Please rebase to get rid of the merge commits in this PR
🚫 Please use more than one word.
26a9b90
🚫 Please limit commit subject line to 50 characters.
111c5be
🚫 Please limit commit subject line to 50 characters.
2acd32d
🚫 Please limit commit subject line to 50 characters.
0902fe1
🚫 Please limit commit subject line to 50 characters.
8e58b34
🚫 Please limit commit subject line to 50 characters.
7158ef5
🚫 Please limit commit subject line to 50 characters.
ed5f457
🚫 Please limit commit subject line to 50 characters.
507d45d
🚫 Please limit commit subject line to 50 characters.
75f19f0
🚫 Please limit commit subject line to 50 characters.
3b84d22
🚫 Please limit commit subject line to 50 characters.
302a8a7
🚫 Please separate subject from body with newline.
302a8a7
🚫 Please limit commit subject line to 50 characters.
7ca96a6
🚫 Please limit commit subject line to 50 characters.
ecb669a
🚫 Please limit commit subject line to 50 characters.
40cc52d
🚫 Please limit commit subject line to 50 characters.
b2f42b2
🚫 Please limit commit subject line to 50 characters.
09141a5
🚫 Please limit commit subject line to 50 characters.
12d07df
🚫 Please limit commit subject line to 50 characters.
7b528c2
🚫 Please limit commit subject line to 50 characters.
bdb2783
🚫 Please limit commit subject line to 50 characters.
653e92f
🚫 Please limit commit subject line to 50 characters.
f3fd8f9
🚫 Please limit commit subject line to 50 characters.
af4df2a
🚫 Please limit commit subject line to 50 characters.
cc7abb5
🚫 Please limit commit subject line to 50 characters.
411e935
🚫 Please limit commit subject line to 50 characters.
0888a2e
🚫 Please limit commit subject line to 50 characters.
46b346d
🚫 Please limit commit subject line to 50 characters.
d8adfbb
🚫 Please limit commit subject line to 50 characters.
1221040
🚫 Please limit commit subject line to 50 characters.
fb6ff16
🚫 Please limit commit subject line to 50 characters.
d83318f
🚫 Please limit commit subject line to 50 characters.
376d2b6
🚫 Please limit commit subject line to 50 characters.
f451fae
🚫 Please limit commit subject line to 50 characters.
0bbc04b
🚫 Please limit commit subject line to 50 characters.
d9dd6a6
🚫 Please limit commit subject line to 50 characters.
f95cc64
🚫 Please limit commit subject line to 50 characters.
2a42843
🚫 Please limit commit subject line to 50 characters.
a17a204
🚫 Please limit commit subject line to 50 characters.
0f00e85
🚫 Please limit commit subject line to 50 characters.
2ad0a66
🚫 Please separate subject from body with newline.
28f567f
🚫 Please limit commit subject line to 50 characters.
1712178
🚫 Please limit commit subject line to 50 characters.
ea3323c
🚫 Please limit commit subject line to 50 characters.
35a16b5
🚫 Please limit commit subject line to 50 characters.
dc9adcd
🚫 Please limit commit subject line to 50 characters.
671e758
🚫 Please limit commit subject line to 50 characters.
fb141c2
🚫 Please limit commit subject line to 50 characters.
491780e
🚫 Please limit commit subject line to 50 characters.
4b142ea
🚫 Please limit commit subject line to 50 characters.
8857799
🚫 Please limit commit subject line to 50 characters.
810ebb9
🚫 Please limit commit subject line to 50 characters.
cc7ddd0
🚫 Please limit commit subject line to 50 characters.
2b56ddf
🚫 Please limit commit subject line to 50 characters.
5d6b306
🚫 Please limit commit subject line to 50 characters.
c8907d2
🚫 Please limit commit subject line to 50 characters.
440fdc7
🚫 Please limit commit subject line to 50 characters.
0404ec1
🚫 Please limit commit subject line to 50 characters.
a127771
🚫 Please limit commit subject line to 50 characters.
6eed862
🚫 Please limit commit subject line to 50 characters.
f99a710
🚫 Please limit commit subject line to 50 characters.
1d53a58
🚫 Please limit commit subject line to 50 characters.
4fac5ac
🚫 Please limit commit subject line to 50 characters.
68b96af
🚫 Please limit commit subject line to 50 characters.
e529c4a
🚫 Please limit commit subject line to 50 characters.
28d83b5
🚫 Please limit commit subject line to 50 characters.
11dd160
🚫 Please limit commit subject line to 50 characters.
4fb2000
🚫 Please limit commit subject line to 50 characters.
e8b0291
🚫 Please limit commit subject line to 50 characters.
3f40314
🚫 Please limit commit subject line to 50 characters.
a416707
🚫 Please limit commit subject line to 50 characters.
c14a8d4
🚫 Please limit commit subject line to 50 characters.
fcf3802
🚫 Please limit commit subject line to 50 characters.
774b745
🚫 Please limit commit subject line to 50 characters.
f72a0f3
🚫 Please limit commit subject line to 50 characters.
3dacd53
🚫 Please limit commit subject line to 50 characters.
95ec237
🚫 Please limit commit subject line to 50 characters.
407b1bc
🚫 Please limit commit subject line to 50 characters.
788ae3f
🚫 Please limit commit subject line to 50 characters.
3b12bce
🚫 Please limit commit subject line to 50 characters.
852ae8c
🚫 Please limit commit subject line to 50 characters.
a569b1e
🚫 Please limit commit subject line to 50 characters.
fc98f62
🚫 Please limit commit subject line to 50 characters.
f64f788
🚫 Please limit commit subject line to 50 characters.
e6773d3
🚫 Please limit commit subject line to 50 characters.
51d2d45
🚫 Please limit commit subject line to 50 characters.
22c782b
🚫 Please limit commit subject line to 50 characters.
427559b
🚫 Please limit commit subject line to 50 characters.
57d29e4
🚫 Please limit commit subject line to 50 characters.
9bee8ec
🚫 Please limit commit subject line to 50 characters.
013377d
🚫 Please limit commit subject line to 50 characters.
857ddd2
🚫 Please limit commit subject line to 50 characters.
f6c40ea
🚫 Please limit commit subject line to 50 characters.
d074e0e
🚫 Please limit commit subject line to 50 characters.
b513389
🚫 Please limit commit subject line to 50 characters.
790768e
🚫 Please limit commit subject line to 50 characters.
4e002b6
🚫 Please limit commit subject line to 50 characters.
cfb10e3
🚫 Please limit commit subject line to 50 characters.
98dadd9
🚫 Please limit commit subject line to 50 characters.
1cd88b9
🚫 Please limit commit subject line to 50 characters.
72aafcd
🚫 Please limit commit subject line to 50 characters.
aa94413
🚫 Please limit commit subject line to 50 characters.
1d66d91
🚫 Please limit commit subject line to 50 characters.
2bf99bc
🚫 Please limit commit subject line to 50 characters.
da30472
🚫 Please limit commit subject line to 50 characters.
e9aef84
🚫 Please limit commit subject line to 50 characters.
d08edf9
🚫 Please limit commit subject line to 50 characters.
ec7b9f2
🚫 Please limit commit subject line to 50 characters.
3bd92e8
🚫 Please limit commit subject line to 50 characters.
000d3a8
🚫 Please limit commit subject line to 50 characters.
05227de
🚫 Please limit commit subject line to 50 characters.
41b315d
🚫 Please limit commit subject line to 50 characters.
25eda6d
🚫 Please limit commit subject line to 50 characters.
414ff7b
🚫 Please limit commit subject line to 50 characters.
763ef19
🚫 Please limit commit subject line to 50 characters.
f67bfc7
🚫 Please limit commit subject line to 50 characters.
e648ec0
🚫 Please limit commit subject line to 50 characters.
030fd01
🚫 Please limit commit subject line to 50 characters.
047c67b
🚫 Please limit commit subject line to 50 characters.
cd53296
🚫 Please limit commit subject line to 50 characters.
eadf870
🚫 Please limit commit subject line to 50 characters.
b8db02b
🚫 Please limit commit subject line to 50 characters.
f30746b
🚫 Please limit commit subject line to 50 characters.
a58b320
🚫 Please limit commit subject line to 50 characters.
a0adc2c
🚫 Please limit commit subject line to 50 characters.
aef377c
🚫 Please limit commit subject line to 50 characters.
bb86887
🚫 Please limit commit subject line to 50 characters.
7f62b1a
🚫 Please limit commit subject line to 50 characters.
0bc2389
🚫 Please limit commit subject line to 50 characters.
e6220d8
🚫 Please limit commit subject line to 50 characters.
af506d1
🚫 Please limit commit subject line to 50 characters.
b354dd8
🚫 Please limit commit subject line to 50 characters.
0f3df4c
🚫 Please limit commit subject line to 50 characters.
aa27b96
🚫 Please limit commit subject line to 50 characters.
9a9261a
🚫 Please limit commit subject line to 50 characters.
9afbcef
🚫 Please limit commit subject line to 50 characters.
ae6381f
🚫 Please limit commit subject line to 50 characters.
db6840c
🚫 Please limit commit subject line to 50 characters.
5825a3f
🚫 Please limit commit subject line to 50 characters.
b0d0076
🚫 Please limit commit subject line to 50 characters.
dae9650
🚫 Please limit commit subject line to 50 characters.
f628841
🚫 Please limit commit subject line to 50 characters.
ade25f1
🚫 Please limit commit subject line to 50 characters.
076f092
🚫 Please limit commit subject line to 50 characters.
4c7112f
🚫 Please limit commit subject line to 50 characters.
46c86f2
🚫 Please limit commit subject line to 50 characters.
2c429e1
🚫 Please limit commit subject line to 50 characters.
bd85a55
🚫 Please limit commit subject line to 50 characters.
a555520
🚫 Please limit commit subject line to 50 characters.
784141b
🚫 Please limit commit subject line to 50 characters.
c060393
🚫 Please limit commit subject line to 50 characters.
e7a2103
🚫 Please limit commit subject line to 50 characters.
986be62
🚫 Please limit commit subject line to 50 characters.
c6b359b
🚫 Please limit commit subject line to 50 characters.
a6586ca
🚫 Please limit commit subject line to 50 characters.
dfe3b20
🚫 Please limit commit subject line to 50 characters.
802f8db
🚫 Please limit commit subject line to 50 characters.
775befa
🚫 Please limit commit subject line to 50 characters.
a8a5597
🚫 Please limit commit subject line to 50 characters.
54feb2c
🚫 Please limit commit subject line to 50 characters.
1cf2888
🚫 Please limit commit subject line to 50 characters.
b4f316a
🚫 Please limit commit subject line to 50 characters.
796d4bc
🚫 Please limit commit subject line to 50 characters.
3902181
🚫 Please limit commit subject line to 50 characters.
7942b06
🚫 Please limit commit subject line to 50 characters.
b596e86
🚫 Please limit commit subject line to 50 characters.
aa05e40
🚫 Please limit commit subject line to 50 characters.
62b6804
🚫 Please limit commit subject line to 50 characters.
039fb79
🚫 Please limit commit subject line to 50 characters.
e15a48a
🚫 Please limit commit subject line to 50 characters.
cfc3f69
🚫 Please limit commit subject line to 50 characters.
47eeaa7
🚫 Please limit commit subject line to 50 characters.
1c7790d
🚫 Please limit commit subject line to 50 characters.
74bbe79
🚫 Please limit commit subject line to 50 characters.
0f0462b
🚫 Please limit commit subject line to 50 characters.
89ced17
🚫 Please limit commit subject line to 50 characters.
a497714
🚫 Please limit commit subject line to 50 characters.
e4484e2
🚫 Please limit commit subject line to 50 characters.
1791f9a
🚫 Please limit commit subject line to 50 characters.
32eaebf
🚫 Please limit commit subject line to 50 characters.
7fd0c54
🚫 Please limit commit subject line to 50 characters.
f65bde9
🚫 Please limit commit subject line to 50 characters.
3a613ab
🚫 Please limit commit subject line to 50 characters.
24fd44a
🚫 Please limit commit subject line to 50 characters.
94f2663
🚫 Please limit commit subject line to 50 characters.
3d72d5b
🚫 Please limit commit subject line to 50 characters.
e81a560
🚫 Please limit commit subject line to 50 characters.
fc539a0
🚫 Please limit commit subject line to 50 characters.
08a29ad
🚫 Please limit commit subject line to 50 characters.
f477995
🚫 Please limit commit subject line to 50 characters.
dc45cdc
🚫 Please limit commit subject line to 50 characters.
74c77e7
🚫 Please limit commit subject line to 50 characters.
89f31b3
🚫 Please limit commit subject line to 50 characters.
4232f96
🚫 Please limit commit subject line to 50 characters.
599a9a3
🚫 Please separate subject from body with newline.
599a9a3
🚫 Please limit commit subject line to 50 characters.
752964a
🚫 Please limit commit subject line to 50 characters.
72892be
🚫 Please limit commit subject line to 50 characters.
dbea046
🚫 Please limit commit subject line to 50 characters.
39e0592
🚫 Please limit commit subject line to 50 characters.
80dc823
🚫 Please limit commit subject line to 50 characters.
308ecd7
🚫 Please limit commit subject line to 50 characters.
c6a770f
🚫 Please limit commit subject line to 50 characters.
aa77517
🚫 Please limit commit subject line to 50 characters.
05d0db3
🚫 Please limit commit subject line to 50 characters.
ccb42cc
🚫 Please limit commit subject line to 50 characters.
f769729
🚫 Please limit commit subject line to 50 characters.
6be8e59
🚫 Please limit commit subject line to 50 characters.
2af3aaf
🚫 Please limit commit subject line to 50 characters.
aa4c83b
🚫 Please limit commit subject line to 50 characters.
4a6997a
🚫 Please limit commit subject line to 50 characters.
065ce90
🚫 Please limit commit subject line to 50 characters.
c6a8d6b
🚫 Please limit commit subject line to 50 characters.
d686609
🚫 Please limit commit subject line to 50 characters.
9787c89
🚫 Please limit commit subject line to 50 characters.
6a101f7
🚫 Please limit commit subject line to 50 characters.
39d98e8
🚫 Please limit commit subject line to 50 characters.
e2e73db
🚫 Please limit commit subject line to 50 characters.
6261324
🚫 Please limit commit subject line to 50 characters.
c141af0
🚫 Please limit commit subject line to 50 characters.
004869a
🚫 Please limit commit subject line to 50 characters.
d0b5ef8
🚫 Please limit commit subject line to 50 characters.
45b8d71
🚫 Please limit commit subject line to 50 characters.
f2907a6
🚫 Please limit commit subject line to 50 characters.
bce7fe7
🚫 Please limit commit subject line to 50 characters.
d5996fd
🚫 Please limit commit subject line to 50 characters.
d5d29e9
🚫 Please limit commit subject line to 50 characters.
cdd916b
🚫 Please limit commit subject line to 50 characters.
d6bd668
🚫 Please limit commit subject line to 50 characters.
9f097bc
🚫 Please limit commit subject line to 50 characters.
7a9f118
🚫 Please limit commit subject line to 50 characters.
02be485
🚫 Please limit commit subject line to 50 characters.
ffb9034
🚫 Please limit commit subject line to 50 characters.
3b35a6c
🚫 Please limit commit subject line to 50 characters.
5e9b513
🚫 Please limit commit subject line to 50 characters.
ae68881
🚫 Please limit commit subject line to 50 characters.
709427a
🚫 Please limit commit subject line to 50 characters.
50ad926
🚫 Please limit commit subject line to 50 characters.
49bf6c9
🚫 Please limit commit subject line to 50 characters.
d6167f4
🚫 Please limit commit subject line to 50 characters.
2883080
🚫 Please limit commit subject line to 50 characters.
6ac157d
🚫 Please limit commit subject line to 50 characters.
f8dff4c
🚫 Please limit commit subject line to 50 characters.
e59b7c5
🚫 Please limit commit subject line to 50 characters.
bd0b05c
🚫 Please limit commit subject line to 50 characters.
58cbfec
🚫 Please limit commit subject line to 50 characters.
0036f21
🚫 Please limit commit subject line to 50 characters.
04d12ad
🚫 Please limit commit subject line to 50 characters.
88b1ab5
🚫 Please limit commit subject line to 50 characters.
10840b3
🚫 Please limit commit subject line to 50 characters.
24494f9
🚫 Please limit commit subject line to 50 characters.
75f4832
🚫 Please limit commit subject line to 50 characters.
c028f7a
🚫 Please limit commit subject line to 50 characters.
fbe639a
🚫 Please limit commit subject line to 50 characters.
8084e01
🚫 Please limit commit subject line to 50 characters.
7b4d2a5
🚫 Please limit commit subject line to 50 characters.
4d91e0b
🚫 Please limit commit subject line to 50 characters.
11b47da
🚫 Please limit commit subject line to 50 characters.
402e670
🚫 Please limit commit subject line to 50 characters.
8b8fc91
🚫 Please limit commit subject line to 50 characters.
f64d8f3
🚫 Please limit commit subject line to 50 characters.
3427c8a
🚫 Please limit commit subject line to 50 characters.
818c8fe
🚫 Please limit commit subject line to 50 characters.
70918e2
🚫 Please limit commit subject line to 50 characters.
b5b1a5f
🚫 Please limit commit subject line to 50 characters.
4c29e37
🚫 Please limit commit subject line to 50 characters.
4a3f7e3
🚫 Please limit commit subject line to 50 characters.
2d84386
🚫 Please limit commit subject line to 50 characters.
a1a4749
🚫 Please limit commit subject line to 50 characters.
9203e91
🚫 Please limit commit subject line to 50 characters.
41e1cd5
🚫 Please limit commit subject line to 50 characters.
a3bfb84
🚫 Please limit commit subject line to 50 characters.
0f3eba4
🚫 Please limit commit subject line to 50 characters.
c18ace9
🚫 Please limit commit subject line to 50 characters.
6243505
🚫 Please limit commit subject line to 50 characters.
9882e67
🚫 Please limit commit subject line to 50 characters.
e03b96a
🚫 Please limit commit subject line to 50 characters.
739121f
🚫 Please limit commit subject line to 50 characters.
9461432
🚫 Please limit commit subject line to 50 characters.
4d455a1
🚫 Please limit commit subject line to 50 characters.
7667780
🚫 Please limit commit subject line to 50 characters.
03a15df
🚫 Please limit commit subject line to 50 characters.
81cd5c3
🚫 Please limit commit subject line to 50 characters.
a57658b
🚫 Please limit commit subject line to 50 characters.
22ce782
🚫 Please limit commit subject line to 50 characters.
e35690f
🚫 Please limit commit subject line to 50 characters.
4129377
🚫 Please limit commit subject line to 50 characters.
0ea5f20
🚫 Please limit commit subject line to 50 characters.
083f176
🚫 Please limit commit subject line to 50 characters.
b0ba428
🚫 Please limit commit subject line to 50 characters.
3cf8ad3
🚫 Please limit commit subject line to 50 characters.
b93dce5
🚫 Please limit commit subject line to 50 characters.
2e04b00
🚫 Please limit commit subject line to 50 characters.
f25c3ac
🚫 Please limit commit subject line to 50 characters.
7902065
🚫 Please limit commit subject line to 50 characters.
b5a120f
🚫 Please limit commit subject line to 50 characters.
c07c1f4
🚫 Please limit commit subject line to 50 characters.
f11e96f
🚫 Please limit commit subject line to 50 characters.
3c7e916
🚫 Please limit commit subject line to 50 characters.
a12ad0b
🚫 Please limit commit subject line to 50 characters.
2f88467
🚫 Please limit commit subject line to 50 characters.
6177f34
🚫 Please limit commit subject line to 50 characters.
99f6065
🚫 Please limit commit subject line to 50 characters.
4685e0e
🚫 Please limit commit subject line to 50 characters.
d6e3916
🚫 Please limit commit subject line to 50 characters.
08b6259
🚫 Please limit commit subject line to 50 characters.
0a4f74a
🚫 Please limit commit subject line to 50 characters.
e55538e
🚫 Please limit commit subject line to 50 characters.
4ec4fec
🚫 Please limit commit subject line to 50 characters.
860360a
🚫 Please limit commit subject line to 50 characters.
7c4e6e1
🚫 Please limit commit subject line to 50 characters.
d6be8eb
🚫 Please limit commit subject line to 50 characters.
943f7b7
🚫 Please limit commit subject line to 50 characters.
bbeb199
🚫 Please limit commit subject line to 50 characters.
1f0f4a5
🚫 Please limit commit subject line to 50 characters.
65dd1d7
🚫 Please limit commit subject line to 50 characters.
282dbcb
🚫 Please limit commit subject line to 50 characters.
e301c8f
🚫 Please limit commit subject line to 50 characters.
1c904e9
🚫 Please limit commit subject line to 50 characters.
a7fd22a
🚫 Please limit commit subject line to 50 characters.
0e5ff86
🚫 Please limit commit subject line to 50 characters.
658266c
🚫 Please limit commit subject line to 50 characters.
96efb9d
🚫 Please limit commit subject line to 50 characters.
6afc2d0
🚫 Please limit commit subject line to 50 characters.
83fff2d
🚫 Please limit commit subject line to 50 characters.
6c897c0
🚫 Please limit commit subject line to 50 characters.
18c9130
🚫 Please limit commit subject line to 50 characters.
51c94ea
🚫 Please limit commit subject line to 50 characters.
8156e50
🚫 Please limit commit subject line to 50 characters.
9e0c8f6
🚫 Please limit commit subject line to 50 characters.
187fae3
🚫 Please limit commit subject line to 50 characters.
7dbf388
🚫 Please limit commit subject line to 50 characters.
aeb2194
🚫 Please limit commit subject line to 50 characters.
e23169d
🚫 Please limit commit subject line to 50 characters.
2de67f1
🚫 Please limit commit subject line to 50 characters.
0318ea5
🚫 Please limit commit subject line to 50 characters.
ed8fd4e
🚫 Please limit commit subject line to 50 characters.
7045ad8
🚫 Please limit commit subject line to 50 characters.
953749c
⚠️ Danger found 646 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 339.

Generated by 🚫 Danger

ilfreddy and others added 2 commits February 20, 2018 16:55
Disappeared in the last merge request.
Did `git reset --soft upstream/release/1.Y` without first update branch
@codecov

codecov Bot commented Feb 23, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #109 into release/1.Y will increase coverage by 0.52%.
The diff coverage is 85.18%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/1.Y     #109      +/-   ##
===============================================
+ Coverage        71.55%   72.07%   +0.52%     
===============================================
  Files               89       89              
  Lines             5522     5521       -1     
===============================================
+ Hits              3951     3979      +28     
+ Misses            1571     1542      -29
Impacted Files Coverage Δ
src/green/GreensFunction.hpp 82.85% <ø> (ø) ⬆️
src/green/SphericalDiffuse.hpp 40% <ø> (ø) ⬆️
src/interface/Meddle.hpp 100% <ø> (ø) ⬆️
src/green/dielectric_profile/OneLayerErf.hpp 72.97% <100%> (+1.54%) ⬆️
src/green/dielectric_profile/OneLayerTanh.hpp 72.22% <100%> (+1.63%) ⬆️
src/green/Green.hpp 100% <100%> (ø) ⬆️
src/green/SphericalDiffuse.cpp 81.45% <100%> (-1.35%) ⬇️
src/green/dielectric_profile/OneLayerLog.hpp 58.62% <58.62%> (ø)
src/green/InterfacesImpl.hpp 79.61% <90.32%> (+1.72%) ⬆️
src/utils/MathUtils.hpp 98.01% <93.75%> (-0.87%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4dfac30...fcdee69. Read the comment docs.

@robertodr robertodr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add one of the tests you ran to uncover the bug as a standalone tests? You can see how they are done in the tests/standalone directory.

Comment thread CHANGELOG.md Outdated
- Bug in the diffuse interface Green's function. Contrary to the sharp
interface case, it is wrong to remove the monopole, which becomes
identically zero when the corresponding differential equation is
solved in etreme cases (e.g. charge far away from the sphere).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "etreme" --> "extreme"

Comment thread CHANGELOG.md
file, instead of overwriting the user provided file. The temporary file is
removed after it has been parsed. Fixes #91 as noted by @ilfreddy.
- Use Runge-Kutta-Fehlberg 7(8) ODE solver to integrate the radial equation
in the spherical diffuse Green's function class.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line in the changelog outdated? It seems so. If yes, please remove.

Comment thread src/green/SphericalDiffuse.cpp Outdated
template class SphericalDiffuse<OneLayerLog>;

/*
FIXME: the numerical integration in logarithmic scale requires a step

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ilfreddy @arnfinn Mentions of the MembraneTanh class should be removed from the code. This FIXME should become an issue, so we can keep track of it.

Comment thread src/green/SphericalDiffuse.hpp Outdated
@@ -42,6 +42,7 @@ class Element;
#include "InterfacesImpl.hpp"
#include "dielectric_profile/MembraneTanh.hpp"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

@@ -4,6 +4,7 @@ Anisotropic.hpp
MembraneTanh.hpp

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

for (int i = 0; i < cavity.size(); ++i) {
for (int j = 0; j < cavity.size(); ++j) {
REQUIRE(reference(i, j) == Approx(results(i, j)));
REQUIRE(results(i, j) == Approx(results(i, j)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ilfreddy You are checking the matrix against itself... This test will always pass. You have to regenerate the tanhsphericaldiffuse_S_collocation.npy reference file using the update_reference_files executable.

for (int i = 0; i < cavity.size(); ++i) {
for (int j = 0; j < cavity.size(); ++j) {
REQUIRE(reference(i, j) == Approx(results(i, j)));
REQUIRE(results(i, j) == Approx(results(i, j)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here. This test is checking a matrix against itself, so it will always pass.

Comment thread tests/dielectric_profile/one_layer.cpp Outdated
double log_value(double point, double e1, double e2, double w, double c) {
w /= 6.0;
double epsLog = std::log(e2 / e1);
double val = (1.0 + boost::math::erf((point - c) / w)) / 2.0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use pcm::erf instead of boost::math::erf directlty. It will make easier pulling out Boost later on.

Comment thread tools/pcmsolver.py.in Outdated
# Valid values: TANH, ERF
# Valid values: TANH, ERF, LOG
# Default: TANH
green.add_kw('PROFILE', 'STR', 'TANH')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default be changed to LOG rather than TANH? If yes, change it here. Plus you will need to add a note in the changelog under the Changed section and update the documentation files:

  1. doc/code-reference/greens-functions.rst
  2. doc/users/input.rst, in the Profile section.

@robertodr

Copy link
Copy Markdown
Member

Thanks @arnfinn for cleaning up this PR! I'll squash and merge as soon as tests pass. There are some lingering issues #127, which I'll tackle in an upcoming PR, and #124, which will need some more consideration from @ilfreddy

@robertodr
robertodr merged commit 8195983 into PCMSolver:release/1.Y Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants