"vscode:/vscode.git/clone" did not exist on "960c22afd392b1036ff6b07faa3b17cff7444ce7"
Commit 74940b41 authored by peastman's avatar peastman
Browse files

Fixed an unreliable test case

parent ac92c086
......@@ -219,11 +219,13 @@ Vec3 computeWeightedPosition(const vector<Vec3>& positions, const vector<double>
void testLocalCoordinates(int numSiteParticles) {
vector<int> particles;
vector<double> originWeights, xWeights, yWeights;
Vec3 localPosition(0.4, 0.3, 0.2);
if (numSiteParticles == 2) {
particles = {0, 1};
originWeights = {0.4, 0.6};
xWeights = {-1.0, 1.0};
yWeights = {1.0, -1.0};
localPosition[1] = localPosition[2] = 0.0;
}
else if (numSiteParticles == 3) {
particles = {0, 1, 2};
......@@ -237,7 +239,6 @@ void testLocalCoordinates(int numSiteParticles) {
xWeights = {-1.0, 0.3, 0.3, 0.4};
yWeights = {0.5, 0.5, -0.5, -0.5};
}
const Vec3 localPosition(0.4, 0.3, 0.2);
System system;
for (int i = 0; i < numSiteParticles; i++)
system.addParticle(1.0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment