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
1775e497
"platforms/opencl/tests/TestOpenCLCustomCompoundBondForce.cpp" did not exist on "0e879806cdd38e58b04481ecf7fcd93c44c7dc27"
Commit
1775e497
authored
May 04, 2009
by
Michael Sherman
Browse files
Eliminated some Windows build warnings.
parent
5610057f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
platforms/cuda/tests/TestCudaNonbondedForce.cpp
platforms/cuda/tests/TestCudaNonbondedForce.cpp
+13
-13
platforms/reference/src/SimTKReference/ReferenceRigidShakeAlgorithm.cpp
...rence/src/SimTKReference/ReferenceRigidShakeAlgorithm.cpp
+8
-8
No files found.
platforms/cuda/tests/TestCudaNonbondedForce.cpp
View file @
1775e497
...
...
@@ -479,9 +479,9 @@ void testBlockInteractions(bool periodic) {
float
dy
=
pos
.
y
-
center
.
y
;
float
dz
=
pos
.
z
-
center
.
z
;
if
(
periodic
)
{
dx
-=
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
;
dy
-=
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
;
dz
-=
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
;
dx
-=
(
float
)(
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
)
;
dy
-=
(
float
)(
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
)
;
dz
-=
(
float
)(
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
)
;
}
ASSERT
(
abs
(
dx
)
<
gridSize
.
x
+
TOL
);
ASSERT
(
abs
(
dy
)
<
gridSize
.
y
+
TOL
);
...
...
@@ -528,9 +528,9 @@ void testBlockInteractions(bool periodic) {
float
dy
=
center1
.
y
-
center2
.
y
;
float
dz
=
center1
.
z
-
center2
.
z
;
if
(
periodic
)
{
dx
-=
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
;
dy
-=
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
;
dz
-=
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
;
dx
-=
(
float
)(
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
)
;
dy
-=
(
float
)(
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
)
;
dz
-=
(
float
)(
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
)
;
}
dx
=
max
(
0.0
f
,
abs
(
dx
)
-
gridSize1
.
x
-
gridSize2
.
x
);
dy
=
max
(
0.0
f
,
abs
(
dy
)
-
gridSize1
.
y
-
gridSize2
.
y
);
...
...
@@ -549,9 +549,9 @@ void testBlockInteractions(bool periodic) {
float
dy
=
pos2
.
y
-
pos1
.
y
;
float
dz
=
pos2
.
z
-
pos1
.
z
;
if
(
periodic
)
{
dx
-=
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
;
dy
-=
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
;
dz
-=
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
;
dx
-=
(
float
)(
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
)
;
dy
-=
(
float
)(
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
)
;
dz
-=
(
float
)(
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
)
;
}
if
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
<
cutoff
*
cutoff
)
{
dx
=
pos2
.
x
-
center1
.
x
;
...
...
@@ -571,7 +571,7 @@ void testBlockInteractions(bool periodic) {
// Check the tiles that did not have interactions to make sure all atoms are beyond the cutoff.
data
.
gpu
->
psWorkUnit
->
Download
();
for
(
int
i
=
0
;
i
<
hasInteractions
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
hasInteractions
.
size
();
i
++
)
if
(
!
hasInteractions
[
i
])
{
unsigned
int
workUnit
=
(
*
data
.
gpu
->
psWorkUnit
)[
i
];
unsigned
int
x
=
(
workUnit
>>
17
);
...
...
@@ -584,9 +584,9 @@ void testBlockInteractions(bool periodic) {
float
dy
=
pos1
.
y
-
pos2
.
y
;
float
dz
=
pos1
.
z
-
pos2
.
z
;
if
(
periodic
)
{
dx
-=
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
;
dy
-=
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
;
dz
-=
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
;
dx
-=
(
float
)(
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
)
;
dy
-=
(
float
)(
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
)
;
dz
-=
(
float
)(
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
)
;
}
ASSERT
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
>
cutoff
*
cutoff
);
}
...
...
platforms/reference/src/SimTKReference/ReferenceRigidShakeAlgorithm.cpp
View file @
1775e497
...
...
@@ -183,7 +183,7 @@ ReferenceRigidShakeAlgorithm::~ReferenceRigidShakeAlgorithm( ){
SimTKOpenMMUtilities
::
freeOneDRealOpenMMArray
(
_distanceTolerance
,
"distanceTolerance"
);
SimTKOpenMMUtilities
::
freeOneDRealOpenMMArray
(
_reducedMasses
,
"reducedMasses"
);
}
for
(
int
i
=
0
;
i
<
_matrices
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
_matrices
.
size
();
i
++
)
SimTKOpenMMUtilities
::
freeTwoDRealOpenMMArray
(
_matrices
[
i
],
""
);
}
...
...
@@ -346,13 +346,13 @@ int ReferenceRigidShakeAlgorithm::apply( int numberOfAtoms, RealOpenMM** atomCoo
reducedMasses
[
ii
]
=
half
/
(
inverseMasses
[
atomI
]
+
inverseMasses
[
atomJ
]
);
}
vector
<
double
>
temp
;
for
(
int
i
=
0
;
i
<
_rigidClusters
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
(
int
)
_rigidClusters
.
size
();
i
++
)
{
// Compute the constraint coupling matrix for this cluster.
const
vector
<
int
>&
cluster
=
_rigidClusters
[
i
];
int
size
=
cluster
.
size
();
vector
<
Vec3
>
r
(
size
);
for
(
int
j
=
0
;
j
<
cluster
.
size
();
j
++
)
{
for
(
int
j
=
0
;
j
<
(
int
)
cluster
.
size
();
j
++
)
{
int
atom1
=
_atomIndices
[
cluster
[
j
]][
0
];
int
atom2
=
_atomIndices
[
cluster
[
j
]][
1
];
r
[
j
]
=
Vec3
(
atomCoordinates
[
atom1
][
0
]
-
atomCoordinates
[
atom2
][
0
],
...
...
@@ -397,7 +397,7 @@ int ReferenceRigidShakeAlgorithm::apply( int numberOfAtoms, RealOpenMM** atomCoo
double
singularValueCutoff
=
0.01
*
w
[
0
];
for
(
int
j
=
0
;
j
<
size
;
j
++
)
w
[
j
]
=
(
w
[
j
]
<
singularValueCutoff
?
0.0
:
1.0
/
w
[
j
]);
if
(
temp
.
size
()
<
size
)
if
(
(
int
)
temp
.
size
()
<
size
)
temp
.
resize
(
size
);
for
(
int
j
=
0
;
j
<
size
;
j
++
)
{
for
(
int
k
=
0
;
k
<
size
;
k
++
)
{
...
...
@@ -411,7 +411,7 @@ int ReferenceRigidShakeAlgorithm::apply( int numberOfAtoms, RealOpenMM** atomCoo
for
(
int
j
=
0
;
j
<
size
;
j
++
)
for
(
int
k
=
0
;
k
<
size
;
k
++
)
_matrices
[
i
][
j
][
k
]
=
matrix
[
j
][
k
];
_matrices
[
i
][
j
][
k
]
=
(
RealOpenMM
)
matrix
[
j
][
k
];
}
}
...
...
@@ -458,7 +458,7 @@ int ReferenceRigidShakeAlgorithm::apply( int numberOfAtoms, RealOpenMM** atomCoo
RealOpenMM
diff
=
dist2
-
rp2
;
constraintForce
[
ii
]
=
zero
;
RealOpenMM
rrpr
=
DOT3
(
rp_ij
,
r_ij
[
ii
]
);
RealOpenMM
acor
;
if
(
rrpr
<
d_ij2
[
ii
]
*
epsilon6
){
std
::
stringstream
message
;
message
<<
iterations
<<
" "
<<
atomI
<<
" "
<<
atomJ
<<
" Error: sign of rrpr < 0?
\n
"
;
...
...
@@ -473,11 +473,11 @@ int ReferenceRigidShakeAlgorithm::apply( int numberOfAtoms, RealOpenMM** atomCoo
if
(
numberConverged
==
_numberOfConstraints
){
done
=
true
;
}
for
(
int
i
=
0
;
i
<
_rigidClusters
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
(
int
)
_rigidClusters
.
size
();
i
++
)
{
const
vector
<
int
>&
cluster
=
_rigidClusters
[
i
];
RealOpenMM
**
matrix
=
_matrices
[
i
];
int
size
=
cluster
.
size
();
if
(
size
>
tempForce
.
size
())
if
(
size
>
(
int
)
tempForce
.
size
())
tempForce
.
resize
(
size
);
for
(
int
j
=
0
;
j
<
size
;
j
++
)
{
tempForce
[
j
]
=
zero
;
...
...
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