Skip to content
Snippets Groups Projects
Commit d90f4e46 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

use determinant

parent 2cb5c143
No related branches found
No related tags found
1 merge request!867Replace Eigen by classes Spinor, SpinMatrix of our own
......@@ -57,7 +57,7 @@ public:
complex_t operator()(int, int) const;
complex_t trace() const;
complex_t determinant() const; // TODO use
complex_t determinant() const;
bool allFinite() const;
......
......@@ -82,7 +82,7 @@ void calculateUpwards(std::vector<MatrixFlux>& coeff, const SliceStack& slices,
// compute the rotation matrix
SpinMatrix Si = mp + mm * coeff[i].m_R;
SpinMatrix S = MakeSpinMatrix(Si(1, 1), -Si(0, 1), -Si(1, 0), Si(0, 0));
const complex_t norm = S(0, 0) * S(1, 1) - S(0, 1) * S(1, 0);
const complex_t norm = S.determinant();
S = S * delta;
// store the rotation matrix and normalization constant in order to rotate
......@@ -231,7 +231,7 @@ SpinMatrix Compute::SpecularMagnetic::topLayerR(const SliceStack& slices,
// compute the rotation matrix
SpinMatrix Si = mp + mm * c_i1.m_R;
SpinMatrix S = MakeSpinMatrix(Si(1, 1), -Si(0, 1), -Si(1, 0), Si(0, 0));
const complex_t norm = S(0, 0) * S(1, 1) - S(0, 1) * S(1, 0);
const complex_t norm = S.determinant();
S = S * delta;
S /= norm;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment