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
ca4bbc18
Commit
ca4bbc18
authored
Oct 24, 2016
by
Peter Eastman
Browse files
Handle singular matrix in DIIS
parent
5f509089
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
plugins/amoeba/platforms/cuda/src/kernels/multipoleInducedField.cu
...moeba/platforms/cuda/src/kernels/multipoleInducedField.cu
+9
-0
No files found.
plugins/amoeba/platforms/cuda/src/kernels/multipoleInducedField.cu
View file @
ca4bbc18
...
@@ -776,6 +776,15 @@ extern "C" __global__ void solveDIISMatrix(int iteration, const real* __restrict
...
@@ -776,6 +776,15 @@ extern "C" __global__ void solveDIISMatrix(int iteration, const real* __restrict
for
(
int
i
=
j
+
1
;
i
<
rank
;
i
++
)
for
(
int
i
=
j
+
1
;
i
<
rank
;
i
++
)
b
[
i
][
j
]
/=
b
[
j
][
j
];
b
[
i
][
j
]
/=
b
[
j
][
j
];
}
}
for
(
int
i
=
0
;
i
<
rank
;
i
++
)
if
(
b
[
i
][
i
]
==
0
)
{
// The matrix is singular.
for
(
int
j
=
0
;
j
<
rank
-
1
;
j
++
)
coefficients
[
j
]
=
0
;
coefficients
[
rank
-
1
]
=
1
;
return
;
}
// Solve b*Y = X(piv)
// Solve b*Y = X(piv)
...
...
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