@@ -24,7 +24,7 @@ class Grid3Scales(Grid):
24
24
thickness, so that
25
25
26
26
.. math::
27
- z'(\chi) \approx \frac{L}{r}\chi , \quad \chi \in [-r, r].
27
+ z'(\chi) \approx \frac{L}{r}, \quad \chi \in [-r, r].
28
28
29
29
It is easier to find the derivative of a function that has these properties,
30
30
and then integrate it. We choose here
@@ -36,9 +36,9 @@ class Grid3Scales(Grid):
36
36
37
37
.. math::
38
38
f(\chi) \approx \begin{cases}
39
- \lambda_-,& \chi<-r,\\
39
+ 2 \lambda_-,& \chi<-r,\\
40
40
L/r,& -r<\chi<r,\\
41
- \lambda_+,& \chi>r.
41
+ 2 \lambda_+,& \chi>r.
42
42
\end{cases}
43
43
44
44
We choose :math:`f(\chi)` to be a sum of functions like
@@ -78,11 +78,11 @@ def __init__(
78
78
(and :math:`\rho_z` and :math:`\rho_\Vert`) directions.
79
79
tailLengthInside : float
80
80
Decay length of the solution's tail inside the wall. Should be larger
81
- than wallThickness*(1+2* smoothing)/ratioPointsWall. Should be
81
+ than wallThickness*(1/2+ smoothing)/ratioPointsWall. Should be
82
82
expressed in physical units (the units used in EffectivePotential).
83
83
tailLengthOutside : float
84
84
Decay length of the solution's tail outside the wall. Should be larger
85
- than wallThickness*(1+2* smoothing)/ratioPointsWall. Should be
85
+ than wallThickness*(1/2+ smoothing)/ratioPointsWall. Should be
86
86
expressed in physical units (the units used in EffectivePotential).
87
87
wallThickness : float
88
88
Thickness of the wall. Should be expressed in physical units
@@ -154,11 +154,11 @@ def _updateParameters(
154
154
assert wallThickness > 0 , "Grid3Scales error: wallThickness must be positive."
155
155
assert smoothing > 0 , "Grid3Scales error: smoothness must be positive."
156
156
assert (
157
- tailLengthInside > wallThickness * (1 + 2 * smoothing ) / ratioPointsWall
157
+ tailLengthInside > wallThickness * (1 / 2 + smoothing ) / ratioPointsWall
158
158
), """Grid3Scales error: tailLengthInside must be greater than
159
159
wallThickness*(1+2*smoothness)/ratioPointsWall."""
160
160
assert (
161
- tailLengthOutside > wallThickness * (1 + 2 * smoothing ) / ratioPointsWall
161
+ tailLengthOutside > wallThickness * (1 / 2 + smoothing ) / ratioPointsWall
162
162
), """Grid3Scales error: tailLengthOutside must be greater than
163
163
wallThickness*(1+2*smoothness)/ratioPointsWall."""
164
164
assert (
@@ -181,18 +181,18 @@ def _updateParameters(
181
181
* smoothing
182
182
* wallThickness
183
183
* ratioPointsWall ** 2
184
- * (ratioPointsWall * tailLengthInside - wallThickness * (1 + smoothing ))
184
+ * (2 * ratioPointsWall * tailLengthInside - wallThickness * (1 + smoothing ))
185
185
) / abs (
186
- ratioPointsWall * tailLengthInside - wallThickness * (1 + 2 * smoothing )
186
+ 2 * ratioPointsWall * tailLengthInside - wallThickness * (1 + 2 * smoothing )
187
187
)
188
188
self .aOut = np .sqrt (
189
189
4
190
190
* smoothing
191
191
* wallThickness
192
192
* ratioPointsWall ** 2
193
- * (ratioPointsWall * tailLengthOutside - wallThickness * (1 + smoothing ))
193
+ * (2 * ratioPointsWall * tailLengthOutside - wallThickness * (1 + smoothing ))
194
194
) / abs (
195
- ratioPointsWall * tailLengthOutside - wallThickness * (1 + 2 * smoothing )
195
+ 2 * ratioPointsWall * tailLengthOutside - wallThickness * (1 + 2 * smoothing )
196
196
)
197
197
198
198
def decompactify (
@@ -213,7 +213,7 @@ def decompactify(
213
213
214
214
def term1 (x : np .ndarray ) -> np .ndarray : # pylint: disable=invalid-name
215
215
return np .array ((1 - r )
216
- * (r * tailOut - L )
216
+ * (2 * r * tailOut - L )
217
217
* np .arctanh (
218
218
(1 - x + np .sqrt (aOut ** 2 + (x - r ) ** 2 ))
219
219
/ np .sqrt (aOut ** 2 + (1 - r ) ** 2 )
@@ -225,7 +225,7 @@ def term1(x: np.ndarray) -> np.ndarray: # pylint: disable=invalid-name
225
225
226
226
def term2 (x : np .ndarray ) -> np .ndarray : # pylint: disable=invalid-name
227
227
return np .array (- (1 + r )
228
- * (r * tailOut - L )
228
+ * (2 * r * tailOut - L )
229
229
* np .arctanh (
230
230
(1 + x - np .sqrt (aOut ** 2 + (x - r ) ** 2 ))
231
231
/ np .sqrt (aOut ** 2 + (1 + r ) ** 2 )
@@ -236,7 +236,7 @@ def term2(x: np.ndarray) -> np.ndarray: # pylint: disable=invalid-name
236
236
)
237
237
def term3 (x : np .ndarray ) -> np .ndarray : # pylint: disable=invalid-name
238
238
return np .array ((1 - r )
239
- * (r * tailIn - L )
239
+ * (2 * r * tailIn - L )
240
240
* np .arctanh (
241
241
(1 + x - np .sqrt (aIn ** 2 + (x + r ) ** 2 ))
242
242
/ np .sqrt (aIn ** 2 + (1 - r ) ** 2 )
@@ -247,7 +247,7 @@ def term3(x: np.ndarray) -> np.ndarray: # pylint: disable=invalid-name
247
247
)
248
248
def term4 (x : np .ndarray ) -> np .ndarray : # pylint: disable=invalid-name
249
249
return np .array (- (1 + r )
250
- * (r * tailIn - L )
250
+ * (2 * r * tailIn - L )
251
251
* np .arctanh (
252
252
(1 - x + np .sqrt (aIn ** 2 + (x + r ) ** 2 ))
253
253
/ np .sqrt (aIn ** 2 + (1 + r ) ** 2 )
@@ -257,7 +257,7 @@ def term4(x: np.ndarray) -> np.ndarray: # pylint: disable=invalid-name
257
257
/ r
258
258
)
259
259
def term5 (x : np .ndarray ) -> np .ndarray : # pylint: disable=invalid-name
260
- return np .array ((tailIn + tailOut - 4 * self .smoothing * L / r )
260
+ return np .array ((2 * tailIn + 2 * tailOut - 4 * self .smoothing * L / r )
261
261
* np .arctanh (x )
262
262
)
263
263
def totalMapping (x : np .ndarray ) -> np .ndarray : # pylint: disable=invalid-name
@@ -289,12 +289,12 @@ def compactificationDerivatives(
289
289
aOut = self .aOut
290
290
291
291
dzdzCompact = (
292
- (tailIn - L / r )
292
+ (2 * tailIn - L / r )
293
293
* (1 - (zCompact + r ) / np .sqrt (aIn ** 2 + (zCompact + r ) ** 2 ))
294
294
/ 2
295
295
)
296
296
dzdzCompact += (
297
- (tailOut - L / r )
297
+ (2 * tailOut - L / r )
298
298
* (1 + (zCompact - r ) / np .sqrt (aOut ** 2 + (zCompact - r ) ** 2 ))
299
299
/ 2
300
300
)
0 commit comments