File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -117,18 +117,13 @@ def factor(rhs):
117
117
return factor
118
118
119
119
120
- def _get_fact_diagonal (mat ):
120
+ def _get_fact_diagonal ():
121
121
"""
122
122
Dummy factorization with a diagonal matrix.
123
123
"""
124
124
125
- # get the inverse of the diagonal
126
- inv = IMPORTLIB .diags (1 / mat .diagonal (), format = "csc" )
127
-
128
- # apply the diagonal inverse
129
125
def factor (rhs ):
130
- sol = inv * rhs
131
- return sol
126
+ return rhs
132
127
133
128
return factor
134
129
@@ -167,7 +162,7 @@ def factor_dummy(rhs):
167
162
elif LIBRARY == "PyAMG" :
168
163
factor = _get_fact_pyamg (mat )
169
164
elif LIBRARY == "Diagonal" :
170
- factor = _get_fact_diagonal (mat )
165
+ factor = _get_fact_diagonal ()
171
166
else :
172
167
raise ValueError ("invalid matrix factorization library" )
173
168
You can’t perform that action at this time.
0 commit comments