Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RBComb simulation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pascal Engeler
RBComb simulation
Commits
d271c57b
Commit
d271c57b
authored
5 years ago
by
Pascal Engeler
Browse files
Options
Downloads
Patches
Plain Diff
Fixed vortex calculation
parent
bdc5c636
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/braidingTightBinding/include/coupler_braid.hpp
+6
-3
6 additions, 3 deletions
projects/braidingTightBinding/include/coupler_braid.hpp
projects/braidingTightBinding/include/vortex.hpp
+6
-4
6 additions, 4 deletions
projects/braidingTightBinding/include/vortex.hpp
with
12 additions
and
7 deletions
projects/braidingTightBinding/include/coupler_braid.hpp
+
6
−
3
View file @
d271c57b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define COUPLER_BRAID_HPP_INCLUDED
#define COUPLER_BRAID_HPP_INCLUDED
#include
<vector>
#include
<vector>
#include
<vortex.hpp>
#include
<vortex.hpp>
#include
<complex>
template
<
typename
value_t
,
typename
drum_t
,
typename
params_t
>
template
<
typename
value_t
,
typename
drum_t
,
typename
params_t
>
class
CouplerBraid
:
public
Coupler
<
value_t
,
drum_t
>
{
class
CouplerBraid
:
public
Coupler
<
value_t
,
drum_t
>
{
...
@@ -40,12 +41,14 @@ class CouplerBraid: public Coupler<value_t, drum_t>{
...
@@ -40,12 +41,14 @@ class CouplerBraid: public Coupler<value_t, drum_t>{
if
(
params_
[
drum_index
].
sublattice
==
'B'
)
if
(
params_
[
drum_index
].
sublattice
==
'B'
)
v
=
v
-
s
;
v
=
v
-
s
;
value_t
ret_val
=
1.
;
//vortices are multiplicative
std
::
complex
<
value_t
>
ret_val
=
1.
;
//vortices are multiplicative
for
(
auto
tex
:
vortices_
){
for
(
auto
tex
:
vortices_
){
ret_val
*=
tex
(
v
,
s
);
ret_val
*=
tex
.
distortion
(
v
);
}
}
//add kekule
ret_val
*=
vortices_
.
begin
()
->
kekule
(
v
,
s
);
return
1.
+
ret_val
;
//return with added offset, as in eliska's code
return
1.
+
std
::
real
<
value_t
>
(
ret_val
)
;
//return with added offset, as in eliska's code
}
}
private
:
private
:
...
...
This diff is collapsed.
Click to expand it.
projects/braidingTightBinding/include/vortex.hpp
+
6
−
4
View file @
d271c57b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define VORTEX_HPP_INCLUDED
#define VORTEX_HPP_INCLUDED
#include
<vec2.hpp>
#include
<vec2.hpp>
#include
<cmath>
#include
<cmath>
#include
<complex>
template
<
typename
value_t
>
template
<
typename
value_t
>
class
Vortex
{
class
Vortex
{
...
@@ -31,11 +32,12 @@ class Vortex{
...
@@ -31,11 +32,12 @@ class Vortex{
//functional
//functional
//there is no divide_by_zero check for efficiency reasons. l0_ can not be zero upon call.
//there is no divide_by_zero check for efficiency reasons. l0_ can not be zero upon call.
value_t
operator
()
(
const
Vec2
<
value_t
>&
v
,
const
Vec2
<
value_t
>&
s
)
std
::
complex
<
value_t
>
distortion
(
const
Vec2
<
value_t
>&
v
)
const
{
{
value_t
prefactor
=
delta_
*
std
::
tanh
(
v
.
r_wrt
(
position_
)
/
l0_
);
return
std
::
polar
<
value_t
>
(
delta_
*
std
::
tanh
(
v
.
r_wrt
(
position_
)
/
l0_
),
alpha_
-
v
.
phi_wrt
(
position_
));
value_t
cosine
=
std
::
cos
(
alpha_
-
v
.
phi_wrt
(
position_
)
+
K_
*
(
s
+
2.
*
(
v
-
position_
)));
}
return
prefactor
*
cosine
;
std
::
complex
<
value_t
>
kekule
(
const
Vec2
<
value_t
>&
v
,
const
Vec2
<
value_t
>&
s
)
const
{
return
std
::
polar
<
value_t
>
(
1.
,
K_
*
(
s
+
2.
*
(
v
-
position_
)));
}
}
private
:
private
:
Vec2
<
value_t
>
position_
;
Vec2
<
value_t
>
position_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment