8000 patch update · matplotlib/matplotlib@a9a0feb · GitHub
[go: up one dir, main page]

Skip to content

Commit a9a0feb

Browse files
committed
patch update
1 parent 14f05bb commit a9a0feb

File tree

2 files changed

+32
-35
lines changed

2 files changed

+32
-35
lines changed

lib/matplotlib/tests/test_triangulation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,6 @@ def z(x, y):
711711
triang0.set_mask(mask)
712712

713713
# Then the plot
714-
plt.title("Refined tricontouring, subdiv=4")
715714
refiner = mtri.UniformTriRefiner(triang0)
716715
tri_refi, z_test_refi = refiner.refine_field(z0, subdiv=4)
717716
levels = np.arange(0., 1., 0.025)
@@ -770,8 +769,6 @@ def dipole_potential(x, y):
770769
plt.quiver(triang.x, triang.y, Ex/E_norm, Ey/E_norm,
771770
units='xy', scale=10., zorder=3, color='blue',
772771
width=0.007, headwidth=3., headlength=4.)
773-
774-
plt.title('Gradient plot: an electrical dipole')
775772
plt.show()
776773

777774

lib/matplotlib/tri/triinterpolate.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def _interpolate_single_key(self, return_key, tri_index, x, y):
463463
else:
464464
raise ValueError("Invalid return_key: " + return_key)
465465

466-
def _compute_dof(self, kind, dz):
466+
def _compute_dof(self, kind, dz=None):
467467
"""
468468
Computes and returns nodal dofs according to kind
469469
@@ -604,28 +604,28 @@ def _compute_tri_eccentricities(tris_pts):
604604
# problem (Reduced HCT element)
605605
class _ReducedHCT_Element():
606606
"""
607-
Implementation of reduced HCT triangular element with explicit shape
608-
functions.
607+
Implementation of reduced HCT triangular element with explicit shape
608+
functions.
609609
610-
Computes z, dz, d2z and the element stiffness matrix for bending energy:
611-
E(f) = integral( (d2z/dx2 + d2z/dy2)**2 dA)
610+
Computes z, dz, d2z and the element stiffness matrix for bending energy:
611+
E(f) = integral( (d2z/dx2 + d2z/dy2)**2 dA)
612612
613-
*** Reference for the shape functions: ***
614-
[1] Basis functions for general Hsieh-Clough-Tocher _triangles, complete or
615-
reduced.
616-
Michel Bernadou, Kamal Hassan
617-
International Journal for Numerical Methods in Engineering.
618-
17(5):784 - 789. 2.01
613+
*** Reference for the shape functions: ***
614+
[1] Basis functions for general Hsieh-Clough-Tocher _triangles, complete or
615+
reduced.
616+
Michel Bernadou, Kamal Hassan
617+
International Journal for Numerical Methods in Engineering.
618+
17(5):784 - 789. 2.01
619619
620-
*** Element description: ***
621-
9 dofs: z and dz given at 3 apex
622-
C1 (conform)
620+
*** Element description: ***
621+
9 dofs: z and dz given at 3 apex
622+
C1 (conform)
623623
624624
"""
625625
# 1) Loads matrices to generate shape functions as a function of
626626
# triangle eccentricities - based on [1] p.11 '''
627627
M = np.array([
628-
[0.00, 0.00, 0.00, 4.50, 4.50, 0.00, 0.00, 0.00, 0.00, 0.00],
628+
[ 0.00, 0.00, 0.00, 4.50, 4.50, 0.00, 0.00, 0.00, 0.00, 0.00],
629629
[-0.25, 0.00, 0.00, 0.50, 1.25, 0.00, 0.00, 0.00, 0.00, 0.00],
630630
[-0.25, 0.00, 0.00, 1.25, 0.50, 0.00, 0.00, 0.00, 0.00, 0.00],
631631
[ 0.50, 1.00, 0.00, -1.50, 0.00, 3.00, 3.00, 0.00, 0.00, 3.00],
@@ -942,7 +942,7 @@ def get_Kff_and_Ff(self, J, ecc, triangles, Uc):
942942
minimization of curvature energy with value of function at node
943943
imposed and derivatives 'free'.
944944
Builds the global Kff matrix in cco format.
945-
Builds the full Ff vec Ff = - Kfc x Uc
945+
Builds the full Ff vec Ff = - Kfc x Uc
946946
947947
Parameters
948948
----------
@@ -1048,17 +1048,17 @@ def compute_dof_from_df(self):
10481048
@staticmethod
10491049
def get_dof_vec(tri_z, tri_dz, J):
10501050
"""
1051-
Computes the dof vector of a triangle, knowing the value of f, df and of the
1052-
local Jacobian at each node.
1051+
Computes the dof vector of a triangle, knowing the value of f, df and
1052+
of the local Jacobian at each node.
10531053
1054-
*tri_z*: array of shape (3,) of f nodal values
1055-
*tri_dz*: array of shape (3,2) of df/dx, df/dy nodal values
1056-
*J*: Jacobian matrix in local basis of apex 0
1054+
*tri_z*: array of shape (3,) of f nodal values
1055+
*tri_dz*: array of shape (3,2) of df/dx, df/dy nodal values
1056+
*J*: Jacobian matrix in local basis of apex 0
10571057
1058-
Returns dof array of shape (9,) so that for each apex iapex:
1059-
dof[iapex*3+0] = f(Ai)
1060-
dof[iapex*3+1] = df(Ai).(AiAi+)
1061-
dof[iapex*3+2] = df(Ai).(AiAi-)]
1058+
Returns dof array of shape (9,) so that for each apex iapex:
1059+
dof[iapex*3+0] = f(Ai)
1060+
dof[iapex*3+1] = df(Ai).(AiAi+)
1061+
dof[iapex*3+2] = df(Ai).(AiAi-)]
10621062
"""
10631063
npt = tri_z.shape[0]
10641064
dof = np.zeros([npt, 9], dtype=np.float64)
@@ -1311,28 +1311,28 @@ def _cg(A, b, x0=None, tol=1.e-10, maxiter=1000):
13111311
13121312
Parameters
13131313
----------
1314-
*A*: _Sparse_Matrix_coo
1314+
A: _Sparse_Matrix_coo
13151315
*A* must have been compressed before by compress_csc or
13161316
compress_csr method.
13171317
1318-
*b*: array
1318+
b: array
13191319
Right hand side of the linear system.
13201320
13211321
Returns
13221322
----------
1323-
*x*: array.
1323+
x: array.
13241324
The converged solution.
1325-
*err*: float
1325+
err: float
13261326
The absolute error np.linalg.norm(A.dot(x) - b)
13271327
13281328
Other parameters
13291329
----------
1330-
*x0*: array.
1330+
x0: array.
13311331
Starting guess for the solution.
1332-
*tol*: float.
1332+
tol: float.
13331333
Tolerance to achieve. The algorithm terminates when the relative
13341334
residual is below tol.
1335-
*maxiter*: integer.
1335+
maxiter: integer.
13361336
Maximum number of iterations. Iteration will stop
13371337
after maxiter steps even if the specified tolerance has not
13381338
been achieved.

0 commit comments

Comments
 (0)
0