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
758bf48e
Commit
758bf48e
authored
Jan 03, 2020
by
Alvarez, Gonzalo
Browse files
ChemicalH: needs distinction between super and non-super
parent
b5ad647c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Engine/ManyToTwoConnection.h
View file @
758bf48e
...
...
@@ -29,7 +29,7 @@ public:
mods_
=
PairCharType
(
oneLink
.
mods
[
0
],
oneLink
.
mods
[
1
]);
}
const
PairSizeType
&
finalIndices
()
const
{
return
finalIndices_
;
}
//
const PairSizeType& finalIndices() const { return finalIndices_; }
const
PairCharType
&
finalMods
()
const
{
return
mods_
;
}
...
...
@@ -93,7 +93,7 @@ private:
SizeType
i
=
PsimagLite
::
indexOrMinusOne
(
lrs_
.
super
().
block
(),
hItems
[
0
]);
SizeType
j
=
PsimagLite
::
indexOrMinusOne
(
lrs_
.
super
().
block
(),
hItems
[
1
]);
int
offset
=
lrs_
.
left
().
block
().
size
();
const
SizeType
offset
=
lrs_
.
left
().
block
().
size
();
SizeType
site1Corrected
=
(
type
==
ProgramGlobals
::
ConnectionEnum
::
SYSTEM_ENVIRON
)
?
i
:
i
-
offset
;
...
...
@@ -138,8 +138,29 @@ private:
assert
(
sysSites
.
size
()
>
0
);
assert
(
envSites
.
size
()
>
0
);
const
SizeType
finalLeft
=
superOpHelper
.
leftIndex
(
sysSites
,
oneLink_
.
indices
[
0
]);
const
SizeType
finalRight
=
superOpHelper
.
leftIndex
(
sysSites
,
oneLink_
.
indices
[
1
]);
SizeType
finalLeft
=
0
;
if
(
sysSites
.
size
()
==
1
)
{
SizeType
site1Corrected
=
PsimagLite
::
indexOrMinusOne
(
lrs_
.
super
().
block
(),
sysSites
[
0
]);
finalLeft
=
finalIndex
(
ProgramGlobals
::
SysOrEnvEnum
::
SYSTEM
,
site1Corrected
,
oneLink_
.
indices
[
0
]);
}
else
{
finalLeft
=
superOpHelper
.
leftIndex
(
sysSites
,
oneLink_
.
indices
[
0
]);
}
SizeType
finalRight
=
0
;
if
(
envSites
.
size
()
==
1
)
{
SizeType
jj
=
PsimagLite
::
indexOrMinusOne
(
lrs_
.
super
().
block
(),
envSites
[
0
]);
SizeType
site2Corrected
=
jj
-
lrs_
.
left
().
block
().
size
();
finalRight
=
finalIndex
(
ProgramGlobals
::
SysOrEnvEnum
::
ENVIRON
,
site2Corrected
,
oneLink_
.
indices
[
1
]);
}
else
{
finalRight
=
superOpHelper
.
rightIndex
(
envSites
,
oneLink_
.
indices
[
1
]);
}
return
PairSizeType
(
finalLeft
,
finalRight
);
}
...
...
src/Engine/SuperOpHelperBase.h
View file @
758bf48e
...
...
@@ -44,6 +44,11 @@ public:
throw
PsimagLite
::
RuntimeError
(
"SuperOpHelperBase::leftIndex
\n
"
);
}
virtual
SizeType
rightIndex
(
VectorSizeType
&
,
SizeType
)
const
{
throw
PsimagLite
::
RuntimeError
(
"SuperOpHelperBase::rightIndex
\n
"
);
}
// non virtual below
const
SuperGeometryType
&
superGeometry
()
const
...
...
src/Models/GaugeSpin/SuperOpHelperPlaquette.h
View file @
758bf48e
...
...
@@ -62,6 +62,19 @@ public:
return
PairBoolSizeType
(
false
,
0
);
}
SizeType
leftIndex
(
VectorSizeType
&
sysSites
,
SizeType
)
const
{
SizeType
last
=
sysSites
.
size
();
assert
(
last
>
0
);
--
last
;
}
SizeType
rightIndex
(
VectorSizeType
&
,
SizeType
)
const
{
throw
PsimagLite
::
RuntimeError
(
"SuperOpHelperBase::rightIndex
\n
"
);
}
private:
SizeType
smaxOrEmin_
;
...
...
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