Skip to content
Snippets Groups Projects
Commit c010cbfa authored by Gareth Tribello's avatar Gareth Tribello
Browse files

Small fix to plumed_dbg_assert - nngrid not needed for fibonacci grids

parent fd27f122
No related branches found
No related tags found
No related merge requests found
...@@ -360,9 +360,10 @@ std::vector<unsigned> GridVessel::getNbin() const { ...@@ -360,9 +360,10 @@ std::vector<unsigned> GridVessel::getNbin() const {
void GridVessel::getNeighbors( const std::vector<double>& pp, const std::vector<unsigned>& nneigh, void GridVessel::getNeighbors( const std::vector<double>& pp, const std::vector<unsigned>& nneigh,
unsigned& num_neighbors, std::vector<unsigned>& neighbors ) const { unsigned& num_neighbors, std::vector<unsigned>& neighbors ) const {
plumed_dbg_assert( bounds_set && nneigh.size()==dimension ); plumed_dbg_assert( bounds_set );
if( gtype == flat ) { if( gtype == flat ) {
plumed_dbg_assert( nneigh.size()==dimension );
std::vector<unsigned> indices( dimension ); std::vector<unsigned> indices( dimension );
for(unsigned i=0; i<dimension; ++i) indices[i] = std::floor( (pp[i]-min[i])/dx[i] ); for(unsigned i=0; i<dimension; ++i) indices[i] = std::floor( (pp[i]-min[i])/dx[i] );
getNeighbors( indices, nneigh, num_neighbors, neighbors ); getNeighbors( indices, nneigh, num_neighbors, neighbors );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment