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

A further little trick to optimize multicolvars

parent b9ae04dd
No related branches found
No related tags found
No related merge requests found
...@@ -168,11 +168,11 @@ void ActionWithVessel::calculateAllVessels( const int& stepn ){ ...@@ -168,11 +168,11 @@ void ActionWithVessel::calculateAllVessels( const int& stepn ){
// quantity is contributing more than the tolerance // quantity is contributing more than the tolerance
if( functions[j]->calculate(kk,tolerance) ) keep=true; if( functions[j]->calculate(kk,tolerance) ) keep=true;
} }
// Clear the derivatives from this step
for(unsigned j=0;j<getNumberOfDerivatives(kk);++j) derivatives[j]=0.0;
// If the contribution of this quantity is very small at neighbour list time ignore it // If the contribution of this quantity is very small at neighbour list time ignore it
// untill next neighbour list time // untill next neighbour list time
if( reduceAtNextStep && !keep ) deactivate(kk); if( reduceAtNextStep && !keep ) deactivate(kk);
// Clear the derivatives from this step
for(unsigned j=0;j<getNumberOfDerivatives(kk);++j) derivatives[j]=0.0;
} }
// Update the dynamic list // Update the dynamic list
if(reduceAtNextStep){ members.mpi_gatherActiveMembers( comm ); } if(reduceAtNextStep){ members.mpi_gatherActiveMembers( comm ); }
......
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