We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f209b4f commit 6ba9779Copy full SHA for 6ba9779
source/lib/include/SimulationRegion_Impl.h
@@ -500,6 +500,9 @@ computeVolume()
500
boxt[0*3+1] * (boxt[1*3+0]*boxt[2*3+2] - boxt[2*3+0]*boxt[1*3+2]) +
501
boxt[0*3+2] * (boxt[1*3+0]*boxt[2*3+1] - boxt[2*3+0]*boxt[1*3+1]);
502
volumei = static_cast<double>(1.)/volume;
503
+ if (volume < 0) {
504
+ throw std::runtime_error("Negative volume detected. Please make sure the simulation cell obeys the right-hand rule.");
505
+ }
506
}
507
508
template<typename VALUETYPE>
0 commit comments