Commit 2db2944c authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

ChemicalH: observe compiles all models

parent 4e51f392
......@@ -47,7 +47,7 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#ifndef MODEL_SELECTOR_H
#define MODEL_SELECTOR_H
//#define ALL_MODELS 1
#define ALL_MODELS 1
#include <stdexcept>
#include "ProgramGlobals.h"
#include "Utils.h"
......
......@@ -2,6 +2,7 @@
#define SUPERGEOMETRY_H
#include "Geometry/Geometry.h"
#include "ProgramGlobals.h"
#include "Geometry/GeometryDca.h"
namespace Dmrg {
......@@ -16,12 +17,17 @@ class SuperGeometry {
public:
typedef typename GeometryType::RealType RealType;
typedef PsimagLite::GeometryDca<RealType,GeometryType> GeometryDcaType;
SuperGeometry(InputType_& io)
: geometry_(io)
: geometry_(io), dcaPtr_(0)
{}
// const GeometryType& geometry() const { return geometry_; }
~SuperGeometry()
{
delete dcaPtr_;
dcaPtr_ = 0;
}
void split(SizeType sitesPerBlock,
VectorSizeType& S,
......@@ -42,13 +48,13 @@ public:
geometry_.write(label, ioSerializer);
}
// SizeType maxConnections(SizeType termId) const
// {
// return geometry_.maxConnections(termId);
// }
SizeType maxConnections() const { return geometry_.maxConnections(); }
SizeType orbitals(SizeType term, SizeType site) const
{
return geometry_.orbitals(term, site);
}
PsimagLite::String label(SizeType i) const { return geometry_.label(i); }
template<typename T>
......@@ -85,6 +91,13 @@ public:
return geometry_.connectionKind(smax, hItems[0], hItems[1]);
}
const GeometryDcaType& createDcaObject(SizeType orbitals) const
{
if (!dcaPtr_)
dcaPtr_ = new GeometryDcaType(geometry_, orbitals);
return *dcaPtr_;
}
SizeType overSize(SizeType blockSize) const
{
return blockSize*(blockSize/2 + 1); // + superc_.size();
......@@ -115,6 +128,7 @@ private:
}
const GeometryType& geometry_;
mutable GeometryDcaType* dcaPtr_;
};
}
......
......@@ -91,7 +91,7 @@ public:
typedef typename ModelBaseType::VectorSizeType VectorSizeType;
typedef ModelHubbard<ModelBaseType> ModelHubbardType;
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -118,12 +118,12 @@ public:
ExtendedHubbard1Orb(const SolverParamsType& solverParams,
InputValidatorType& io,
GeometryType const &geometry)
SuperGeometryType const &geometry)
: ModelBaseType(solverParams,
geometry,
io),
modelParameters_(io),
geometry_(geometry),
superGeometry_(geometry),
modelHubbard_(solverParams, io, geometry, "")
{}
......@@ -187,7 +187,7 @@ private:
}
ParametersModelHubbard<RealType, QnType> modelParameters_;
const GeometryType &geometry_;
const SuperGeometryType& superGeometry_;
ModelHubbardType modelHubbard_;
}; //class ExtendedHubbard1Orb
......
......@@ -96,7 +96,7 @@ public:
typedef typename ModelFeAsType::HilbertState HilbertState;
typedef typename ModelFeAsType::HilbertBasisType HilbertBasisType;
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -123,10 +123,9 @@ public:
FeAsBasedScExtended(const SolverParamsType& solverParams,
InputValidatorType& io,
const GeometryType& geometry)
const SuperGeometryType& geometry)
: ModelBaseType(solverParams, geometry, io),
modelParameters_(io),
geometry_(geometry),
modelFeAs_(solverParams,io,geometry),
orbitals_(modelParameters_.orbitals)
{}
......@@ -323,7 +322,6 @@ private:
}
ParametersModelFeAs<RealType, QnType> modelParameters_;
const GeometryType& geometry_;
ModelFeAsType modelFeAs_;
SizeType orbitals_;
}; //class FeAsBasedScExtended
......
......@@ -99,7 +99,7 @@ public:
typedef typename ModelBaseType::VectorSizeType VectorSizeType;
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -119,7 +119,7 @@ public:
typedef typename ModelBaseType::MyBasis MyBasis;
typedef typename ModelBaseType::BasisWithOperatorsType MyBasisWithOperators;
typedef typename ModelBaseType::InputValidatorType InputValidatorType;
typedef PsimagLite::GeometryDca<RealType,GeometryType> GeometryDcaType;
typedef typename SuperGeometryType::GeometryDcaType GeometryDcaType;
typedef PsimagLite::Matrix<ComplexOrRealType> MatrixType;
typedef ParametersModelFeAs<ComplexOrRealType, QnType> ParamsModelFeAsType;
typedef typename ModelBaseType::OpsLabelType OpsLabelType;
......@@ -135,20 +135,20 @@ public:
ModelFeBasedSc(const SolverParamsType& solverParams,
InputValidatorType& io,
GeometryType const &geometry)
: ModelBaseType(solverParams, geometry, io),
const SuperGeometryType& superGeometry)
: ModelBaseType(solverParams, superGeometry, io),
reinterpretX_(6),
reinterpretY_(9),
modelParameters_(io),
geometry_(geometry),
geometryDca_(geometry, modelParameters_.orbitals),
superGeometry_(superGeometry),
geometryDca_(superGeometry.createDcaObject(modelParameters_.orbitals)),
spinSquared_(spinSquaredHelper_,
modelParameters_.orbitals,
2*modelParameters_.orbitals),
reinterpret_(!modelParameters_.jzSymmetry),
feAsJzSymmetry_(modelParameters_.jzSymmetry)
{
ProgramGlobals::init(modelParameters_.orbitals*geometry_.numberOfSites() + 1);
ProgramGlobals::init(modelParameters_.orbitals*superGeometry_.numberOfSites() + 1);
PsimagLite::String tspAlgo = "";
try {
......@@ -157,7 +157,7 @@ public:
if (tspAlgo == "SuzukiTrotter") reinterpret_ = false;
SizeType v1 = 2*modelParameters_.orbitals*geometry.numberOfSites();
SizeType v1 = 2*modelParameters_.orbitals*superGeometry.numberOfSites();
SizeType v2 = v1*modelParameters_.orbitals;
if (modelParameters_.potentialV.size() != v1 &&
modelParameters_.potentialV.size() != v2) {
......@@ -971,7 +971,7 @@ private:
const VectorSizeType& block,
const typename PsimagLite::Vector<RealType>::Type& V) const
{
SizeType v1 = 2*modelParameters_.orbitals*geometry_.numberOfSites();
SizeType v1 = 2*modelParameters_.orbitals*superGeometry_.numberOfSites();
SizeType v2 = v1*modelParameters_.orbitals;
if (V.size() != v1 && V.size() != v2) {
PsimagLite::String str(__FILE__);
......@@ -1012,7 +1012,7 @@ private:
SparseMatrixType ndown = n(cm[orbital+SPIN_DOWN*modelParameters_.orbitals+
iOfSite*dof].getCRS());
SizeType linSize = geometry_.numberOfSites();
SizeType linSize = superGeometry_.numberOfSites();
SizeType iUp = site + (orbital + 0*modelParameters_.orbitals)*linSize;
hmatrix += V[iUp] * nup;
......@@ -1037,7 +1037,7 @@ private:
SparseMatrixType ndown = nEx(cm[orb+SPIN_DOWN*modelParameters_.orbitals+iOfSite*dof].getCRS(),
cm[orb2+SPIN_DOWN*modelParameters_.orbitals+iOfSite*dof].getCRS());
SizeType linSize = geometry_.numberOfSites();
SizeType linSize = superGeometry_.numberOfSites();
SizeType iUp = site + (orb + orb2*modelParameters_.orbitals +
0*orbitalsSquared)*linSize;
......@@ -1334,9 +1334,9 @@ private:
HilbertState reinterpretY_;
//serializr normal modelParameters_
ParamsModelFeAsType modelParameters_;
//serializr ref geometry_ start
const GeometryType& geometry_;
GeometryDcaType geometryDca_;
//serializr ref superGeometry_ start
const SuperGeometryType& superGeometry_;
const GeometryDcaType& geometryDca_;
//serializr normal spinSquaredHelper_
SpinSquaredHelper<RealType,HilbertState> spinSquaredHelper_;
//serializr normal spinSquared_
......
......@@ -101,7 +101,7 @@ class FermionSpinless : public ModelBaseType {
public:
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -130,15 +130,14 @@ public:
FermionSpinless(const SolverParamsType& solverParams,
InputValidatorType& io,
GeometryType const &geometry,
const SuperGeometryType& geometry,
SizeType offset = DEGREES_OF_FREEDOM)
: ModelBaseType(solverParams, geometry, io),
modelParameters_(io),
geometry_(geometry),
offset_(offset),
spinSquared_(spinSquaredHelper_,NUMBER_OF_ORBITALS,DEGREES_OF_FREEDOM)
{
SizeType expected = geometry_.numberOfSites();
SizeType expected = geometry.numberOfSites();
SizeType found = modelParameters_.potentialV.size();
if (expected == found) return;
PsimagLite::String str("FermionSpinless: potentialV: expected ");
......@@ -361,7 +360,6 @@ protected:
}
ParametersFermionSpinless<RealType, QnType> modelParameters_;
const GeometryType& geometry_;
SizeType offset_;
SpinSquaredHelper<RealType,WordType> spinSquaredHelper_;
SpinSquared<SpinSquaredHelper<RealType,WordType> > spinSquared_;
......
......@@ -96,7 +96,7 @@ public:
typedef typename ModelBaseType::VectorSizeType VectorSizeType;
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -128,12 +128,11 @@ public:
Graphene(const SolverParamsType& solverParams,
InputValidatorType& io,
GeometryType const &geometry)
const SuperGeometryType& geometry)
: ModelBaseType(solverParams, geometry, io),
modelParameters_(io),
geometry_(geometry)
modelParameters_(io)
{
ProgramGlobals::init(modelParameters_.orbitals*geometry_.numberOfSites() + 1);
ProgramGlobals::init(modelParameters_.orbitals*geometry.numberOfSites() + 1);
HilbertSpaceFeAsType::setOrbitals(modelParameters_.orbitals);
statesPerSite_ = (1 << (modelParameters_.orbitals*2));
......@@ -556,7 +555,6 @@ private:
}
ParametersGrapheneType modelParameters_;
const GeometryType& geometry_;
SizeType statesPerSite_;
HilbertBasisType basis_;
VectorQnType qq_;
......
......@@ -104,7 +104,7 @@ public:
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelHelperType::BasisType BasisType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -134,15 +134,14 @@ public:
HeisenbergAncillaC(const SolverParamsType& solverParams,
InputValidatorType& io,
GeometryType const &geometry)
const SuperGeometryType& geometry)
: ModelBaseType(solverParams,
geometry,
io),
modelParameters_(io),
geometry_(geometry),
hot_(geometry_.orbitals(0,0) > 1)
hot_(geometry.orbitals(0,0) > 1)
{
SizeType n = geometry_.numberOfSites();
SizeType n = geometry.numberOfSites();
SizeType m = modelParameters_.magneticField.size();
if (m > 0 && m != n) {
PsimagLite::String msg("HeisenbergAncillaC: If provided, ");
......@@ -185,7 +184,8 @@ public:
const BlockType& block,
RealType) const
{
if (modelParameters_.magneticField.size() != geometry_.numberOfSites())
if (modelParameters_.magneticField.size() !=
ModelBaseType::superGeometry().numberOfSites())
return;
SizeType n = block.size();
......@@ -202,7 +202,7 @@ public:
virtual PsimagLite::String oracle() const
{
const RealType nup = ModelBaseType::targetQuantum().qn(0).other[0];
const RealType n = ModelBaseType::geometry().numberOfSites();
const RealType n = ModelBaseType::superGeometry().numberOfSites();
RealType energy = -nup*(n - nup);
return ModelBaseType::oracle(energy, "-Nup*Ndown");
}
......@@ -495,12 +495,7 @@ private:
return p.first*(modelParameters_.twiceTheSpin + 1) + p.second;
}
//serializr start class HeisenbergAncillaC
//serializr vptr
//serializr normal modelParameters_
ParametersHeisenbergAncillaC<RealType, QnType> modelParameters_;
//serializr ref geometry_ start
const GeometryType& geometry_;
bool hot_;
}; // class HeisenbergAncillaC
......
......@@ -100,7 +100,7 @@ public:
typedef typename ModelBaseType::VectorSizeType VectorSizeType;
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -121,7 +121,6 @@ public:
typedef typename ModelBaseType::MyBasis BasisType;
typedef typename ModelBaseType::BasisWithOperatorsType MyBasisWithOperators;
typedef typename ModelBaseType::InputValidatorType InputValidatorType;
typedef PsimagLite::GeometryDca<RealType,GeometryType> GeometryDcaType;
typedef PsimagLite::Matrix<ComplexOrRealType> MatrixType;
typedef ParametersHubbardHolstein<RealType, QnType> ParametersHolsteinThinType;
typedef std::pair<SizeType,SizeType> PairType;
......@@ -151,13 +150,12 @@ public:
HolsteinThin(const SolverParamsType& solverParams,
InputValidatorType& io,
const GeometryType& geometry,
const SuperGeometryType& geometry,
PsimagLite::String additional)
: ModelBaseType(solverParams,
geometry,
io),
modelParameters_(io),
geometry_(geometry),
isSsh_(additional == "SSH"),
atomKind_(0)
{
......@@ -451,7 +449,7 @@ private:
SparseMatrixType nup = n(cm[SPIN_UP]);
SparseMatrixType ndown = n(cm[SPIN_DOWN]);
SizeType linSize = geometry_.numberOfSites();
SizeType linSize = ModelBaseType::superGeometry().numberOfSites();
SizeType iUp = actualIndexOfSite;
assert(iUp < modelParameters_.potentialFV.size());
hmatrix += modelParameters_.potentialFV[iUp] * nup;
......@@ -512,7 +510,6 @@ private:
}
ParametersHolsteinThinType modelParameters_;
const GeometryType& geometry_;
bool isSsh_;
const AtomKind* atomKind_;
}; //class HolsteinThin
......
......@@ -11,7 +11,7 @@ class HelperHubbardAncilla {
public:
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::HilbertBasisType HilbertBasisType;
typedef typename HilbertBasisType::value_type HilbertState;
typedef HilbertSpaceFeAs<HilbertState> HilbertSpaceFeAsType;
......@@ -35,10 +35,11 @@ public:
static const int SPIN_DOWN=HilbertSpaceFeAsType::SPIN_DOWN;
static const int FERMION_SIGN = -1;
HelperHubbardAncilla(const GeometryType& geometry, const ModelParametersType& modelParams)
: geometry_(geometry),
HelperHubbardAncilla(const SuperGeometryType& geometry,
const ModelParametersType& modelParams)
: superGeometry_(geometry),
modelParameters_(modelParams),
hot_(geometry_.orbitals(0,0) > 1)
hot_(superGeometry_.orbitals(0,0) > 1)
{
if (!hot_) return;
......@@ -219,7 +220,7 @@ private:
SizeType actualSite) const
{
SparseMatrixType tmpMatrix;
SizeType nsites = geometry_.numberOfSites();
SizeType nsites = superGeometry_.numberOfSites();
SizeType factor = (hot_) ? 2 : 1;
if (modelParameters_.hubbardU.size() != factor*nsites)
err("Number of Us is incorrect\n");
......@@ -239,7 +240,7 @@ private:
SizeType actualIndexOfSite) const
{
SizeType factor = (hot_) ? 2 : 1;
SizeType nsites = geometry_.numberOfSites();
SizeType nsites = superGeometry_.numberOfSites();
if (modelParameters_.potentialV.size() != factor*2*nsites)
err("Number of Vs is incorrect\n");
......@@ -322,7 +323,7 @@ private:
return (value==0 || value%2==0) ? 1.0 : FERMION_SIGN;
}
const GeometryType& geometry_;
const SuperGeometryType& superGeometry_;
const ModelParametersType& modelParameters_;
bool hot_;
};
......
......@@ -98,7 +98,7 @@ public:
typedef typename ModelBaseType::VectorSizeType VectorSizeType;
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -117,7 +117,6 @@ public:
typedef typename ModelBaseType::MyBasis BasisType;
typedef typename ModelBaseType::BasisWithOperatorsType MyBasisWithOperators;
typedef typename ModelBaseType::InputValidatorType InputValidatorType;
typedef PsimagLite::GeometryDca<RealType,GeometryType> GeometryDcaType;
typedef PsimagLite::Matrix<ComplexOrRealType> MatrixType;
typedef ParametersHubbardAncilla<RealType, QnType> ParametersHubbardAncillaType;
typedef std::pair<SizeType,SizeType> PairType;
......@@ -136,11 +135,11 @@ public:
HubbardAncilla(const SolverParamsType& solverParams,
InputValidatorType& io,
GeometryType const &geometry)
const SuperGeometryType& geometry)
: ModelBaseType(solverParams, geometry, io),
modelParameters_(io),
geometry_(geometry),
helperHubbardAncilla_(geometry_, modelParameters_)
superGeometry_(geometry),
helperHubbardAncilla_(superGeometry_, modelParameters_)
{}
void write(PsimagLite::String label1, PsimagLite::IoNg::Out::Serializer& io) const
......@@ -160,7 +159,7 @@ public:
const RealType ne = ModelBaseType::targetQuantum().qn(0).other[0];
const RealType nup = ModelBaseType::targetQuantum().qn(0).other[1];
const RealType ndown = ne - nup;
const RealType n = ModelBaseType::geometry().numberOfSites();
const RealType n = ModelBaseType::superGeometry().numberOfSites();
RealType energy = -nup*(n - nup) - ndown*(n - ndown);
return ModelBaseType::oracle(energy, " -Nup*(L-Nup) -Ndown*(L-Ndown)");
}
......@@ -247,10 +246,8 @@ protected:
private:
//serializr normal modelParameters_
ParametersHubbardAncillaType modelParameters_;
//serializr ref geometry_ start
const GeometryType& geometry_;
const SuperGeometryType& superGeometry_;
HelperHubbardAncillaType helperHubbardAncilla_;
}; //class HubbardAncilla
} // namespace Dmrg
......
......@@ -97,7 +97,7 @@ class HubbardAncillaExtended : public ModelBaseType {
public:
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -118,7 +118,6 @@ public:
typedef typename ModelBaseType::VectorType VectorType;
typedef typename ModelBaseType::MyBasis BasisType;
typedef typename ModelBaseType::BasisWithOperatorsType MyBasisWithOperators;
typedef PsimagLite::GeometryDca<RealType,GeometryType> GeometryDcaType;
typedef ParametersHubbardAncillaExtended<RealType, QnType> ParametersHubbardAncillaType;
typedef std::pair<SizeType,SizeType> PairType;
typedef typename PsimagLite::Vector<PairType>::Type VectorPairType;
......@@ -137,13 +136,12 @@ public:
HubbardAncillaExtended(const SolverParamsType& solverParams,
InputValidatorType& io,
GeometryType const &geometry)
const SuperGeometryType& geometry)
: ModelBaseType(solverParams,
geometry,
io),
modelParameters_(io),
geometry_(geometry),
helperHubbardAncilla_(geometry_, modelParameters_)
helperHubbardAncilla_(geometry, modelParameters_)
{}
void write(PsimagLite::String label1, PsimagLite::IoNg::Out::Serializer& io) const
......@@ -404,7 +402,6 @@ private:
}
ParametersHubbardAncillaType modelParameters_;
const GeometryType& geometry_;
HelperHubbardAncillaType helperHubbardAncilla_;
}; //class HubbardAncilla
} // namespace Dmrg
......
......@@ -98,7 +98,7 @@ public:
typedef typename ModelBaseType::VectorSizeType VectorSizeType;
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;
typedef typename ModelBaseType::LeftRightSuperType LeftRightSuperType;
typedef typename ModelBaseType::LinkType LinkType;
typedef typename ModelHelperType::OperatorsType OperatorsType;
......@@ -120,7 +120,6 @@ public:
typedef typename ModelBaseType::MyBasis BasisType;
typedef typename ModelBaseType::BasisWithOperatorsType MyBasisWithOperators;
typedef typename ModelBaseType::InputValidatorType InputValidatorType;
typedef PsimagLite::GeometryDca<RealType,GeometryType> GeometryDcaType;
typedef PsimagLite::Matrix<ComplexOrRealType> MatrixType;
typedef ParametersHubbardHolstein<RealType, QnType> ParametersHubbardHolsteinType;
typedef std::pair<SizeType,SizeType> PairType;
......@@ -137,13 +136,12 @@ public:
HubbardHolstein(const SolverParamsType& solverParams,
InputValidatorType& io,
const GeometryType& geometry,
const SuperGeometryType& geometry,
PsimagLite::String additional)
: ModelBaseType(solverParams,
geometry,
io),
modelParameters_(io),
geometry_(geometry),
isSsh_(additional == "SSH")
{
HilbertSpaceHubbardHolsteinType::setBitPhonons(modelParameters_.numberphonons);
......@@ -506,7 +504,7 @@ private:
SparseMatrixType nup = n(cm[SPIN_UP]);
SparseMatrixType ndown = n(cm[SPIN_DOWN]);
SizeType linSize = geometry_.numberOfSites();
SizeType linSize = ModelBaseType::superGeometry().numberOfSites();
SizeType iUp = actualIndexOfSite;
assert(iUp < modelParameters_.potentialFV.size());
hmatrix += modelParameters_.potentialFV[iUp] * nup;
......@@ -580,7 +578,6 @@ private:
}
ParametersHubbardHolsteinType modelParameters_;
const GeometryType& geometry_;
bool isSsh_;
}; //class HubbardHolstein
} // namespace Dmrg
......
......@@ -95,7 +95,7 @@ public:
typedef typename ModelBaseType::VectorSizeType VectorSizeType;
typedef typename ModelBaseType::ModelHelperType ModelHelperType;
typedef typename ModelBaseType::GeometryType GeometryType;
typedef typename ModelBaseType::SuperGeometryType SuperGeometryType;