@@ -82,7 +82,7 @@ def __init__(self, triangulation, z, trifinder=None):
82
82
83
83
"""
84
84
85
- _docstringgradient = """
85
+ _docstringgradient = r """
86
86
Returns a list of 2 masked arrays containing interpolated derivatives
87
87
at the specified x,y points.
88
88
@@ -99,8 +99,8 @@ def __init__(self, triangulation, z, trifinder=None):
99
99
corresponding to (x,y) points outside of the triangulation
100
100
are masked out.
101
101
The first returned array contains the values of
102
- :math:`\\ frac{\\ partial z}{\ \ partial x}` and the second those of
103
- :math:`\\ frac{\\ partial z}{\ \ partial y}`.
102
+ :math:`\frac{\partial z}{\partial x}` and the second those of
103
+ :math:`\frac{\partial z}{\partial y}`.
104
104
105
105
"""
106
106
@@ -292,7 +292,7 @@ def _interpolate_single_key(self, return_key, tri_index, x, y):
292
292
293
293
294
294
class CubicTriInterpolator (TriInterpolator ):
295
- """
295
+ r """
296
296
A CubicTriInterpolator performs cubic interpolation on triangular grids.
297
297
298
298
In one-dimension - on a segment - a cubic interpolating function is
@@ -367,11 +367,11 @@ class CubicTriInterpolator(TriInterpolator):
367
367
368
368
.. math::
369
369
370
- E(z) = \\ \\ frac{1}{2} \\ int_{\\ Omega} \ \ left(
371
- \\ left( \\ frac{\\ partial^2{z}}{\\ partial{x}^2} \ \ right)^2 +
372
- \\ left( \\ frac{\\ partial^2{z}}{\\ partial{y}^2} \ \ right)^2 +
373
- 2 \\ left( \\ frac{\\ partial^2{z}}{\\ partial{y}\\ partial{x}}
374
- \\ right)^2 \\ right) dx \ \ ,dy
370
+ E(z) = \frac{1}{2} \int_{\Omega} \left(
371
+ \ left( \frac{\partial^2{z}}{\partial{x}^2} \right)^2 +
372
+ \ left( \frac{\partial^2{z}}{\partial{y}^2} \right)^2 +
373
+ 2\ left( \frac{\partial^2{z}}{\partial{y}\partial{x}} \right)^2
374
+ \right) dx \,dy
375
375
376
376
If the case *kind* ='geom' is chosen by the user, a simple geometric
377
377
approximation is used (weighted average of the triangle normal
@@ -1376,7 +1376,6 @@ def _cg(A, b, x0=None, tol=1.e-10, maxiter=1000):
1376
1376
1377
1377
1378
1378
# The following private functions:
1379
- # :func:`_inv22_vectorized`
1380
1379
# :func:`_safe_inv22_vectorized`
1381
1380
# :func:`_pseudo_inv22sym_vectorized`
1382
1381
# :func:`_prod_vectorized`
@@ -1387,20 +1386,6 @@ def _cg(A, b, x0=None, tol=1.e-10, maxiter=1000):
1387
1386
# :func:`_extract_submatrices`
1388
1387
# provide fast numpy implementation of some standard operations on arrays of
1389
1388
# matrices - stored as (:, n_rows, n_cols)-shaped np.arrays.
1390
- def _inv22_vectorized (M ):
1391
- """
1392
- Inversion of arrays of (2,2) matrices.
1393
- """
1394
- assert (M .ndim == 3 )
1395
- assert (M .shape [- 2 :] == (2 , 2 ))
1396
- M_inv = np .empty_like (M )
1397
- delta_inv = np .reciprocal (M [:, 0 , 0 ]* M [:, 1 , 1 ] - M [:, 0 , 1 ]* M [:, 1 , 0 ])
1398
- M_inv [:, 0 , 0 ] = M [:, 1 , 1 ]* delta_inv
1399
- M_inv [:, 0 , 1 ] = - M [:, 0 , 1 ]* delta_inv
1400
- M_inv [:, 1 , 0 ] = - M [:, 1 , 0 ]* delta_inv
1401
- M_inv [:, 1 , 1 ] = M [:, 0 , 0 ]* delta_inv
1402
- return M_inv
1403
-
1404
1389
1405
1390
# Development note: Dealing with pathologic 'flat' triangles in the
1406
1391
# CubicTriInterpolator code and impact on (2,2)-matrix inversion functions
0 commit comments