diff --git a/src/multicolvar/MultiColvar.h b/src/multicolvar/MultiColvar.h index 7f2e944499d938a0ea1c9a5525a412e796bb1cd9..a76f3b61039731f464491096e4f3abf9322b631c 100644 --- a/src/multicolvar/MultiColvar.h +++ b/src/multicolvar/MultiColvar.h @@ -180,7 +180,6 @@ public: inline unsigned MultiColvar::getFirstDerivativeToMerge(){ imerge_deriv=0; imerge_natoms=atoms_with_derivatives.getNumberActive(); - plumed_dbg_assert( colvar_atoms[current].isActive( atoms_with_derivatives[imerge_deriv] ) ); return 3*getAtomIndex( atoms_with_derivatives[imerge_deriv] ); } @@ -189,7 +188,6 @@ unsigned MultiColvar::getNextDerivativeToMerge( const unsigned& j){ imerge_deriv++; if( imerge_deriv>=3*imerge_natoms ) return 3*getNumberOfAtoms() - 3*imerge_natoms + imerge_deriv; unsigned imerge_atom=std::floor( imerge_deriv / 3 ); - plumed_dbg_assert( colvar_atoms[current].isActive( atoms_with_derivatives[imerge_atom] ) ); return 3*getAtomIndex( imerge_atom ) + imerge_deriv%3; } diff --git a/src/tools/DynamicList.h b/src/tools/DynamicList.h index a31ddc406ca5f8e47e37c62410d52d24bb16f295..bc4626f588dde68c9e72b37b7d985f5d52d6e12a 100644 --- a/src/tools/DynamicList.h +++ b/src/tools/DynamicList.h @@ -163,6 +163,8 @@ public: unsigned fullSize() const; /// Return the number of elements that are currently active unsigned getNumberActive() const; +/// Find out if a member is active + bool isActive(const unsigned& ) const; /// Add something to the active list void addIndexToList( const T & ii ); /// Make a particular element inactive @@ -194,6 +196,11 @@ void DynamicList<T>::clear() { onoff.resize(0); active.resize(0); } +template <typename T> +bool DynamicList<T>::isActive( const unsigned& i ) const { + return (onoff[i]>0); +} + template <typename T> unsigned DynamicList<T>::fullSize() const { return all.size(); diff --git a/src/vesselbase/ActionWithVessel.h b/src/vesselbase/ActionWithVessel.h index 662a21d91dbbe667ec0e56b3adecdca6177e61d5..0cc19c55b15bf4049e322a46e157a5208656427e 100644 --- a/src/vesselbase/ActionWithVessel.h +++ b/src/vesselbase/ActionWithVessel.h @@ -207,10 +207,6 @@ void ActionWithVessel::addElementDerivative( const unsigned& ider, const double& inline void ActionWithVessel::setElementDerivative( const unsigned& ider, const double& der ){ -#ifndef NDEBUG - unsigned ndertmp=getNumberOfDerivatives(); - if( ider>=ndertmp && ider<2*ndertmp ) plumed_dbg_massert( weightHasDerivatives, "In " + getLabel() ); -#endif plumed_dbg_assert( ider<derivatives.size() ); derivatives[ider] = der; }