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
bdc0680b
Commit
bdc0680b
authored
Dec 27, 2019
by
Alvarez, Gonzalo
Browse files
Operators: clean up
parent
6cff7e2f
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/Engine/BasisWithOperators.h
View file @
bdc0680b
...
...
@@ -215,7 +215,7 @@ public:
}
template
<
typename
SomeModelType
>
void
set
Various
(
const
VectorSizeType
&
block
,
void
set
OneSite
(
const
VectorSizeType
&
block
,
const
SomeModelType
&
model
,
RealType
time
)
{
...
...
@@ -319,7 +319,7 @@ private:
typename
PsimagLite
::
Vector
<
RealType
>::
Type
fermionicSigns
;
SizeType
x
=
basis2
.
numberOfLocalOperators
()
+
basis3
.
numberOfLocalOperators
();
operators_
.
setToProduct
(
x
);
operators_
.
setToProduct
(
basis2
,
basis3
,
x
);
ApplyFactors
<
FactorsType
>
apply
(
BasisType
::
getFactors
(),
BasisType
::
useSu2Symmetry
());
ProgramGlobals
::
FermionOrBosonEnum
savedSign
=
ProgramGlobals
::
FermionOrBosonEnum
::
BOSON
;
...
...
@@ -336,12 +336,12 @@ private:
savedSign
=
myOp
.
fermionOrBoson
();
}
operators_
.
externalProduct
(
i
,
myOp
,
basis3
.
size
(),
fermionicSigns
,
true
,
BaseType
::
permutationInverse
());
operators_
.
crossProductForLocal
(
i
,
myOp
,
basis3
.
size
(),
fermionicSigns
,
true
,
BaseType
::
permutationInverse
());
}
else
{
const
OperatorType
&
myOp
=
basis3
.
...
...
@@ -357,12 +357,12 @@ private:
savedSign
=
myOp
.
fermionOrBoson
();
}
operators_
.
externalProduct
(
i
,
myOp
,
basis2
.
size
(),
fermionicSigns
,
false
,
BaseType
::
permutationInverse
());
operators_
.
crossProductForLocal
(
i
,
myOp
,
basis2
.
size
(),
fermionicSigns
,
false
,
BaseType
::
permutationInverse
());
}
}
...
...
src/Engine/DmrgSolver.h
View file @
bdc0680b
...
...
@@ -245,8 +245,8 @@ public:
}
else
{
// move this block elsewhere:
RealType
time
=
0
;
pE
.
set
Various
(
E
,
model_
,
time
);
pS
.
set
Various
(
S
,
model_
,
time
);
pE
.
set
OneSite
(
E
,
model_
,
time
);
pS
.
set
OneSite
(
S
,
model_
,
time
);
infiniteDmrgLoop
(
X
,
Y
,
E
,
pS
,
pE
,
psi
);
}
...
...
src/Engine/LeftRightSuper.h
View file @
bdc0680b
...
...
@@ -363,7 +363,7 @@ private:
{
BasisWithOperatorsType
Xbasis
(
"Xbasis"
);
typedef
LeftRightSuper
<
BasisWithOperatorsType
,
BasisType
>
LeftRightSuper2Type
;
Xbasis
.
set
Various
(
X
,
model
,
time
);
Xbasis
.
set
OneSite
(
X
,
model
,
time
);
leftOrRight
.
setToProduct
(
pS
,
Xbasis
,
dir
);
SparseMatrixType
matrix
=
leftOrRight
.
hamiltonian
().
getCRS
();
...
...
src/Engine/Operators.h
View file @
bdc0680b
...
...
@@ -300,12 +300,9 @@ public:
ChangeOfBasisType
::
changeBasis
(
hamiltonian_
,
ftransform
);
}
void
setMomentumOfOperators
(
const
VectorSizeType
&
momentum
)
{
momentumOfOperators_
=
momentum
;
}
void
setToProduct
(
SizeType
x
)
void
setToProduct
(
const
BasisType
&
basis1
,
const
BasisType
&
basis2
,
SizeType
x
)
{
operators_
.
resize
(
x
);
}
...
...
@@ -334,12 +331,12 @@ public:
internal degree of freedom $\sigma$. See PTEXREF{setToProductOps}
and PTEXREF{HERE}.
*/
void
externalProduct
(
SizeType
i
,
const
OperatorType
&
m
,
int
x
,
const
VectorRealType
&
fermionicSigns
,
bool
option
,
const
VectorSizeType
&
permutationFull
)
void
crossProductForLocal
(
SizeType
i
,
const
OperatorType
&
m
,
int
x
,
const
VectorRealType
&
fermionicSigns
,
bool
option
,
const
VectorSizeType
&
permutationFull
)
{
assert
(
!
BasisType
::
useSu2Symmetry
());
operators_
[
i
].
outerProduct
(
m
,
...
...
@@ -459,7 +456,6 @@ private:
typename
PsimagLite
::
Vector
<
OperatorType
>::
Type
operators_
;
StorageType
hamiltonian_
;
PsimagLite
::
ProgressIndicator
progress_
;
VectorSizeType
momentumOfOperators_
;
};
//class Operators
template
<
typename
T
>
...
...
src/Engine/TargetingBase.h
View file @
bdc0680b
...
...
@@ -231,7 +231,7 @@ public:
if
(
X
[
0
]
!=
0
&&
X
[
0
]
!=
lrs_
.
super
().
block
().
size
()
-
1
)
return
;
basisWithOps
.
set
Various
(
X
,
model_
,
commonTargeting_
.
aoe
().
time
());
basisWithOps
.
set
OneSite
(
X
,
model_
,
commonTargeting_
.
aoe
().
time
());
}
virtual
bool
end
()
const
...
...
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