Commit 12046dc5 authored by peastman's avatar peastman
Browse files

Fixed bug in CustomIntegrator

parent 1e5b258c
......@@ -7082,8 +7082,10 @@ void CudaIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context,
for (int step = numSteps-1; step >= 0; step--) {
if (stepType[step] == CustomIntegrator::ConstrainPositions)
beforeConstrain = true;
else if (stepType[step] == CustomIntegrator::ComputePerDof && variable[step] == "x" && beforeConstrain)
else if (stepType[step] == CustomIntegrator::ComputePerDof && variable[step] == "x" && beforeConstrain) {
storePosAsDelta[step] = true;
beforeConstrain = false;
}
}
bool storedAsDelta = false;
for (int step = 0; step < numSteps; step++) {
......
......@@ -7371,8 +7371,10 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context
for (int step = numSteps-1; step >= 0; step--) {
if (stepType[step] == CustomIntegrator::ConstrainPositions)
beforeConstrain = true;
else if (stepType[step] == CustomIntegrator::ComputePerDof && variable[step] == "x" && beforeConstrain)
else if (stepType[step] == CustomIntegrator::ComputePerDof && variable[step] == "x" && beforeConstrain) {
storePosAsDelta[step] = true;
beforeConstrain = false;
}
}
bool storedAsDelta = false;
for (int step = 0; step < numSteps; step++) {
......
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