tensor-fourindex conversions for some more symemtries
This commit is contained in:
44
t.cc
44
t.cc
@@ -3704,7 +3704,7 @@ cout <<"Error = "<<(x1-y).norm()<<endl;
|
||||
}
|
||||
|
||||
|
||||
if(1)
|
||||
if(0)
|
||||
{
|
||||
int n;
|
||||
cin>>n;
|
||||
@@ -3717,5 +3717,47 @@ tensor2fourindex(t,ff);
|
||||
cout <<"Error = "<<(f-ff).norm()<<endl;
|
||||
}
|
||||
|
||||
if(0)
|
||||
{
|
||||
int n;
|
||||
cin>>n;
|
||||
fourindex_dense<twoelectronrealmullikanAB,double,int> f(n);
|
||||
f.randomize(1.);
|
||||
Tensor<double> t=fourindex2tensor(f);
|
||||
cout <<t;
|
||||
fourindex_dense<twoelectronrealmullikanAB,double,int> ff;
|
||||
tensor2fourindex(t,ff);
|
||||
cout <<"Error = "<<(f-ff).norm()<<endl;
|
||||
}
|
||||
|
||||
if(0)
|
||||
{
|
||||
int n;
|
||||
cin>>n;
|
||||
fourindex_dense<twoelectronrealmullikan,double,int> f(n);
|
||||
f.randomize(1.);
|
||||
Tensor<double> t=fourindex2tensor(f);
|
||||
cout <<t;
|
||||
fourindex_dense<twoelectronrealmullikan,double,int> ff;
|
||||
tensor2fourindex(t,ff);
|
||||
cout <<"Error = "<<(f-ff).norm()<<endl;
|
||||
}
|
||||
|
||||
if(1)
|
||||
{
|
||||
//check also index order
|
||||
int n;
|
||||
cin>>n;
|
||||
fourindex_dense<T2IjAb_aces,double,int> f(n+1,n,n+3,n+2);
|
||||
f.randomize(1.);
|
||||
Tensor<double> t=fourindex2tensor(f);
|
||||
cout <<t;
|
||||
fourindex_dense<T2IjAb_aces,double,int> ff;
|
||||
tensor2fourindex(t,ff);
|
||||
cout <<"Error = "<<(f-ff).norm()<<endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}//main
|
||||
|
||||
Reference in New Issue
Block a user