You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Overhaul Green's function factory functionality - #107
I am starting to remove some Boost dependencies from the code. I would like to only include what's strictly necessary from Boost, so that the transition to C++11 for version 2 (long awaited) can happen as smoothly as possible. When this PR is ready to go, we will only depend on:
Dispatching of Green’s functions in the factory is purely label-based. The input reader generates a string that holds the type of the Green’s function, the strategy for calculating its normal derivatives and the dielectric profile (if needed): TYPE_DERIVATIVE_PROFILE. The Green’s functions are subscribed to the factory using this label, which is then also the one used for their creation. Iteration over lists of types to dispatch the correct template parameters is thus completely avoided. This removes the dependency on the metafunctions in ForId.hpp and the dependency on Boost.MPL, the Boost metaprogramming library.
Dispatching of quadrature rules for the numerical boundary integral operator has been rewritten, removing the dependency on Boost.MPL.
The input wrapping data struct-s have been modified to include the string defining the type of object and to remove now unused information.
Formatting of output is done entirely using C++ streams, removing the dependency on Boost.Format.
Removed
Some unused files have been removed:
Interpolation.hpp
Interpolation.cpp
Vector2.hpp
Vector3.hpp
ForId.hpp
DerivativeUtils.hpp
The cavityType(), solverType(), greenInsideType(), greenOutsideType()
and integratorType() functions in the Input object have been removed.
This information is now wrapped into the corresponding input-wrapping struct-s: CavityData, SolverData, GreenData and BIOperatorData.
@arnfinn@ilfreddy can one of you try to compile this PR on Mac OS X with GCC (not Apple Clang)? I am getting a weird error message about a function in a system header not being defined...
I got the following error when I tried your branch with MacPorts gcc5 5.5.0_0, which I guess is the same as Travis get:
[ 8%] Building CXX object src/cavity/CMakeFiles/cavity.dir/ICavity.cpp.o
In file included from /usr/include/unistd.h:638:0,
from /opt/local/include/zconf.h:475,
from /opt/local/include/zlib.h:34,
from /Volumes/repos/arnfinn/pcmsolver/src/utils/cnpy.hpp:17,
from /Volumes/repos/arnfinn/pcmsolver/src/utils/MathUtils.hpp:42,
from /Volumes/repos/arnfinn/pcmsolver/src/cavity/ICavity.cpp:32:
/usr/include/sys/select.h:114:19: error: 'fd_set' has not been declared
int pselect(int, fd_set * __restrict, fd_set * __restrict,
^
/usr/include/sys/select.h:114:40: error: 'fd_set' has not been declared
int pselect(int, fd_set * __restrict, fd_set * __restrict,
^
/usr/include/sys/select.h:115:3: error: 'fd_set' has not been declared
fd_set * __restrict, const struct timespec * __restrict,
^
make[2]: *** [src/cavity/CMakeFiles/cavity.dir/ICavity.cpp.o] Error 1
make[1]: *** [src/cavity/CMakeFiles/cavity.dir/all] Error 2
make: *** [all] Error 2
Thanks a lot @arnfinn. Yep, it's the same error. I have tried GCC 6.4.0 and GCC 7.2.0 on Travis, both installed with Homebrew. The fact that GCC 5.5.0 installed via MacPorts gives the same error doesn't bode well. I guess when I pulled some Boost stuff out some include-s that were within the Boost headers were ripped away. Sadly ironic... I'll ask some of the local gurus here if they've ever seen this kind of problem. Can you run a grep fd_set in the /usr/include/sys directory?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I am starting to remove some Boost dependencies from the code. I would like to only include what's strictly necessary from Boost, so that the transition to C++11 for version 2 (long awaited) can happen as smoothly as possible. When this PR is ready to go, we will only depend on:
Changed
TYPE_DERIVATIVE_PROFILE. The Green’s functions are subscribed to the factory using this label, which is then also the one used for their creation. Iteration over lists of types to dispatch the correct template parameters is thus completely avoided. This removes the dependency on the metafunctions inForId.hppand the dependency on Boost.MPL, the Boost metaprogramming library.struct-s have been modified to include the string defining the type of object and to remove now unused information.Removed
Interpolation.hppInterpolation.cppVector2.hppVector3.hppForId.hppDerivativeUtils.hppcavityType(),solverType(),greenInsideType(),greenOutsideType()and
integratorType()functions in theInputobject have been removed.This information is now wrapped into the corresponding input-wrapping
struct-s:CavityData,SolverData,GreenDataandBIOperatorData.Todos
forloop implementation in places whereBOOST_FOREACHis used. These are fenced with theHAS_CXX11preprocessor definition.- [ ] In view of Logarithmic scale for integration of the spherical diffuse green's function #109, implement a Runge-Kutta 4th order ODE integrator to replace the one provided by Boost.Odeint. This one should suffice for our purposes.Status
I would also like to tackle the use of Boost.Variant before marking it ready to go.