mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-24 12:45:56 +01:00
Mdagger solve support
This commit is contained in:
parent
21165ed489
commit
6fe8533414
@ -223,9 +223,14 @@ class SchurOperatorBase : public LinearOperatorBase<Field> {
|
|||||||
Mpc(in,tmp);
|
Mpc(in,tmp);
|
||||||
MpcDag(tmp,out);
|
MpcDag(tmp,out);
|
||||||
}
|
}
|
||||||
|
virtual void MpcMpcDag(const Field &in, Field &out) {
|
||||||
|
Field tmp(in.Grid());
|
||||||
|
tmp.Checkerboard() = in.Checkerboard();
|
||||||
|
MpcDag(in,tmp);
|
||||||
|
Mpc(tmp,out);
|
||||||
|
}
|
||||||
virtual void HermOpAndNorm(const Field &in, Field &out,RealD &n1,RealD &n2){
|
virtual void HermOpAndNorm(const Field &in, Field &out,RealD &n1,RealD &n2){
|
||||||
out.Checkerboard() = in.Checkerboard();
|
HermOp(in,out);
|
||||||
MpcDagMpc(in,out);
|
|
||||||
ComplexD dot= innerProduct(in,out);
|
ComplexD dot= innerProduct(in,out);
|
||||||
n1=real(dot);
|
n1=real(dot);
|
||||||
n2=norm2(out);
|
n2=norm2(out);
|
||||||
@ -276,6 +281,16 @@ template<class Matrix,class Field>
|
|||||||
axpy(out,-1.0,tmp,out);
|
axpy(out,-1.0,tmp,out);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// Mpc MpcDag system presented as the HermOp
|
||||||
|
template<class Matrix,class Field>
|
||||||
|
class SchurDiagMooeeDagOperator : public SchurDiagMooeeOperator<Matrix,Field> {
|
||||||
|
public:
|
||||||
|
virtual void HermOp(const Field &in, Field &out){
|
||||||
|
out.Checkerboard() = in.Checkerboard();
|
||||||
|
this->MpcMpcDag(in,out);
|
||||||
|
}
|
||||||
|
SchurDiagMooeeDagOperator (Matrix &Mat): SchurDiagMooeeOperator<Matrix,Field>(Mat){};
|
||||||
|
};
|
||||||
template<class Matrix,class Field>
|
template<class Matrix,class Field>
|
||||||
class SchurDiagOneOperator : public SchurOperatorBase<Field> {
|
class SchurDiagOneOperator : public SchurOperatorBase<Field> {
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user