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
4ef9536e
Commit
4ef9536e
authored
May 12, 2009
by
Michael Sherman
Browse files
Eliminate some VC++ unsigned/signed warnings.
parent
852bfaea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
platforms/reference/src/SimTKReference/ReferenceRigidShakeAlgorithm.cpp
...rence/src/SimTKReference/ReferenceRigidShakeAlgorithm.cpp
+11
-11
No files found.
platforms/reference/src/SimTKReference/ReferenceRigidShakeAlgorithm.cpp
View file @
4ef9536e
...
...
@@ -364,8 +364,8 @@ int ReferenceRigidShakeAlgorithm::apply( int numberOfAtoms, RealOpenMM** atomCoo
r
[
j
][
2
]
*=
invLength
;
}
Array2D
<
double
>
matrix
(
size
,
size
);
for
(
int
j
=
0
;
j
<
size
;
j
++
)
{
for
(
int
k
=
0
;
k
<
size
;
k
++
)
{
for
(
int
j
=
0
;
j
<
(
int
)
size
;
j
++
)
{
for
(
int
k
=
0
;
k
<
(
int
)
size
;
k
++
)
{
double
dot
;
int
atomj0
=
_atomIndices
[
cluster
[
j
]][
0
];
int
atomj1
=
_atomIndices
[
cluster
[
j
]][
1
];
...
...
@@ -395,22 +395,22 @@ int ReferenceRigidShakeAlgorithm::apply( int numberOfAtoms, RealOpenMM** atomCoo
svd
.
getV
(
v
);
svd
.
getSingularValues
(
w
);
double
singularValueCutoff
=
0.01
*
w
[
0
];
for
(
int
j
=
0
;
j
<
size
;
j
++
)
for
(
int
j
=
0
;
j
<
(
int
)
size
;
j
++
)
w
[
j
]
=
(
w
[
j
]
<
singularValueCutoff
?
0.0
:
1.0
/
w
[
j
]);
if
(
temp
.
size
()
<
size
)
temp
.
resize
(
size
);
for
(
int
j
=
0
;
j
<
size
;
j
++
)
{
for
(
int
k
=
0
;
k
<
size
;
k
++
)
{
for
(
int
j
=
0
;
j
<
(
int
)
size
;
j
++
)
{
for
(
int
k
=
0
;
k
<
(
int
)
size
;
k
++
)
{
matrix
[
j
][
k
]
=
0.0
;
for
(
int
m
=
0
;
m
<
size
;
m
++
)
for
(
int
m
=
0
;
m
<
(
int
)
size
;
m
++
)
matrix
[
j
][
k
]
+=
v
[
j
][
m
]
*
w
[
m
]
*
u
[
k
][
m
];
}
}
// Record the inverted matrix.
for
(
int
j
=
0
;
j
<
size
;
j
++
)
for
(
int
k
=
0
;
k
<
size
;
k
++
)
for
(
int
j
=
0
;
j
<
(
int
)
size
;
j
++
)
for
(
int
k
=
0
;
k
<
(
int
)
size
;
k
++
)
_matrices
[
i
][
j
][
k
]
=
(
RealOpenMM
)
matrix
[
j
][
k
];
}
}
...
...
@@ -478,12 +478,12 @@ int ReferenceRigidShakeAlgorithm::apply( int numberOfAtoms, RealOpenMM** atomCoo
unsigned
int
size
=
cluster
.
size
();
if
(
size
>
tempForce
.
size
())
tempForce
.
resize
(
size
);
for
(
int
j
=
0
;
j
<
size
;
j
++
)
{
for
(
int
j
=
0
;
j
<
(
int
)
size
;
j
++
)
{
tempForce
[
j
]
=
zero
;
for
(
int
k
=
0
;
k
<
size
;
k
++
)
for
(
int
k
=
0
;
k
<
(
int
)
size
;
k
++
)
tempForce
[
j
]
+=
matrix
[
j
][
k
]
*
constraintForce
[
cluster
[
k
]]
*
_distance
[
cluster
[
k
]]
/
_distance
[
cluster
[
j
]];
}
for
(
int
j
=
0
;
j
<
size
;
j
++
)
for
(
int
j
=
0
;
j
<
(
int
)
size
;
j
++
)
constraintForce
[
cluster
[
j
]]
=
tempForce
[
j
];
}
...
...
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