Convert ewald module to C++
Used std::min/max/pow, some static casts, eliminated unused variables,
defined module, added some Doxygen, initialized some tensors directly
with zero. Removed all C++ ifdef guards, since this module and all its
callers all now compile as C++!
Reworked the implementations of gmx_pme_pp_init(),
gmx_pme_send_force_vir_ener() and gmx_pme_recv_coeffs_coords() to
handle unused-variable warnings better. Such functions can only ever
be used when MPI is configured, but in that case, the old
implementations had variables whose values had to propagate across
ifdef-ed regions. Now, more of the function bodies are behind an ifdef
and the unused values are marked as such only on the code path where
they are unused.
Simplified logic in long-range-correction.cpp so that humans and the
clang static-analyzer can understand what is going on. Fortunately,
the death of the group scheme will eliminate much of the horror of the
ewald_LRcorrection() function, because calc_excl_corr will be always
false.
Replaced use of undocumented conjmul(a,b) with cmul(a, conjugate(b))
since the latter two are static functions in gmxcomplex.h.
Renamed tabulate_eir() as tabulateStructureFactors().
Removed mpi_type in favour of existing GMX_MPI_REAL
Replaced some macros with constants.
Converted comments into basic Doxygen, plus a suppression in
pme-internal.h because Doxygen seems to think struct fields are public
documentation no matter what you tell it.
Change-Id: Ic9f219cc73dbb586c58a78cdfcd17e2bc1fd7a19
27 files changed: