-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfKAM_dict.py
91 lines (81 loc) · 2.9 KB
/
ConfKAM_dict.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
###################################################################################################
## Dictionary of parameters: https://github.com/cchandre/ConfKAM ##
###################################################################################################
import numpy as xp
Method = 'region'
#Method = 'line_norm'
Nxy = 512
r = 6
## 2D -- golden mean
# omega0 = [(xp.sqrt(5) - 1) / 2, -1]
# Omega = [1, 0]
# Dv = lambda phi, eps, omega: - omega[0] * eps[0] * xp.sin(phi[0]) - eps[1] * (omega[0] + omega[1]) * xp.sin(phi[0] + phi[1])
# CoordRegion = [[0.0, 0.35], [0, 0.12]]
# IndxLine = (0, 1)
# PolarAngles = [0.0, xp.pi / 2.0]
# CoordLine = [0.01, 0.028]
# ModesLine = (1, 1)
# DirLine = [1, 1]
## 3D -- spiral mean
sigma = 1.324717957244746
omega0 = [sigma, sigma ** 2, 1]
Omega = [1, 1, -1]
Dv = lambda phi, eps, omega: - omega[0] * eps[0] * xp.sin(phi[0]) - omega[1] * eps[1] * xp.sin(phi[1]) - omega[2] * eps[2] * xp.sin(phi[2])
CoordRegion = [[0.0, 0.15], [0.0, 0.40], [0.1, 0.1]]
IndxLine = (0, 1)
PolarAngles = [0.0, xp.pi / 2.0]
CoordLine = [0.0, 0.05]
ModesLine = (1, 1, 0)
DirLine = [1, 5, 0.1]
AdaptSize = True
Lmin = 2 ** 6
Lmax = 2 ** 8
TolMax = 1e+5 # recommended: 1e+5
TolMin = 1e-8 # recommended: 1e-8
Threshold = 1e-10 # recommended: 1e-10
MaxIter = 100 # recommended: 100
Type = 'cartesian'
ChoiceInitial = 'continuation'
MethodInitial = 'one_step'
AdaptEps = False
MinEps = 1e-6 # recommended: 1e-6
MonitorGrad = False
Precision = 64
SaveData = True
PlotResults = False
Parallelization = (True, 64)
###################################################################################################
## DO NOT EDIT BELOW ##
###################################################################################################
Precision = {32: xp.float32, 64: xp.float64, 128: xp.float128}.get(Precision, xp.float64)
dict = {'Method': 'compute_' + Method}
dict.update({
'Nxy': Nxy,
'r': r,
'omega0': xp.asarray(omega0, dtype=Precision),
'Omega': xp.asarray(Omega, dtype=Precision),
'Dv': Dv,
'CoordRegion': xp.asarray(CoordRegion, dtype=Precision),
'IndxLine': IndxLine,
'PolarAngles': xp.asarray(PolarAngles, dtype=Precision),
'CoordLine': CoordLine,
'ModesLine': xp.asarray(ModesLine),
'DirLine': xp.asarray(DirLine),
'AdaptSize': AdaptSize,
'Lmin': Lmin,
'Lmax': Lmax,
'TolMax': TolMax,
'TolMin': TolMin,
'Threshold': Threshold,
'MaxIter': MaxIter,
'Type': Type,
'ChoiceInitial': ChoiceInitial,
'MethodInitial': MethodInitial,
'AdaptEps': AdaptEps,
'MinEps': MinEps,
'MonitorGrad': MonitorGrad,
'Precision': Precision,
'SaveData': SaveData,
'PlotResults': PlotResults,
'Parallelization': Parallelization})
###################################################################################################