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
f1669fc0
Commit
f1669fc0
authored
Jan 03, 2020
by
Alvarez, Gonzalo
Browse files
ChemicalH: SuperOperatorHelper virtual structure
parent
5a5787ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Engine/SuperOp
erator
Helper.h
→
src/Engine/SuperOpHelper
Base
.h
View file @
f1669fc0
File moved
src/Models/GaugeSpin/SuperOpHelperPlaquette.h
0 → 100644
View file @
f1669fc0
#ifndef SUPEROPERATORHELPER_H
#define SUPEROPERATORHELPER_H
#include "ProgramGlobals.h"
#include "Vector.h"
namespace
Dmrg
{
template
<
typename
ModelType
>
class
SuperOperatorHelper
{
public:
typedef
PsimagLite
::
Vector
<
SizeType
>::
Type
VectorSizeType
;
typedef
std
::
pair
<
bool
,
SizeType
>
PairBoolSizeType
;
SuperOperatorHelper
(
const
ModelType
&
model
,
const
VectorSizeType
&
bigBlock
,
const
VectorSizeType
&
smallBlock
,
ProgramGlobals
::
DirectionEnum
dir
)
:
model_
(
model
),
bigBlock_
(
bigBlock
),
smallBlock_
(
smallBlock
),
dir_
(
dir
)
{
assert
(
smallBlock_
.
size
()
==
1
);
isTriangle_
=
(
smallBlock_
[
0
]
&
1
);
if
(
dir_
==
ProgramGlobals
::
DirectionEnum
::
EXPAND_SYSTEM
)
isTriangle_
=
!
isTriangle_
;
}
const
ProgramGlobals
::
DirectionEnum
&
dir
()
const
{
return
dir_
;
}
// This below is for a plaquette, and will have to be
// written somewhere else
// testing devel FIXME TODO
SizeType
size
()
const
{
return
1
;
}
PairBoolSizeType
leftOperatorIndex
(
SizeType
)
const
{
if
(
isTriangle_
)
{
if
(
dir_
==
ProgramGlobals
::
DirectionEnum
::
EXPAND_SYSTEM
)
{
return
PairBoolSizeType
(
true
,
0
);
}
else
{
return
PairBoolSizeType
(
false
,
0
);
}
}
return
PairBoolSizeType
(
false
,
0
);
}
PairBoolSizeType
rightOperatorIndex
(
SizeType
)
const
{
if
(
isTriangle_
)
{
if
(
dir_
==
ProgramGlobals
::
DirectionEnum
::
EXPAND_SYSTEM
)
{
return
PairBoolSizeType
(
false
,
0
);
}
else
{
return
PairBoolSizeType
(
false
,
0
);
}
}
return
PairBoolSizeType
(
false
,
0
);
}
private:
const
ModelType
&
model_
;
const
VectorSizeType
&
bigBlock_
;
const
VectorSizeType
&
smallBlock_
;
ProgramGlobals
::
DirectionEnum
dir_
;
bool
isTriangle_
;
};
}
#endif // SUPEROPERATORHELPER_H
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