| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/matplotlib/tri/__pycache__/ |
Upload File : |
�
G8�c�3 � �Z � d Z ddlZddlmZ ddlmZ ddlZ G d� d� Z G d� de� Z y) z'
Mesh refinement for triangular grids.
� N)�_api)�
Triangulationc � � e Zd ZdZd� Zy)�
TriRefinera{
Abstract base class for classes implementing mesh refinement.
A TriRefiner encapsulates a Triangulation object and provides tools for
mesh refinement and interpolation.
Derived classes must implement:
- ``refine_triangulation(return_tri_index=False, **kwargs)`` , where
the optional keyword arguments *kwargs* are defined in each
TriRefiner concrete implementation, and which returns:
- a refined triangulation,
- optionally (depending on *return_tri_index*), for each
point of the refined triangulation: the index of
the initial triangulation triangle to which it belongs.
- ``refine_field(z, triinterpolator=None, **kwargs)``, where:
- *z* array of field values (to refine) defined at the base
triangulation nodes,
- *triinterpolator* is an optional `~matplotlib.tri.TriInterpolator`,
- the other optional keyword arguments *kwargs* are defined in
each TriRefiner concrete implementation;
and which returns (as a tuple) a refined triangular mesh and the
interpolated values of the field at the refined triangulation nodes.
c �H � t j t |�� || _ y )N)�
triangulation)r �check_isinstancer �_triangulation)�selfr s �:/usr/lib/python3/dist-packages/matplotlib/tri/trirefine.py�__init__zTriRefiner.__init__* s � ����m�=�I�+��� N)�__name__�
__module__�__qualname__�__doc__r
� r r r r s � ��:,r r c �D � � e Zd ZdZ� fd�Zdd�Zdd�Zedd�� Z� xZ S ) �UniformTriRefinerz�
Uniform mesh refinement by recursive subdivisions.
Parameters
----------
triangulation : `~matplotlib.tri.Triangulation`
The encapsulated triangulation (to be refined)
c �$ �� t �| � |� y �N)�superr
)r r � __class__s �r r
zUniformTriRefiner.__init__= s �� �
����'r c �� � | j }|j j d }t j |t j
�� }t
|� D ] }| j ||� \ }}� |j j d }|j }|r�t j |dt j
�� } | j j }
|
�-t j |d� j dd� | |<