2015-06-08 12:04:59 +01:00
|
|
|
#ifndef GRID_ALGORITHM_COARSENED_MATRIX_H
|
|
|
|
#define GRID_ALGORITHM_COARSENED_MATRIX_H
|
|
|
|
|
|
|
|
#include <Grid.h>
|
|
|
|
|
|
|
|
namespace Grid {
|
|
|
|
|
|
|
|
class Geometry {
|
2015-06-09 10:26:19 +01:00
|
|
|
// int dimension;
|
2015-06-08 12:04:59 +01:00
|
|
|
public:
|
|
|
|
int npoint;
|
|
|
|
std::vector<int> directions ;
|
|
|
|
std::vector<int> displacements;
|
|
|
|
|
2015-06-09 10:26:19 +01:00
|
|
|
Geometry(int _d) {
|
|
|
|
|
|
|
|
int base = (_d==5) ? 1:0;
|
|
|
|
|
|
|
|
// make coarse grid stencil for 4d , not 5d
|
|
|
|
if ( _d==5 ) _d=4;
|
|
|
|
|
|
|
|
npoint = 2*_d+1;
|
|
|
|
directions.resize(npoint);
|
|
|
|
displacements.resize(npoint);
|
|
|
|
for(int d=0;d<_d;d++){
|
|
|
|
directions[2*d ] = d+base;
|
|
|
|
directions[2*d+1] = d+base;
|
|
|
|
displacements[2*d ] = +1;
|
|
|
|
displacements[2*d+1] = -1;
|
|
|
|
}
|
|
|
|
directions [2*_d]=0;
|
|
|
|
displacements[2*_d]=0;
|
2015-06-09 22:37:21 +01:00
|
|
|
|
|
|
|
//// report back
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<<"directions :";
|
2015-06-09 22:37:21 +01:00
|
|
|
for(int d=0;d<npoint;d++) std::cout<< directions[d]<< " ";
|
|
|
|
std::cout <<std::endl;
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<<"displacements :";
|
2015-06-09 22:37:21 +01:00
|
|
|
for(int d=0;d<npoint;d++) std::cout<< displacements[d]<< " ";
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<std::endl;
|
2015-06-09 10:26:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
// Original cleaner code
|
2015-06-08 12:04:59 +01:00
|
|
|
Geometry(int _d) : dimension(_d), npoint(2*_d+1), directions(npoint), displacements(npoint) {
|
|
|
|
for(int d=0;d<dimension;d++){
|
|
|
|
directions[2*d ] = d;
|
|
|
|
directions[2*d+1] = d;
|
|
|
|
displacements[2*d ] = +1;
|
|
|
|
displacements[2*d+1] = -1;
|
|
|
|
}
|
|
|
|
directions [2*dimension]=0;
|
|
|
|
displacements[2*dimension]=0;
|
|
|
|
}
|
|
|
|
std::vector<int> GetDelta(int point) {
|
|
|
|
std::vector<int> delta(dimension,0);
|
|
|
|
delta[directions[point]] = displacements[point];
|
|
|
|
return delta;
|
|
|
|
};
|
2015-06-09 10:26:19 +01:00
|
|
|
*/
|
2015-06-08 12:04:59 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-06-20 22:22:56 +01:00
|
|
|
template<class Fobj,class CComplex,int nbasis>
|
|
|
|
class Aggregation {
|
|
|
|
public:
|
|
|
|
typedef iVector<CComplex,nbasis > siteVector;
|
|
|
|
typedef Lattice<siteVector> CoarseVector;
|
|
|
|
typedef Lattice<iMatrix<CComplex,nbasis > > CoarseMatrix;
|
|
|
|
|
|
|
|
typedef Lattice< CComplex > CoarseScalar; // used for inner products on fine field
|
|
|
|
typedef Lattice<Fobj > FineField;
|
|
|
|
|
|
|
|
GridBase *CoarseGrid;
|
|
|
|
GridBase *FineGrid;
|
|
|
|
std::vector<Lattice<Fobj> > subspace;
|
|
|
|
|
|
|
|
Aggregation(GridBase *_CoarseGrid,GridBase *_FineGrid) :
|
|
|
|
CoarseGrid(_CoarseGrid),
|
|
|
|
FineGrid(_FineGrid),
|
|
|
|
subspace(nbasis,_FineGrid)
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
void Orthogonalise(void){
|
|
|
|
CoarseScalar InnerProd(CoarseGrid);
|
|
|
|
blockOrthogonalise(InnerProd,subspace);
|
|
|
|
}
|
|
|
|
void CheckOrthogonal(void){
|
|
|
|
CoarseVector iProj(CoarseGrid);
|
|
|
|
CoarseVector eProj(CoarseGrid);
|
|
|
|
Lattice<CComplex> pokey(CoarseGrid);
|
|
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<nbasis;i++){
|
|
|
|
blockProject(iProj,subspace[i],subspace);
|
|
|
|
|
|
|
|
eProj=zero;
|
|
|
|
for(int ss=0;ss<CoarseGrid->oSites();ss++){
|
|
|
|
eProj._odata[ss](i)=CComplex(1.0);
|
|
|
|
}
|
|
|
|
eProj=eProj - iProj;
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<<"Orthog check error "<<i<<" " << norm2(eProj)<<std::endl;
|
2015-06-20 22:22:56 +01:00
|
|
|
}
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage <<"CheckOrthog done"<<std::endl;
|
2015-06-20 22:22:56 +01:00
|
|
|
}
|
|
|
|
void ProjectToSubspace(CoarseVector &CoarseVec,const FineField &FineVec){
|
|
|
|
blockProject(CoarseVec,FineVec,subspace);
|
|
|
|
}
|
|
|
|
void PromoteFromSubspace(const CoarseVector &CoarseVec,FineField &FineVec){
|
|
|
|
blockPromote(CoarseVec,FineVec,subspace);
|
|
|
|
}
|
|
|
|
void CreateSubspaceRandom(GridParallelRNG &RNG){
|
|
|
|
for(int i=0;i<nbasis;i++){
|
|
|
|
random(RNG,subspace[i]);
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<<" norm subspace["<<i<<"] "<<norm2(subspace[i])<<std::endl;
|
2015-06-20 22:22:56 +01:00
|
|
|
}
|
|
|
|
Orthogonalise();
|
|
|
|
}
|
2015-07-21 04:13:03 +01:00
|
|
|
virtual void CreateSubspace(GridParallelRNG &RNG,LinearOperatorBase<FineField> &hermop,int nn=nbasis) {
|
2015-06-20 22:22:56 +01:00
|
|
|
|
|
|
|
RealD scale;
|
|
|
|
|
2015-07-23 17:31:13 +01:00
|
|
|
ConjugateGradient<FineField> CG(1.0e-2,10000);
|
2015-06-20 22:22:56 +01:00
|
|
|
FineField noise(FineGrid);
|
|
|
|
FineField Mn(FineGrid);
|
|
|
|
|
2015-07-21 04:13:03 +01:00
|
|
|
for(int b=0;b<nn;b++){
|
2015-06-20 22:22:56 +01:00
|
|
|
|
|
|
|
gaussian(RNG,noise);
|
|
|
|
scale = std::pow(norm2(noise),-0.5);
|
|
|
|
noise=noise*scale;
|
|
|
|
|
2015-07-23 17:31:13 +01:00
|
|
|
hermop.Op(noise,Mn); std::cout<<GridLogMessage << "noise ["<<b<<"] <n|MdagM|n> "<<norm2(Mn)<<std::endl;
|
2015-06-30 15:17:27 +01:00
|
|
|
|
2015-07-21 04:13:03 +01:00
|
|
|
for(int i=0;i<1;i++){
|
2015-06-20 22:22:56 +01:00
|
|
|
|
|
|
|
CG(hermop,noise,subspace[b]);
|
|
|
|
|
|
|
|
noise = subspace[b];
|
|
|
|
scale = std::pow(norm2(noise),-0.5);
|
|
|
|
noise=noise*scale;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-07-23 17:31:13 +01:00
|
|
|
hermop.Op(noise,Mn); std::cout<<GridLogMessage << "filtered["<<b<<"] <f|MdagM|f> "<<norm2(Mn)<<std::endl;
|
2015-07-21 04:13:03 +01:00
|
|
|
subspace[b] = noise;
|
|
|
|
|
2015-06-20 22:22:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Orthogonalise();
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
2015-06-08 12:04:59 +01:00
|
|
|
// Fine Object == (per site) type of fine field
|
|
|
|
// nbasis == number of deflation vectors
|
|
|
|
template<class Fobj,class CComplex,int nbasis>
|
2015-06-09 22:37:21 +01:00
|
|
|
class CoarsenedMatrix : public SparseMatrixBase<Lattice<iVector<CComplex,nbasis > > > {
|
2015-06-08 12:04:59 +01:00
|
|
|
public:
|
|
|
|
|
2015-06-09 22:37:21 +01:00
|
|
|
typedef iVector<CComplex,nbasis > siteVector;
|
|
|
|
typedef Lattice<siteVector> CoarseVector;
|
|
|
|
typedef Lattice<iMatrix<CComplex,nbasis > > CoarseMatrix;
|
2015-06-08 12:04:59 +01:00
|
|
|
|
|
|
|
typedef Lattice< CComplex > CoarseScalar; // used for inner products on fine field
|
|
|
|
typedef Lattice<Fobj > FineField;
|
|
|
|
|
|
|
|
////////////////////
|
|
|
|
// Data members
|
|
|
|
////////////////////
|
|
|
|
Geometry geom;
|
|
|
|
GridBase * _grid;
|
|
|
|
CartesianStencil Stencil;
|
2015-06-09 10:26:19 +01:00
|
|
|
|
2015-06-08 12:04:59 +01:00
|
|
|
std::vector<CoarseMatrix> A;
|
2015-06-09 10:26:19 +01:00
|
|
|
|
2015-06-08 12:04:59 +01:00
|
|
|
std::vector<siteVector,alignedAllocator<siteVector> > comm_buf;
|
|
|
|
|
|
|
|
///////////////////////
|
|
|
|
// Interface
|
|
|
|
///////////////////////
|
|
|
|
GridBase * Grid(void) { return _grid; }; // this is all the linalg routines need to know
|
|
|
|
|
2015-06-09 22:37:21 +01:00
|
|
|
RealD M (const CoarseVector &in, CoarseVector &out){
|
|
|
|
|
|
|
|
conformable(_grid,in._grid);
|
|
|
|
conformable(in._grid,out._grid);
|
|
|
|
|
2015-06-08 12:04:59 +01:00
|
|
|
SimpleCompressor<siteVector> compressor;
|
|
|
|
Stencil.HaloExchange(in,comm_buf,compressor);
|
|
|
|
|
2015-07-23 17:31:13 +01:00
|
|
|
PARALLEL_FOR_LOOP
|
2015-06-08 12:04:59 +01:00
|
|
|
for(int ss=0;ss<Grid()->oSites();ss++){
|
|
|
|
siteVector res = zero;
|
|
|
|
siteVector nbr;
|
2015-08-14 00:01:04 +01:00
|
|
|
int ptype;
|
|
|
|
StencilEntry *SE;
|
2015-06-08 12:04:59 +01:00
|
|
|
for(int point=0;point<geom.npoint;point++){
|
2015-08-14 00:01:04 +01:00
|
|
|
|
|
|
|
SE=Stencil.GetEntry(ptype,point,ss);
|
2015-06-08 12:04:59 +01:00
|
|
|
|
2015-08-14 00:01:04 +01:00
|
|
|
if(SE->_is_local&&SE->_permute) {
|
|
|
|
permute(nbr,in._odata[SE->_offset],ptype);
|
|
|
|
} else if(SE->_is_local) {
|
|
|
|
nbr = in._odata[SE->_offset];
|
2015-06-08 12:04:59 +01:00
|
|
|
} else {
|
2015-08-14 00:01:04 +01:00
|
|
|
nbr = comm_buf[SE->_offset];
|
2015-06-08 12:04:59 +01:00
|
|
|
}
|
|
|
|
res = res + A[point]._odata[ss]*nbr;
|
|
|
|
}
|
|
|
|
vstream(out._odata[ss],res);
|
|
|
|
}
|
|
|
|
return norm2(out);
|
|
|
|
};
|
|
|
|
|
|
|
|
RealD Mdag (const CoarseVector &in, CoarseVector &out){
|
|
|
|
return M(in,out);
|
|
|
|
};
|
2015-06-09 22:37:21 +01:00
|
|
|
|
2015-06-08 12:04:59 +01:00
|
|
|
// Defer support for further coarsening for now
|
|
|
|
void Mdiag (const CoarseVector &in, CoarseVector &out){};
|
|
|
|
void Mdir (const CoarseVector &in, CoarseVector &out,int dir, int disp){};
|
|
|
|
|
|
|
|
CoarsenedMatrix(GridCartesian &CoarseGrid) :
|
|
|
|
|
|
|
|
_grid(&CoarseGrid),
|
|
|
|
geom(CoarseGrid._ndimension),
|
|
|
|
Stencil(&CoarseGrid,geom.npoint,Even,geom.directions,geom.displacements),
|
2015-06-09 22:37:21 +01:00
|
|
|
A(geom.npoint,&CoarseGrid)
|
2015-06-08 12:04:59 +01:00
|
|
|
{
|
|
|
|
comm_buf.resize(Stencil._unified_buffer_size);
|
|
|
|
};
|
|
|
|
|
2015-06-20 22:22:56 +01:00
|
|
|
void CoarsenOperator(GridBase *FineGrid,LinearOperatorBase<Lattice<Fobj> > &linop,
|
|
|
|
Aggregation<Fobj,CComplex,nbasis> & Subspace){
|
2015-06-08 12:04:59 +01:00
|
|
|
|
2015-06-09 10:26:19 +01:00
|
|
|
FineField iblock(FineGrid); // contributions from within this block
|
|
|
|
FineField oblock(FineGrid); // contributions from outwith this block
|
|
|
|
|
|
|
|
FineField phi(FineGrid);
|
|
|
|
FineField tmp(FineGrid);
|
|
|
|
FineField zz(FineGrid); zz=zero;
|
|
|
|
FineField Mphi(FineGrid);
|
|
|
|
|
|
|
|
Lattice<iScalar<vInteger> > coor(FineGrid);
|
|
|
|
|
|
|
|
CoarseVector iProj(Grid());
|
|
|
|
CoarseVector oProj(Grid());
|
2015-06-08 12:04:59 +01:00
|
|
|
CoarseScalar InnerProd(Grid());
|
|
|
|
|
|
|
|
// Orthogonalise the subblocks over the basis
|
2015-06-20 22:22:56 +01:00
|
|
|
blockOrthogonalise(InnerProd,Subspace.subspace);
|
2015-06-08 12:04:59 +01:00
|
|
|
|
|
|
|
// Compute the matrix elements of linop between this orthonormal
|
|
|
|
// set of vectors.
|
2015-06-09 10:26:19 +01:00
|
|
|
int self_stencil=-1;
|
|
|
|
for(int p=0;p<geom.npoint;p++){
|
|
|
|
A[p]=zero;
|
|
|
|
if( geom.displacements[p]==0){
|
|
|
|
self_stencil=p;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assert(self_stencil!=-1);
|
|
|
|
|
2015-06-08 12:04:59 +01:00
|
|
|
for(int i=0;i<nbasis;i++){
|
2015-06-20 22:22:56 +01:00
|
|
|
phi=Subspace.subspace[i];
|
2015-06-08 12:04:59 +01:00
|
|
|
for(int p=0;p<geom.npoint;p++){
|
2015-06-09 10:26:19 +01:00
|
|
|
|
|
|
|
int dir = geom.directions[p];
|
2015-06-09 22:37:21 +01:00
|
|
|
int disp = geom.displacements[p];
|
2015-06-08 12:04:59 +01:00
|
|
|
|
2015-06-14 01:07:58 +01:00
|
|
|
Integer block=(FineGrid->_rdimensions[dir])/(Grid()->_rdimensions[dir]);
|
2015-06-08 12:04:59 +01:00
|
|
|
|
2015-06-09 10:26:19 +01:00
|
|
|
LatticeCoordinate(coor,dir);
|
2015-06-08 12:04:59 +01:00
|
|
|
|
2015-06-09 10:26:19 +01:00
|
|
|
if ( disp==0 ){
|
|
|
|
linop.OpDiag(phi,Mphi);
|
|
|
|
}
|
|
|
|
else {
|
2015-06-09 22:37:21 +01:00
|
|
|
linop.OpDir(phi,Mphi,dir,disp);
|
2015-06-09 10:26:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
// Pick out contributions coming from this cell and neighbour cell
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
if ( disp==0 ) {
|
|
|
|
iblock = Mphi;
|
|
|
|
oblock = zero;
|
|
|
|
} else if ( disp==1 ) {
|
|
|
|
oblock = where(mod(coor,block)==(block-1),Mphi,zz);
|
|
|
|
iblock = where(mod(coor,block)!=(block-1),Mphi,zz);
|
|
|
|
} else if ( disp==-1 ) {
|
2015-06-14 01:07:58 +01:00
|
|
|
oblock = where(mod(coor,block)==(Integer)0,Mphi,zz);
|
|
|
|
iblock = where(mod(coor,block)!=(Integer)0,Mphi,zz);
|
2015-06-09 10:26:19 +01:00
|
|
|
} else {
|
|
|
|
assert(0);
|
|
|
|
}
|
|
|
|
|
2015-06-20 22:22:56 +01:00
|
|
|
Subspace.ProjectToSubspace(iProj,iblock);
|
|
|
|
Subspace.ProjectToSubspace(oProj,oblock);
|
|
|
|
// blockProject(iProj,iblock,Subspace.subspace);
|
|
|
|
// blockProject(oProj,oblock,Subspace.subspace);
|
2015-07-23 17:31:13 +01:00
|
|
|
PARALLEL_FOR_LOOP
|
2015-06-08 12:04:59 +01:00
|
|
|
for(int ss=0;ss<Grid()->oSites();ss++){
|
|
|
|
for(int j=0;j<nbasis;j++){
|
2015-06-09 10:26:19 +01:00
|
|
|
if( disp!= 0 ) {
|
|
|
|
A[p]._odata[ss](j,i) = oProj._odata[ss](j);
|
|
|
|
}
|
|
|
|
A[self_stencil]._odata[ss](j,i) = A[self_stencil]._odata[ss](j,i) + iProj._odata[ss](j);
|
2015-06-08 12:04:59 +01:00
|
|
|
}
|
|
|
|
}
|
2015-06-09 10:26:19 +01:00
|
|
|
}
|
|
|
|
}
|
2015-06-08 12:04:59 +01:00
|
|
|
|
2015-06-09 10:26:19 +01:00
|
|
|
#if 0
|
|
|
|
///////////////////////////
|
|
|
|
// test code worth preserving in if block
|
|
|
|
///////////////////////////
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<< " Computed matrix elements "<< self_stencil <<std::endl;
|
2015-06-09 10:26:19 +01:00
|
|
|
for(int p=0;p<geom.npoint;p++){
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<< "A["<<p<<"]" << std::endl;
|
|
|
|
std::cout<<GridLogMessage<< A[p] << std::endl;
|
2015-06-08 12:04:59 +01:00
|
|
|
}
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<< " picking by block0 "<< self_stencil <<std::endl;
|
2015-06-09 10:26:19 +01:00
|
|
|
|
2015-06-20 22:22:56 +01:00
|
|
|
phi=Subspace.subspace[0];
|
2015-06-09 10:26:19 +01:00
|
|
|
std::vector<int> bc(FineGrid->_ndimension,0);
|
|
|
|
|
|
|
|
blockPick(Grid(),phi,tmp,bc); // Pick out a block
|
|
|
|
linop.Op(tmp,Mphi); // Apply big dop
|
2015-06-20 22:22:56 +01:00
|
|
|
blockProject(iProj,Mphi,Subspace.subspace); // project it and print it
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<< " Computed matrix elements from block zero only "<<std::endl;
|
|
|
|
std::cout<<GridLogMessage<< iProj <<std::endl;
|
|
|
|
std::cout<<GridLogMessage<<"Computed Coarse Operator"<<std::endl;
|
2015-06-09 10:26:19 +01:00
|
|
|
#endif
|
2015-06-09 22:37:21 +01:00
|
|
|
// ForceHermitian();
|
2015-06-20 22:22:56 +01:00
|
|
|
AssertHermitian();
|
|
|
|
// ForceDiagonal();
|
2015-06-09 22:37:21 +01:00
|
|
|
}
|
|
|
|
void ForceDiagonal(void) {
|
|
|
|
|
|
|
|
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<<"**************************************************"<<std::endl;
|
|
|
|
std::cout<<GridLogMessage<<"**** Forcing coarse operator to be diagonal ****"<<std::endl;
|
|
|
|
std::cout<<GridLogMessage<<"**************************************************"<<std::endl;
|
2015-06-09 22:37:21 +01:00
|
|
|
for(int p=0;p<8;p++){
|
|
|
|
A[p]=zero;
|
|
|
|
}
|
|
|
|
|
|
|
|
GridParallelRNG RNG(Grid()); RNG.SeedRandomDevice();
|
|
|
|
Lattice<iScalar<CComplex> > val(Grid()); random(RNG,val);
|
|
|
|
|
|
|
|
Complex one(1.0);
|
|
|
|
|
2015-06-20 22:22:56 +01:00
|
|
|
iMatrix<CComplex,nbasis> ident; ident=one;
|
2015-06-09 22:37:21 +01:00
|
|
|
|
|
|
|
val = val*adj(val);
|
|
|
|
val = val + 1.0;
|
|
|
|
|
|
|
|
A[8] = val*ident;
|
|
|
|
|
|
|
|
// for(int s=0;s<Grid()->oSites();s++) {
|
|
|
|
// A[8]._odata[s]=val._odata[s];
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
void ForceHermitian(void) {
|
|
|
|
for(int d=0;d<4;d++){
|
|
|
|
int dd=d+1;
|
|
|
|
A[2*d] = adj(Cshift(A[2*d+1],dd,1));
|
|
|
|
}
|
2015-06-20 22:22:56 +01:00
|
|
|
// A[8] = 0.5*(A[8] + adj(A[8]));
|
2015-06-09 22:37:21 +01:00
|
|
|
}
|
|
|
|
void AssertHermitian(void) {
|
|
|
|
CoarseMatrix AA (Grid());
|
|
|
|
CoarseMatrix AAc (Grid());
|
|
|
|
CoarseMatrix Diff (Grid());
|
|
|
|
for(int d=0;d<4;d++){
|
|
|
|
|
|
|
|
int dd=d+1;
|
|
|
|
AAc = Cshift(A[2*d+1],dd,1);
|
|
|
|
AA = A[2*d];
|
|
|
|
|
|
|
|
Diff = AA - adj(AAc);
|
|
|
|
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<<"Norm diff dim "<<d<<" "<< norm2(Diff)<<std::endl;
|
|
|
|
std::cout<<GridLogMessage<<"Norm dim "<<d<<" "<< norm2(AA)<<std::endl;
|
2015-06-09 22:37:21 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
Diff = A[8] - adj(A[8]);
|
2015-07-23 17:31:13 +01:00
|
|
|
std::cout<<GridLogMessage<<"Norm diff local "<< norm2(Diff)<<std::endl;
|
|
|
|
std::cout<<GridLogMessage<<"Norm local "<< norm2(A[8])<<std::endl;
|
2015-06-08 12:04:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|