Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Laurell, Pontus Bengt Johan
dmrgpp
Commits
dd2bd24f
Commit
dd2bd24f
authored
Aug 20, 2019
by
Alvarez, Gonzalo
Browse files
ReflectionOperator removed
parent
5213f2a7
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/Engine/Diagonalization.h
View file @
dd2bd24f
...
...
@@ -111,7 +111,6 @@ public:
typedef
typename
ModelType
::
ModelHelperType
ModelHelperType
;
typedef
typename
ModelHelperType
::
LeftRightSuperType
LeftRightSuperType
;
typedef
typename
LeftRightSuperType
::
ParamsForKroneckerDumperType
ParamsForKroneckerDumperType
;
typedef
typename
ModelType
::
ReflectionSymmetryType
ReflectionSymmetryType
;
typedef
typename
TargetingType
::
MatrixVectorType
MatrixVectorType
;
typedef
typename
ModelType
::
InputValidatorType
InputValidatorType
;
typedef
typename
PsimagLite
::
Vector
<
RealType
>::
Type
VectorRealType
;
...
...
@@ -130,7 +129,6 @@ public:
Diagonalization
(
const
ParametersType
&
parameters
,
const
ModelType
&
model
,
const
bool
&
verbose
,
ReflectionSymmetryType
&
reflectionOperator
,
InputValidatorType
&
io
,
const
typename
QnType
::
VectorQnType
&
quantumSector
,
WaveFunctionTransfType
&
waveFunctionTransformation
,
...
...
@@ -138,7 +136,6 @@ public:
:
parameters_
(
parameters
),
model_
(
model
),
verbose_
(
verbose
),
reflectionOperator_
(
reflectionOperator
),
io_
(
io
),
progress_
(
"Diag."
),
quantumSector_
(
quantumSector
),
...
...
@@ -157,7 +154,6 @@ public:
SizeType
loopIndex
=
0
;
VectorSizeType
sectors
;
targetedSymmetrySectors
(
sectors
,
target
.
lrs
());
reflectionOperator_
.
update
(
sectors
);
RealType
gsEnergy
=
internalMain_
(
target
,
direction
,
loopIndex
,
blockLeft
);
// targeting:
target
.
evolve
(
gsEnergy
,
direction
,
blockLeft
,
blockRight
,
loopIndex
);
...
...
@@ -434,12 +430,8 @@ private:
const
TargetVectorType
&
initialVector
,
SizeType
loopIndex
)
{
ReflectionSymmetryType
*
rs
=
0
;
if
(
reflectionOperator_
.
isEnabled
())
rs
=
&
reflectionOperator_
;
typename
LanczosOrDavidsonBaseType
::
MatrixType
lanczosHelper
(
model_
,
hc
,
rs
);
hc
);
const
SizeType
saveOption
=
parameters_
.
finiteLoop
[
loopIndex
].
saveOption
;
...
...
@@ -472,10 +464,6 @@ private:
return
;
}
if
(
reflectionOperator_
.
isEnabled
())
err
(
"ReflectionOperator enabled is not longer supported
\n
"
);
try
{
energyTmp
=
computeLevel
(
*
lanczosOrDavidson
,
tmpVec
,
initialVector
);
}
catch
(
std
::
exception
&
e
)
{
...
...
@@ -563,7 +551,6 @@ private:
const
ParametersType
&
parameters_
;
const
ModelType
&
model_
;
const
bool
&
verbose_
;
ReflectionSymmetryType
&
reflectionOperator_
;
InputValidatorType
&
io_
;
PsimagLite
::
ProgressIndicator
progress_
;
// quantumSector_ needs to be a reference since DmrgSolver will change it
...
...
src/Engine/DmrgSolver.h
View file @
dd2bd24f
...
...
@@ -130,7 +130,6 @@ public:
typedef
Checkpoint
<
ModelType
,
WaveFunctionTransfType
>
CheckpointType
;
typedef
Recovery
<
CheckpointType
,
TargetingType
>
RecoveryType
;
typedef
typename
DmrgSerializerType
::
FermionSignType
FermionSignType
;
typedef
typename
ModelType
::
ReflectionSymmetryType
ReflectionSymmetryType
;
typedef
typename
PsimagLite
::
Vector
<
BlockType
>::
Type
VectorBlockType
;
typedef
typename
PsimagLite
::
Vector
<
SizeType
>::
Type
VectorSizeType
;
typedef
typename
TargetingType
::
LanczosSolverType
LanczosSolverType
;
...
...
@@ -153,19 +152,14 @@ public:
stepCurrent_
(
0
),
checkpoint_
(
parameters_
,
ioIn
,
model
,
false
),
wft_
(
parameters_
),
reflectionOperator_
(
lrs_
,
model_
.
hilbertSize
(
0
),
parameters_
.
useReflectionSymmetry
,
ProgramGlobals
::
DirectionEnum
::
EXPAND_SYSTEM
),
diagonalization_
(
parameters_
,
model
,
verbose_
,
reflectionOperator_
,
ioIn
,
quantumSector_
,
wft_
,
checkpoint_
.
energy
()),
truncate_
(
reflectionOperator
_
,
truncate_
(
lrs
_
,
wft_
,
parameters_
,
model
.
geometry
(),
...
...
@@ -690,7 +684,6 @@ obtain ordered
CheckpointType
checkpoint_
;
WaveFunctionTransfType
wft_
;
VectorBlockType
sitesIndices_
;
ReflectionSymmetryType
reflectionOperator_
;
DiagonalizationType
diagonalization_
;
TruncationType
truncate_
;
ObservablesInSituType
inSitu_
;
...
...
src/Engine/MatrixVectorKron/MatrixVectorKron.h
View file @
dd2bd24f
...
...
@@ -99,7 +99,6 @@ public:
typedef
typename
ModelType
::
ModelHelperType
ModelHelperType
;
typedef
typename
ModelType
::
ParametersType
ParametersType
;
typedef
typename
ModelHelperType
::
RealType
RealType
;
typedef
typename
ModelType
::
ReflectionSymmetryType
ReflectionSymmetryType
;
typedef
InitKronHamiltonian
<
ModelType
>
InitKronType
;
typedef
KronMatrix
<
InitKronType
>
KronMatrixType
;
typedef
typename
ModelHelperType
::
SparseMatrixType
SparseMatrixType
;
...
...
@@ -111,8 +110,7 @@ public:
typedef
typename
ModelType
::
HamiltonianConnectionType
HamiltonianConnectionType
;
MatrixVectorKron
(
const
ModelType
&
model
,
const
HamiltonianConnectionType
&
hc
,
ReflectionSymmetryType
*
=
0
)
const
HamiltonianConnectionType
&
hc
)
:
params_
(
model
.
params
()),
initKron_
(
model
,
hc
),
kronMatrix_
(
initKron_
,
"Hamiltonian"
),
...
...
src/Engine/MatrixVectorOnTheFly.h
View file @
dd2bd24f
...
...
@@ -94,7 +94,6 @@ public:
typedef
ModelType_
ModelType
;
typedef
typename
ModelType
::
ModelHelperType
ModelHelperType
;
typedef
typename
ModelHelperType
::
RealType
RealType
;
typedef
typename
ModelType
::
ReflectionSymmetryType
ReflectionSymmetryType
;
typedef
typename
ModelHelperType
::
SparseMatrixType
SparseMatrixType
;
typedef
typename
SparseMatrixType
::
value_type
value_type
;
typedef
typename
SparseMatrixType
::
value_type
ComplexOrRealType
;
...
...
@@ -103,8 +102,7 @@ public:
typedef
typename
ModelType
::
HamiltonianConnectionType
HamiltonianConnectionType
;
MatrixVectorOnTheFly
(
const
ModelType
&
model
,
const
HamiltonianConnectionType
&
hc
,
ReflectionSymmetryType
*
=
0
)
const
HamiltonianConnectionType
&
hc
)
:
model_
(
model
),
hc_
(
hc
)
{
int
maxMatrixRankStored
=
model
.
params
().
maxMatrixRankStored
;
...
...
src/Engine/MatrixVectorStored.h
View file @
dd2bd24f
...
...
@@ -96,7 +96,6 @@ public:
typedef
typename
ModelType
::
ModelHelperType
ModelHelperType
;
typedef
typename
ModelHelperType
::
SparseMatrixType
SparseMatrixType
;
typedef
typename
ModelHelperType
::
RealType
RealType
;
typedef
typename
ModelType
::
ReflectionSymmetryType
ReflectionSymmetryType
;
typedef
typename
SparseMatrixType
::
value_type
value_type
;
typedef
typename
SparseMatrixType
::
value_type
ComplexOrRealType
;
typedef
typename
PsimagLite
::
Vector
<
RealType
>::
Type
VectorRealType
;
...
...
@@ -104,8 +103,7 @@ public:
typedef
typename
ModelType
::
HamiltonianConnectionType
HamiltonianConnectionType
;
MatrixVectorStored
(
const
ModelType
&
model
,
const
HamiltonianConnectionType
&
hc
,
const
ReflectionSymmetryType
*
rs
=
0
)
const
HamiltonianConnectionType
&
hc
)
:
model_
(
model
),
matrixStored_
(
2
),
pointer_
(
0
),
...
...
@@ -113,25 +111,15 @@ public:
{
PsimagLite
::
String
options
=
model
.
params
().
options
;
bool
debugMatrix
=
(
options
.
find
(
"debugmatrix"
)
!=
PsimagLite
::
String
::
npos
);
if
(
!
rs
)
{
matrixStored_
[
0
].
clear
();
model
.
fullHamiltonian
(
matrixStored_
[
0
],
hc
);
assert
(
isHermitian
(
matrixStored_
[
0
],
true
));
PsimagLite
::
OstringStream
msg
;
msg
<<
"fullHamiltonian has rank="
<<
matrixStored_
[
0
].
rows
();
msg
<<
" nonzeros="
<<
matrixStored_
[
0
].
nonZeros
();
progress_
.
printline
(
msg
,
std
::
cout
);
if
(
debugMatrix
)
printFullMatrix
(
matrixStored_
[
0
],
"matrix"
,
1
);
return
;
}
SparseMatrixType
matrix2
;
model
.
fullHamiltonian
(
matrix2
,
hc
);
rs
->
transform
(
matrixStored_
[
0
],
matrixStored_
[
1
],
matrix2
);
matrixStored_
[
0
].
clear
();
model
.
fullHamiltonian
(
matrixStored_
[
0
],
hc
);
assert
(
isHermitian
(
matrixStored_
[
0
],
true
));
PsimagLite
::
OstringStream
msg
;
msg
<<
" sector="
<<
matrixStored_
[
0
].
rows
()
<<
" and sector="
<<
matrixStored_
[
1
].
rows
();
msg
<<
"fullHamiltonian has rank="
<<
matrixStored_
[
0
].
rows
();
msg
<<
" nonzeros="
<<
matrixStored_
[
0
].
nonZeros
();
progress_
.
printline
(
msg
,
std
::
cout
);
if
(
debugMatrix
)
printFullMatrix
(
matrixStored_
[
0
],
"matrix"
,
1
);
}
SizeType
rows
()
const
{
return
matrixStored_
[
pointer_
].
rows
();
}
...
...
src/Engine/ModelBase.h
View file @
dd2bd24f
...
...
@@ -79,7 +79,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#ifndef MODEL_BASE_H
#define MODEL_BASE_H
#include "ReflectionOperatorEmpty.h"
#include "Vector.h"
#include "Sort.h"
#include "MemResolv.h"
...
...
@@ -109,7 +108,6 @@ public:
typedef
typename
ModelHelperType
::
BasisType
MyBasis
;
typedef
typename
ModelHelperType
::
BasisWithOperatorsType
BasisWithOperatorsType
;
typedef
typename
ModelHelperType
::
LeftRightSuperType
LeftRightSuperType
;
typedef
ReflectionOperatorEmpty
<
LeftRightSuperType
>
ReflectionSymmetryType
;
typedef
typename
OperatorsType
::
OperatorType
OperatorType
;
typedef
typename
OperatorType
::
StorageType
OperatorStorageType
;
typedef
typename
PsimagLite
::
Vector
<
OperatorType
>::
Type
VectorOperatorType
;
...
...
src/Engine/ParametersDmrgSolver.h
View file @
dd2bd24f
...
...
@@ -151,7 +151,6 @@ struct ParametersDmrgSolver {
SizeType
dumperBegin
;
SizeType
dumperEnd
;
SizeType
precision
;
int
useReflectionSymmetry
;
bool
autoRestart
;
PairRealSizeType
truncationControl
;
PsimagLite
::
String
filename
;
...
...
@@ -159,7 +158,6 @@ struct ParametersDmrgSolver {
PsimagLite
::
String
options
;
PsimagLite
::
String
model
;
PsimagLite
::
String
insitu
;
PsimagLite
::
String
fileForDensityMatrixEigs
;
PsimagLite
::
String
recoverySave
;
RestartStruct
checkpoint
;
typename
QnType
::
VectorQnType
adjustQuantumNumbers
;
...
...
@@ -182,14 +180,12 @@ struct ParametersDmrgSolver {
ioSerializer
.
write
(
root
+
"/dumperBegin"
,
dumperBegin
);
ioSerializer
.
write
(
root
+
"/dumperEnd"
,
dumperEnd
);
ioSerializer
.
write
(
root
+
"/precision"
,
precision
);
ioSerializer
.
write
(
root
+
"/useReflectionSymmetry"
,
useReflectionSymmetry
);
ioSerializer
.
write
(
root
+
"/truncationControl"
,
truncationControl
);
ioSerializer
.
write
(
root
+
"/filename"
,
filename
);
ioSerializer
.
write
(
root
+
"/version"
,
version
);
ioSerializer
.
write
(
root
+
"/options"
,
options
);
ioSerializer
.
write
(
root
+
"/model"
,
model
);
ioSerializer
.
write
(
root
+
"/insitu"
,
insitu
);
ioSerializer
.
write
(
root
+
"/fileForDensityMatrixEigs"
,
fileForDensityMatrixEigs
);
ioSerializer
.
write
(
root
+
"/recoverySave"
,
recoverySave
);
checkpoint
.
write
(
label
+
"/checkpoint"
,
ioSerializer
);
ioSerializer
.
write
(
root
+
"/adjustQuantumNumbers"
,
adjustQuantumNumbers
);
...
...
@@ -295,15 +291,6 @@ struct ParametersDmrgSolver {
throw
PsimagLite
::
RuntimeError
(
s
.
c_str
());
}
useReflectionSymmetry
=
0
;
try
{
io
.
readline
(
useReflectionSymmetry
,
"UseReflectionSymmetry="
);
}
catch
(
std
::
exception
&
)
{}
fileForDensityMatrixEigs
=
""
;
try
{
io
.
readline
(
fileForDensityMatrixEigs
,
"FileForDensityMatrixEigs="
);
}
catch
(
std
::
exception
&
)
{}
insitu
=
""
;
try
{
io
.
readline
(
insitu
,
"insitu="
);
...
...
src/Engine/Truncation.h
View file @
dd2bd24f
...
...
@@ -109,7 +109,6 @@ class Truncation {
typedef
typename
DensityMatrixBaseType
::
BlockDiagonalMatrixType
BlockDiagonalMatrixType
;
typedef
typename
TargetingType
::
ModelType
ModelType
;
typedef
typename
ModelType
::
GeometryType
GeometryType
;
typedef
typename
ModelType
::
ReflectionSymmetryType
ReflectionSymmetryType
;
typedef
typename
PsimagLite
::
Vector
<
RealType
>::
Type
VectorRealType
;
public:
...
...
@@ -126,13 +125,12 @@ public:
};
// TruncationCache
Truncation
(
ReflectionSymmetryType
&
reflectionOperator
,
Truncation
(
const
LeftRightSuperType
&
lrs
,
WaveFunctionTransfType
&
waveFunctionTransformation
,
const
ParametersType
&
parameters
,
const
GeometryType
&
geometry
,
IoOutType
&
ioOut
)
:
reflectionOperator_
(
reflectionOperator
),
lrs_
(
reflectionOperator_
.
leftRightSuper
()),
:
lrs_
(
lrs
),
waveFunctionTransformation_
(
waveFunctionTransformation
),
parameters_
(
parameters
),
geometry_
(
geometry
),
...
...
@@ -512,7 +510,6 @@ private:
++
counterVector_
[
index
];
}
ReflectionSymmetryType
&
reflectionOperator_
;
const
LeftRightSuperType
&
lrs_
;
WaveFunctionTransfType
&
waveFunctionTransformation_
;
const
ParametersType
&
parameters_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment