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

Geometry LongRange supports Entangler

Say
GeometryKind=LongRange
GeometryEntangler=-1
Orbitals=1
and this builds the matrix
m(i, j) = (i == j) ? 0 : -1
You can put any real value instead of -1

The matrix will be made square of rows
equal to the total number of sites times
orbitals, and that is why Orbitals= is needed.
parent 9361eff8
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -158,14 +158,6 @@ public:
		ioSerializer.write(label + "/terms_", terms_);
	}

	template<typename SomeMemResolvType>
	SizeType memResolv(SomeMemResolvType&,
	                   SizeType,
	                   String) const
	{
		return 0;
	}

	String label(SizeType i) const { return terms_[i]->label(); }

	typename ProgramGlobalsType::ConnectionEnum connectionKind(SizeType smax,
+0 −5
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#define GEOMETRY_BASE_H

#include "InputNg.h"
#include "MemResolv.h"

namespace PsimagLite {

@@ -103,10 +102,6 @@ public:
	void write(Archive&, const unsigned int)
	{}

	virtual SizeType memResolv(MemResolv& mres,
	                           SizeType x,
	                           String msg) const = 0;

	virtual SizeType dirs() const = 0;

	virtual SizeType handle(SizeType i,SizeType j) const = 0;
+0 −7
Original line number Diff line number Diff line
@@ -178,13 +178,6 @@ public:
	template<class Archive>
	void write(Archive &, const unsigned int) {}

	SizeType memResolv(MemResolv&,
	                   SizeType,
	                   String) const
	{
		return 0;
	}

private:

	std::pair<bool, Dir> connectedInternal(SizeType ii1, SizeType ii2) const
+0 −20
Original line number Diff line number Diff line
@@ -107,26 +107,6 @@ public:
		std::cout<<"KTwoNiFFour: SIGN CHANGE="<<signChange_<<"\n";
	}

	SizeType memResolv(MemResolv& mres,
	                   SizeType,
	                   String msg) const
	{
		String str = msg;
		str += "KTwoNiFFour";
		const char* start = (const char *)this;
		const char* end = (const char*)&linSize_;
		SizeType total = end - start;
		mres.push(MemResolv::MEMORY_TEXTPTR, total, start,str+" vptr");

		start = end;
		end = (const char*)&signChange_;
		total += mres.memResolv(&linSize_,end-start,str + " linSize");

		mres.memResolv(&signChange_,sizeof(*this) - total,str + " signChange");

		return sizeof(*this);
	}

	SizeType getVectorSize(SizeType) const
	{
		assert(false);
+0 −24
Original line number Diff line number Diff line
@@ -134,30 +134,6 @@ public:
		ar & isPeriodicY_;
	}

	SizeType memResolv(MemResolv& mres,
	                   SizeType,
	                   String msg) const
	{
		String str = msg;
		str += "Ladder";
		const char* start = (const char *)this;
		const char* end = (const char*)&linSize_;
		SizeType total = end - start;
		mres.push(MemResolv::MEMORY_TEXTPTR, total, start,str+" vptr");

		start = end;
		end = (const char*)&leg_;
		total += mres.memResolv(&linSize_,end-start,str + " linSize");

		start = end;
		end = (const char*)&isPeriodicY_;
		total += mres.memResolv(&leg_,end-start,str + " leg");

		mres.memResolv(&isPeriodicY_,sizeof(*this)-total, str + " isPeriodicY");

		return sizeof(*this);
	}

	virtual SizeType maxConnections() const { return (isPeriodicX_) ? linSize_ : leg_ + 1; }

	virtual SizeType dirs() const { return 2; }
Loading