Reduce misuse of fatalerror.h
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 8 Sep 2015 14:09:51 +0000 (16:09 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 9 Sep 2015 15:49:29 +0000 (17:49 +0200)
commite3afdf930e445199776072d49ae77f82d8770d59
tree6ef4476308165b0d3ba37326be3049e2d56e3131
parenta0e541bd488cae446a509a5e1e2ea4114fb228b9
Reduce misuse of fatalerror.h

Header files should not generally need to include fatalerror.h, and
quite a few source files were not declaring their dependency on it
because some widely-used header files were including it.

Removed unused modulo functionality from vec.h

Moved divide_err functionality to the one place it is used

The matrix-inversion code that calls gmx_fatal was in vec.h so that it
can be inlined, but it's only called every MD step for box inversions,
and never called by mdrun on a per-atom basis, so the need for
inlining is low. The remaining use of FARGS (and thus need for
fatalerror.h) in that code could be removed by throwing an exception
(in some later change). Maybe then it could be put back into a header
for inlining.

Change-Id: I74d7dc6d4568c5d7fd9086ee1d48e54d18267b9d
46 files changed:
src/gromacs/domdec/domdec_setup.cpp
src/gromacs/ewald/ewald.cpp
src/gromacs/ewald/long-range-correction.cpp
src/gromacs/ewald/pme-grid.cpp
src/gromacs/ewald/pme-load-balancing.cpp
src/gromacs/ewald/pme-redistribute.cpp
src/gromacs/ewald/pme-spread.cpp
src/gromacs/fileio/vmdio.cpp
src/gromacs/gmxana/gmx_mindist.cpp
src/gromacs/gmxana/gmx_rmsdist.cpp
src/gromacs/gmxana/gmx_rotmat.cpp
src/gromacs/gmxpreprocess/gen_maxwell_velocities.cpp
src/gromacs/gmxpreprocess/sortwater.cpp
src/gromacs/gmxpreprocess/specbond.cpp
src/gromacs/legacyheaders/network.h
src/gromacs/listed-forces/listed-forces.cpp
src/gromacs/listed-forces/position-restraints.cpp
src/gromacs/math/invertmatrix.cpp [new file with mode: 0644]
src/gromacs/math/vec.h
src/gromacs/mdlib/md_support.cpp
src/gromacs/mdlib/mdebin.cpp
src/gromacs/mdlib/mdrun_signalling.cpp
src/gromacs/mdlib/nbnxn_atomdata.c
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c
src/gromacs/mdlib/nbnxn_search.c
src/gromacs/mdlib/ns.cpp
src/gromacs/mdlib/rf_util.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/tgroup.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/mdlib/vcm.cpp
src/gromacs/mdlib/vsite.cpp
src/gromacs/mdlib/wall.cpp
src/gromacs/mdrunutility/handlerestart.cpp
src/gromacs/pbcutil/pbc-simd.h
src/gromacs/pulling/pull.cpp
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/selection/centerofmass.cpp
src/gromacs/statistics/statistics.cpp
src/gromacs/swap/swapcoords.cpp
src/gromacs/trajectoryanalysis/modules/surfacearea.cpp
src/programs/mdrun/membed.c
src/programs/mdrun/repl_ex.cpp
src/programs/mdrun/runner.cpp
src/programs/view/manager.cpp