Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frtrglib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Bruch
frtrglib
Commits
8bb76fd7
Commit
8bb76fd7
authored
Jun 15, 2022
by
Valentin Bruch
Browse files
Options
Downloads
Patches
Plain Diff
more bug fixes in logging
parent
6371450e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
gen_data.py
+1
-1
1 addition, 1 deletion
gen_data.py
main.py
+1
-1
1 addition, 1 deletion
main.py
rtrg.py
+3
-6
3 additions, 6 deletions
rtrg.py
with
5 additions
and
8 deletions
gen_data.py
+
1
−
1
View file @
8bb76fd7
...
@@ -76,7 +76,7 @@ def main():
...
@@ -76,7 +76,7 @@ def main():
fourier_coef_group
=
parser
.
add_mutually_exclusive_group
()
fourier_coef_group
=
parser
.
add_mutually_exclusive_group
()
fourier_coef_group
.
add_argument
(
"
--vac
"
,
metavar
=
'
float
'
,
type
=
float
,
nargs
=
'
+
'
,
default
=
0.
,
help
=
"
Vac, units of Tk
"
)
fourier_coef_group
.
add_argument
(
"
--vac
"
,
metavar
=
'
float
'
,
type
=
float
,
nargs
=
'
+
'
,
default
=
0.
,
help
=
"
Vac, units of Tk
"
)
fourier_coef_group
.
add_argument
(
"
--fourier_coef
"
,
metavar
=
'
tuple
'
,
type
=
float
,
nargs
=
'
*
'
,
help
=
"
Voltage Fourier arguments, units of omega
"
)
fourier_coef_group
.
add_argument
(
"
--fourier_coef
"
,
metavar
=
'
tuple
'
,
type
=
float
,
nargs
=
'
*
'
,
help
=
"
Voltage Fourier arguments, units of omega
"
)
parser
.
add_argument
(
"
--d
"
,
metavar
=
'
float
'
,
type
=
float
,
default
=
1e9
,
help
=
"
D (UV cutoff), units of Tk
"
)
parser
.
add_argument
(
"
--d
"
,
metavar
=
'
float
'
,
type
=
float
,
nargs
=
'
+
'
,
default
=
1e9
,
help
=
"
D (UV cutoff), units of Tk
"
)
parser
.
add_argument
(
"
--xL
"
,
metavar
=
'
float
'
,
type
=
float
,
nargs
=
'
+
'
,
default
=
0.5
,
help
=
"
Asymmetry, 0 < xL < 1
"
)
parser
.
add_argument
(
"
--xL
"
,
metavar
=
'
float
'
,
type
=
float
,
nargs
=
'
+
'
,
default
=
0.5
,
help
=
"
Asymmetry, 0 < xL < 1
"
)
parser
.
add_argument
(
"
--compact
"
,
metavar
=
'
int
'
,
type
=
int
,
default
=
0
,
help
=
"
compact FRTRG implementation (0,1, or 2)
"
)
parser
.
add_argument
(
"
--compact
"
,
metavar
=
'
int
'
,
type
=
int
,
default
=
0
,
help
=
"
compact FRTRG implementation (0,1, or 2)
"
)
parser
.
add_argument
(
"
--filename
"
,
metavar
=
'
file
'
,
type
=
str
,
default
=
os
.
path
.
join
(
settings
.
BASEPATH
,
settings
.
FILENAME
),
help
=
"
h5 file to open
"
)
parser
.
add_argument
(
"
--filename
"
,
metavar
=
'
file
'
,
type
=
str
,
default
=
os
.
path
.
join
(
settings
.
BASEPATH
,
settings
.
FILENAME
),
help
=
"
h5 file to open
"
)
...
...
This diff is collapsed.
Click to expand it.
main.py
+
1
−
1
View file @
8bb76fd7
...
@@ -266,7 +266,7 @@ def check_convergence(dm, **parameters):
...
@@ -266,7 +266,7 @@ def check_convergence(dm, **parameters):
d_j
=
table
.
d
[
j
]
d_j
=
table
.
d
[
j
]
d_mu
=
table
.
d
[
mu
]
d_mu
=
table
.
d
[
mu
]
drtol
=
table
.
d
*
table
.
solver_tol_rel
drtol
=
table
.
d
*
table
.
solver_tol_rel
norm
=
mplcolors
.
LogNorm
(
drtol
.
min
(),
drtol
.
max
())
norm
=
mplcolors
.
LogNorm
(
max
(
drtol
.
min
(),
0.05
),
min
(
drtol
.
max
()
,
500
)
)
c_j
=
drtol
[
j
]
c_j
=
drtol
[
j
]
c_mu
=
drtol
[
mu
]
c_mu
=
drtol
[
mu
]
s_j
=
0.05
*
table
.
nmax
[
j
]
**
2
s_j
=
0.05
*
table
.
nmax
[
j
]
**
2
...
...
This diff is collapsed.
Click to expand it.
rtrg.py
+
3
−
6
View file @
8bb76fd7
...
@@ -5,9 +5,7 @@ Copyright 2021 Valentin Bruch
...
@@ -5,9 +5,7 @@ Copyright 2021 Valentin Bruch
License: MIT
License: MIT
'''
'''
import
sys
import
numpy
as
np
import
numpy
as
np
from
traceback
import
print_exc
from
numbers
import
Number
from
numbers
import
Number
from
scipy.interpolate
import
interp1d
from
scipy.interpolate
import
interp1d
import
settings
import
settings
...
@@ -17,7 +15,7 @@ if settings.USE_CUBLAS:
...
@@ -17,7 +15,7 @@ if settings.USE_CUBLAS:
try
:
try
:
import
rtrg_cublas
as
rtrg_c
import
rtrg_cublas
as
rtrg_c
except
:
except
:
settings
.
logger
.
warning
(
"
failed to load rtrg_cublas, falling back to rtrg_c
"
,
file
=
sys
.
stderr
)
settings
.
logger
.
warning
(
"
failed to load rtrg_cublas, falling back to rtrg_c
"
)
import
rtrg_c
import
rtrg_c
else
:
else
:
import
rtrg_c
import
rtrg_c
...
@@ -53,7 +51,7 @@ class GlobalRGproperties:
...
@@ -53,7 +51,7 @@ class GlobalRGproperties:
voltage_branches = 0
voltage_branches = 0
vdc = 0 or mu = 0
vdc = 0 or mu = 0
'''
'''
#
settings.logger.
info
('Created new GlobalRGproperties object'
, flush=True
)
settings
.
logger
.
debug
(
'
Created new GlobalRGproperties object
'
)
self
.
__dict__
.
update
(
kwargs
)
self
.
__dict__
.
update
(
kwargs
)
def
__getattr__
(
self
,
name
):
def
__getattr__
(
self
,
name
):
...
@@ -516,8 +514,7 @@ class RGfunction(RGobj):
...
@@ -516,8 +514,7 @@ class RGfunction(RGobj):
if
settings
.
VERBOSE
:
if
settings
.
VERBOSE
:
RGfunction
.
INV_COUNTER
[
self
.
_values
.
T
.
flags
.
c_contiguous
|
(
self
.
_values
.
T
.
flags
.
f_contiguous
<<
1
)]
+=
1
RGfunction
.
INV_COUNTER
[
self
.
_values
.
T
.
flags
.
c_contiguous
|
(
self
.
_values
.
T
.
flags
.
f_contiguous
<<
1
)]
+=
1
except
:
except
:
settings
.
logger
.
warning
(
"
padded inversion failed
"
,
file
=
sys
.
stderr
)
settings
.
logger
.
exception
(
"
padded inversion failed
"
)
print_exc
()
res
=
np
.
linalg
.
inv
(
self
.
_values
)
res
=
np
.
linalg
.
inv
(
self
.
_values
)
return
RGfunction
(
self
.
global_properties
,
res
,
self
.
voltage_shifts
,
self
.
symmetry
)
return
RGfunction
(
self
.
global_properties
,
res
,
self
.
voltage_shifts
,
self
.
symmetry
)
...
...
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