Commit facb0b56 authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

BasisWithOperators: clean up

parent 685c2267
......@@ -69,7 +69,7 @@ sub printInstance
$values) = @_;
my $sparseMatrix = "SparseMatrixInstance${counter}Type";
my $basisWithout = "Dmrg::Basis<$sparseMatrix>";
my $basisWith = "Dmrg::BasisWithOperators<$basisWithout ,1>";
my $basisWith = "Dmrg::BasisWithOperators<$basisWithout >";
my $basis = $basisWithout;
my $inputNg = "PsimagLite::InputNg<Dmrg::InputCheck>::Readable";
my $geometry = "GeometryInstance${counter}Type";
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorOnTheFly<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance0Type> ,1>,Dmrg::Basis<SparseMatrixInstance0Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance0Type> >,Dmrg::Basis<SparseMatrixInstance0Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorStored<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance1Type> ,1>,Dmrg::Basis<SparseMatrixInstance1Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance1Type> >,Dmrg::Basis<SparseMatrixInstance1Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorKron<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance2Type> ,1>,Dmrg::Basis<SparseMatrixInstance2Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance2Type> >,Dmrg::Basis<SparseMatrixInstance2Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorOnTheFly<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance3Type> ,1>,Dmrg::Basis<SparseMatrixInstance3Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance3Type> >,Dmrg::Basis<SparseMatrixInstance3Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorKron<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance20Type> ,1>,Dmrg::Basis<SparseMatrixInstance20Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance20Type> >,Dmrg::Basis<SparseMatrixInstance20Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorOnTheFly<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance21Type> ,1>,Dmrg::Basis<SparseMatrixInstance21Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance21Type> >,Dmrg::Basis<SparseMatrixInstance21Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorStored<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance22Type> ,1>,Dmrg::Basis<SparseMatrixInstance22Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance22Type> >,Dmrg::Basis<SparseMatrixInstance22Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorKron<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance23Type> ,1>,Dmrg::Basis<SparseMatrixInstance23Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance23Type> >,Dmrg::Basis<SparseMatrixInstance23Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorStored<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance4Type> ,1>,Dmrg::Basis<SparseMatrixInstance4Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance4Type> >,Dmrg::Basis<SparseMatrixInstance4Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorKron<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance5Type> ,1>,Dmrg::Basis<SparseMatrixInstance5Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance5Type> >,Dmrg::Basis<SparseMatrixInstance5Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorOnTheFly<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance6Type> ,1>,Dmrg::Basis<SparseMatrixInstance6Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance6Type> >,Dmrg::Basis<SparseMatrixInstance6Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorStored<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance7Type> ,1>,Dmrg::Basis<SparseMatrixInstance7Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance7Type> >,Dmrg::Basis<SparseMatrixInstance7Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorKron<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance8Type> ,1>,Dmrg::Basis<SparseMatrixInstance8Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance8Type> >,Dmrg::Basis<SparseMatrixInstance8Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorOnTheFly<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance9Type> ,1>,Dmrg::Basis<SparseMatrixInstance9Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance9Type> >,Dmrg::Basis<SparseMatrixInstance9Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorStored<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance10Type> ,1>,Dmrg::Basis<SparseMatrixInstance10Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance10Type> >,Dmrg::Basis<SparseMatrixInstance10Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<RealType,PsimagLite::InputNg<Dmrg::InputCheck>::Read
typedef Dmrg::MatrixVectorKron<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance11Type> ,1>,Dmrg::Basis<SparseMatrixInstance11Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance11Type> >,Dmrg::Basis<SparseMatrixInstance11Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorOnTheFly<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance12Type> ,1>,Dmrg::Basis<SparseMatrixInstance12Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance12Type> >,Dmrg::Basis<SparseMatrixInstance12Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorStored<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance13Type> ,1>,Dmrg::Basis<SparseMatrixInstance13Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance13Type> >,Dmrg::Basis<SparseMatrixInstance13Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorKron<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance14Type> ,1>,Dmrg::Basis<SparseMatrixInstance14Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance14Type> >,Dmrg::Basis<SparseMatrixInstance14Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorOnTheFly<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance15Type> ,1>,Dmrg::Basis<SparseMatrixInstance15Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance15Type> >,Dmrg::Basis<SparseMatrixInstance15Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorStored<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance16Type> ,1>,Dmrg::Basis<SparseMatrixInstance16Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance16Type> >,Dmrg::Basis<SparseMatrixInstance16Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorKron<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance17Type> ,1>,Dmrg::Basis<SparseMatrixInstance17Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance17Type> >,Dmrg::Basis<SparseMatrixInstance17Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
......@@ -11,7 +11,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorOnTheFly<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance18Type> ,1>,Dmrg::Basis<SparseMatrixInstance18Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance18Type> >,Dmrg::Basis<SparseMatrixInstance18Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......@@ -35,7 +35,7 @@ typedef Dmrg::SuperGeometry<std::complex<RealType> ,PsimagLite::InputNg<Dmrg::In
typedef Dmrg::MatrixVectorStored<
Dmrg::ModelBase<
Dmrg::ModelHelperLocal<
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance19Type> ,1>,Dmrg::Basis<SparseMatrixInstance19Type> >
Dmrg::LeftRightSuper<Dmrg::BasisWithOperators<Dmrg::Basis<SparseMatrixInstance19Type> >,Dmrg::Basis<SparseMatrixInstance19Type> >
>,
ParametersDmrgSolverType,
InputNgType::Readable,
......
/*
Copyright (c) 2009-2012, UT-Battelle, LLC
Copyright (c) 2009-2012-2019, UT-Battelle, LLC
All rights reserved
[DMRG++, Version 2.0.0]
[DMRG++, Version 5.]
[by G.A., Oak Ridge National Laboratory]
UT Battelle Open Source Software License 11242008
......@@ -113,7 +113,7 @@ namespace Dmrg {
local operators in a Hilbert space basis. These include functions to create
an outer product of two given Hilbert spaces, to transform a basis, to truncate a basis, etc.
*/
template<typename BasisType_, int>
template<typename BasisType_>
class BasisWithOperators : public BasisType_ {
public:
......@@ -128,7 +128,7 @@ public:
typedef typename OperatorsType::BasisType BasisType;
typedef typename BasisType::BlockType VectorSizeType;
typedef typename OperatorType::StorageType OperatorStorageType;
typedef BasisWithOperators<BasisType_,1> ThisType;
typedef BasisWithOperators<BasisType_> ThisType;
typedef typename BasisType::FactorsType FactorsType;
typedef typename OperatorStorageType::value_type ComplexOrRealType;
typedef typename PsimagLite::CrsMatrix<ComplexOrRealType> SparseMatrixType;
......@@ -395,8 +395,8 @@ private:
PsimagLite::Vector<SizeType>::Type operatorsPerSite_;
}; // class BasisWithOperators
template<typename T,int x>
struct IsBasisType<BasisWithOperators<T,x> > {
template<typename T>
struct IsBasisType<BasisWithOperators<T> > {
enum {True = true};
};
} // namespace Dmrg
......
......@@ -17,11 +17,11 @@ InputNgType::Readable,
ProgramGlobals> Geometry2Type;
typedef Basis<MySparseMatrixReal> Basis1Type;
typedef BasisWithOperators<Basis1Type, 1> BasisWithOperators1Type;
typedef BasisWithOperators<Basis1Type> BasisWithOperators1Type;
typedef LeftRightSuper<BasisWithOperators1Type,Basis1Type> LeftRightSuper1Type;
typedef Basis<MySparseMatrixComplex> Basis2Type;
typedef BasisWithOperators<Basis2Type, 1> BasisWithOperators2Type;
typedef BasisWithOperators<Basis2Type> BasisWithOperators2Type;
typedef LeftRightSuper<BasisWithOperators2Type,Basis2Type> LeftRightSuper2Type;
typedef ModelHelperLocal<LeftRightSuper1Type> ModelHelper1Type;
......
......@@ -17,11 +17,11 @@ InputNgType::Readable,
ProgramGlobals> Geometry2Type;
typedef Basis<MySparseMatrixReal> Basis1Type;
typedef BasisWithOperators<Basis1Type, 1> BasisWithOperators1Type;
typedef BasisWithOperators<Basis1Type> BasisWithOperators1Type;
typedef LeftRightSuper<BasisWithOperators1Type,Basis1Type> LeftRightSuper1Type;
typedef Basis<MySparseMatrixComplex> Basis2Type;
typedef BasisWithOperators<Basis2Type, 1> BasisWithOperators2Type;
typedef BasisWithOperators<Basis2Type> BasisWithOperators2Type;
typedef LeftRightSuper<BasisWithOperators2Type,Basis2Type> LeftRightSuper2Type;
}
......@@ -12,7 +12,7 @@ ProgramGlobals> Geometry1Type;
typedef Basis<MySparseMatrixComplex> Basis2Type;
typedef BasisWithOperators<Basis2Type, 1> BasisWithOperators2Type;
typedef BasisWithOperators<Basis2Type> BasisWithOperators2Type;
typedef LeftRightSuper<BasisWithOperators2Type,Basis2Type> LeftRightSuper2Type;
typedef ModelHelperLocal<LeftRightSuper2Type> ModelHelper2Type;
......
......@@ -98,7 +98,7 @@ void mainLoop1(SuperGeometryType& geometry,
const OperatorOptions& opOptions)
{
typedef Basis<MySparseMatrix> BasisType;
typedef BasisWithOperators<BasisType, 1> BasisWithOperatorsType;
typedef BasisWithOperators<BasisType> BasisWithOperatorsType;
typedef LeftRightSuper<BasisWithOperatorsType,BasisType> LeftRightSuperType;
typedef ModelHelperTemplate<LeftRightSuperType> ModelHelperType;
typedef ModelBase<ModelHelperType,
......
......@@ -47,7 +47,7 @@ void mainLoop1(GeometryType& geometry,
const PsimagLite::String& list)
{
typedef Basis<MySparseMatrix> BasisType;
typedef BasisWithOperators<BasisType, 1> BasisWithOperatorsType;
typedef BasisWithOperators<BasisType> BasisWithOperatorsType;
typedef LeftRightSuper<BasisWithOperatorsType,BasisType> LeftRightSuperType;
typedef ModelHelperTemplate<LeftRightSuperType> ModelHelperType;
typedef typename MySparseMatrix::value_type ComplexOrRealType;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment