plumed / plumed2

Development version of plumed 2
https://www.plumed.org
GNU Lesser General Public License v3.0
357 stars 283 forks source link

Implement shape detection in internal WithCmd tool #1072

Open GiovanniBussi opened 4 months ago

GiovanniBussi commented 4 months ago

In #1050 I implemented detection of the shape of arrays in the external wrapper class (Plumed::cmd). This is available for MD codes linking plumed. When using the cmd functions internally (e.g. in driver) it is still necessary to provide explicitly the shape or renounce to shape checking.

I would like to implement the same logic that is now in wrapper/Plumed.h also in core/WithCmd.h. It might be slighlty simpler since we can use c++17 there (and if constexpr).