Use constexpr for physical constants and move them into gmx namespace
authorJoe Jordan <ejjordan12@gmail.com>
Tue, 9 Mar 2021 14:33:55 +0000 (14:33 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Tue, 9 Mar 2021 14:33:55 +0000 (14:33 +0000)
commitddf6512a3a06415bbfb25a0cc4ecdb6ce082630f
tree6ddf8f885a51908a2aabfd3430768504c591fe02
parent58d53f53aa9e8932d10ba42bcbe11d6e8bdf3107
Use constexpr for physical constants and move them into gmx namespace

The physical constants that are part of the public API are converted from
defines to constexprs and are moved into the gmx namespace. This means
that many files are touched with tirvial changes. The benefit is that
now the risk of symbol collision is reduced in cases where a library
might depend on these constants.

Additionally, in the same vein of library cleanup, the math/utility
header is removed from units header and included only in the sources
that actually need it.
85 files changed:
api/legacy/include/gromacs/math/units.h
src/gromacs/applied_forces/awh/awh.cpp
src/gromacs/applied_forces/awh/dimparams.h
src/gromacs/applied_forces/electricfield.cpp
src/gromacs/ewald/ewald.cpp
src/gromacs/ewald/long_range_correction.cpp
src/gromacs/ewald/pme_gpu_internal.cpp
src/gromacs/ewald/pme_gpu_types.h
src/gromacs/ewald/pme_solve.cpp
src/gromacs/fileio/pdbio.cpp
src/gromacs/fileio/tngio.cpp
src/gromacs/gmxana/anadih.cpp
src/gromacs/gmxana/angle_correction.h
src/gromacs/gmxana/gmx_angle.cpp
src/gromacs/gmxana/gmx_awh.cpp
src/gromacs/gmxana/gmx_bar.cpp
src/gromacs/gmxana/gmx_bundle.cpp
src/gromacs/gmxana/gmx_chi.cpp
src/gromacs/gmxana/gmx_clustsize.cpp
src/gromacs/gmxana/gmx_current.cpp
src/gromacs/gmxana/gmx_density.cpp
src/gromacs/gmxana/gmx_densorder.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_dos.cpp
src/gromacs/gmxana/gmx_enemat.cpp
src/gromacs/gmxana/gmx_energy.cpp
src/gromacs/gmxana/gmx_hbond.cpp
src/gromacs/gmxana/gmx_nmeig.cpp
src/gromacs/gmxana/gmx_nmens.cpp
src/gromacs/gmxana/gmx_nmtraj.cpp
src/gromacs/gmxana/gmx_rama.cpp
src/gromacs/gmxana/gmx_sham.cpp
src/gromacs/gmxana/gmx_sigeps.cpp
src/gromacs/gmxana/gmx_spol.cpp
src/gromacs/gmxana/gmx_tcaf.cpp
src/gromacs/gmxana/gmx_traj.cpp
src/gromacs/gmxana/gmx_velacc.cpp
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxana/hxprops.cpp
src/gromacs/gmxana/pp2shift.cpp
src/gromacs/gmxana/thermochemistry.cpp
src/gromacs/gmxpreprocess/calch.cpp
src/gromacs/gmxpreprocess/convparm.cpp
src/gromacs/gmxpreprocess/editconf.cpp
src/gromacs/gmxpreprocess/gen_maxwell_velocities.cpp
src/gromacs/gmxpreprocess/gen_vsite.cpp
src/gromacs/gmxpreprocess/genion.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/gmxpreprocess/hizzie.cpp
src/gromacs/gmxpreprocess/readir.cpp
src/gromacs/gmxpreprocess/solvate.cpp
src/gromacs/gmxpreprocess/topshake.cpp
src/gromacs/gmxpreprocess/vsite_parm.cpp
src/gromacs/gmxpreprocess/x2top.cpp
src/gromacs/imd/imd.cpp
src/gromacs/listed_forces/bonded.cpp
src/gromacs/listed_forces/restcbt.cpp
src/gromacs/mdlib/calc_verletbuf.cpp
src/gromacs/mdlib/calcmu.cpp
src/gromacs/mdlib/coupling.cpp
src/gromacs/mdlib/dispersioncorrection.cpp
src/gromacs/mdlib/energyoutput.cpp
src/gromacs/mdlib/expanded.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/lincs.cpp
src/gromacs/mdlib/rf_util.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/mdlib/updategroups.cpp
src/gromacs/mdrun/replicaexchange.cpp
src/gromacs/mdrun/shellfc.cpp
src/gromacs/mdrun/tpi.cpp
src/gromacs/mimic/communicator.cpp
src/gromacs/modularsimulator/parrinellorahmanbarostat.cpp
src/gromacs/modularsimulator/velocityscalingtemperaturecoupling.cpp
src/gromacs/pbcutil/pbc.cpp
src/gromacs/pulling/pull.cpp
src/gromacs/selection/params.cpp
src/gromacs/selection/sm_insolidangle.cpp
src/gromacs/tables/forcetable.cpp
src/gromacs/tools/check.cpp
src/gromacs/tools/pme_error.cpp
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/trajectoryanalysis/modules/freevolume.cpp
src/gromacs/trajectoryanalysis/modules/sasa.cpp