Skip to content

Commit

Permalink
det fix
Browse files Browse the repository at this point in the history
  • Loading branch information
smartalecH committed Jun 26, 2019
1 parent e28c961 commit 8590db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void matrix_invert(std::complex<double> (&Vinv)[9], std::complex<double> (&V)[9]
V[0 + 3*1] * (V[0 + 3*1]*V[2 + 3*2] - V[1 + 3*2]*V[0 + 3*2]) +
V[0 + 3*2] * (V[0 + 3*1]*V[1 + 3*2] - V[1 + 3*1]*V[0 + 3*2]));

if (det.real() == 0 && det.imag() == 0) abort("meep: Matrix is singular, aborting.\n");
if (det == 0.0) abort("meep: Matrix is singular, aborting.\n");

Vinv[0 + 3*0] = 1.0/det * (V[1 + 3*1]*V[2 + 3*2] - V[1 + 3*2]*V[2 + 3*1]);
Vinv[0 + 3*1] = 1.0/det * (V[0 + 3*2]*V[2 + 3*1] - V[0 + 3*1]*V[2 + 3*2]);
Expand Down

0 comments on commit 8590db1

Please sign in to comment.