Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
228083e3
Commit
228083e3
authored
Dec 20, 2016
by
peastman
Committed by
GitHub
Dec 20, 2016
Browse files
Merge pull request #1694 from peastman/storeposasdelta
Fixed bug in CustomIntegrator
parents
1e5b258c
12046dc5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+3
-1
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+3
-1
No files found.
platforms/cuda/src/CudaKernels.cpp
View file @
228083e3
...
@@ -7082,8 +7082,10 @@ void CudaIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context,
...
@@ -7082,8 +7082,10 @@ void CudaIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context,
for (int step = numSteps-1; step >= 0; step--) {
for (int step = numSteps-1; step >= 0; step--) {
if (stepType[step] == CustomIntegrator::ConstrainPositions)
if (stepType[step] == CustomIntegrator::ConstrainPositions)
beforeConstrain = true;
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;
storePosAsDelta[step] = true;
beforeConstrain = false;
}
}
}
bool storedAsDelta = false;
bool storedAsDelta = false;
for (int step = 0; step < numSteps; step++) {
for (int step = 0; step < numSteps; step++) {
...
...
platforms/opencl/src/OpenCLKernels.cpp
View file @
228083e3
...
@@ -7371,8 +7371,10 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context
...
@@ -7371,8 +7371,10 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context
for (int step = numSteps-1; step >= 0; step--) {
for (int step = numSteps-1; step >= 0; step--) {
if (stepType[step] == CustomIntegrator::ConstrainPositions)
if (stepType[step] == CustomIntegrator::ConstrainPositions)
beforeConstrain = true;
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;
storePosAsDelta[step] = true;
beforeConstrain = false;
}
}
}
bool storedAsDelta = false;
bool storedAsDelta = false;
for (int step = 0; step < numSteps; step++) {
for (int step = 0; step < numSteps; step++) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment