Skip to content

Commit

Permalink
Update linear algebra function templates.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkneller authored Jul 2, 2024
1 parent 350e30d commit 97b09ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ template <std::size_t N> CVECTOR<double,N> TridiagonalSolve(MVECTOR<double,N> &L
{ CVECTOR<double,N> X, Y0(Y);

try{ // effectively zero all the subdiagonal terms
int i,imax=static_cast<int>(D.N())-2;
int imax=static_cast<int>(D.N())-2;
for(int i=0;i<=imax;i++){ D[i+1]-=L[i]/D[i]*U[i]; Y[i+1]-=L[i]/D[i]*Y[i]; }

// back substitution
Expand Down

0 comments on commit 97b09ce

Please sign in to comment.