A remark from @levo-str : in colvargrid derived classes, there are a lot of forwarded functions like this:
std::ostream &colvar_grid_scalar::write_restart(std::ostream &os)
{
return colvar_grid<cvm::real>::write_restart(os);
}
Many of them are not used and can be removed entirely. Others can be just grabbed from the base class with using (C++11 and later). This would shave a bunch of code from colvargrid.cpp.
Specifically, the colvar_grid_scalar class would contain:
using colvar_grid<cvm::real>::write_restart;
Edit: there are unused features in colvargrid_scalar (samples grid), and a lot of redundancy between colvargrid_count and colvargrid_scalar.
Action plan:
A remark from @levo-str : in
colvargridderived classes, there are a lot of forwarded functions like this:Many of them are not used and can be removed entirely. Others can be just grabbed from the base class with
using(C++11 and later). This would shave a bunch of code from colvargrid.cpp.Specifically, the colvar_grid_scalar class would contain:
Edit: there are unused features in colvargrid_scalar (samples grid), and a lot of redundancy between colvargrid_count and colvargrid_scalar.
Action plan:
samplesmember fromcolvargrid_scalarusingstatements in declarationcolvargrid_countinto a template classcolvargrid_scalarwith integer or real type