Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
usadelndsoc
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JYU Condensed Matter Theory
usadelndsoc
Commits
50c35bfe
Commit
50c35bfe
authored
11 months ago
by
patavirt
Browse files
Options
Downloads
Patches
Plain Diff
solver: fix cpr vs. singlet & solver reset
parent
1cda610f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
usadelndsoc/solver.py
+3
-2
3 additions, 2 deletions
usadelndsoc/solver.py
with
3 additions
and
2 deletions
usadelndsoc/solver.py
+
3
−
2
View file @
50c35bfe
...
@@ -1155,6 +1155,7 @@ def _self_consistent_Delta_f(
...
@@ -1155,6 +1155,7 @@ def _self_consistent_Delta_f(
mask
=
mask1
&
mask2
mask
=
mask1
&
mask2
solver
.
Delta
[
mask
]
=
singlet_m
(
Delta
[
mask
])
solver
.
Delta
[
mask
]
=
singlet_m
(
Delta
[
mask
])
solver
.
reset
()
if
workers
is
not
None
:
if
workers
is
not
None
:
jobs
=
[]
jobs
=
[]
...
@@ -1406,11 +1407,11 @@ def cpr(
...
@@ -1406,11 +1407,11 @@ def cpr(
# Corrector
# Corrector
def
constraint_fun
(
phi
,
Delta
):
def
constraint_fun
(
phi
,
Delta
):
# Pseudoarclength constraint
# Pseudoarclength constraint
Delta
[
phase_mask
]
=
Delta_00
[
phase_mask
]
*
np
.
exp
(
1j
*
phi
)
Delta
[
phase_mask
]
=
singlet
(
Delta_00
[
phase_mask
]
)
*
np
.
exp
(
1j
*
phi
)
m
=
solver
.
mask
==
MASK_NONE
m
=
solver
.
mask
==
MASK_NONE
dsa
=
theta
*
np
.
real
(
dsa
=
theta
*
np
.
real
(
np
.
vdot
(
dDelta
[
m
],
Delta
[
m
]
-
state
.
Deltas
[
-
1
][
m
])
np
.
vdot
(
singlet
(
dDelta
[
m
]
)
,
Delta
[
m
]
-
singlet
(
state
.
Deltas
[
-
1
][
m
])
)
)
)
dsb
=
(
1
-
theta
)
*
dphi
*
(
phi
-
state
.
phis
[
-
1
])
dsb
=
(
1
-
theta
)
*
dphi
*
(
phi
-
state
.
phis
[
-
1
])
dstot
=
dsa
+
dsb
dstot
=
dsa
+
dsb
...
...
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