wolfhece.assets.mesh ==================== .. py:module:: wolfhece.assets.mesh Module Contents --------------- .. py:class:: Mesh2D(src_header: wolfhece.wolf_array.header_wolf) Bases: :py:obj:`wolfhece.wolf_array.header_wolf` .. autoapi-inheritance-diagram:: wolfhece.assets.mesh.Mesh2D :parts: 1 :private-bases: Header of WolfArray In case of a mutliblock, the header have informations about all the blocks in head_blocks dictionnary. Block keys are generated by "getkeyblock" function .. py:attribute:: shape .. py:attribute:: _factor :value: None .. py:method:: plot_cells(ax: matplotlib.axes.Axes = None, transpose: bool = False, color='black', **kwargs) Plot the grid of the mesh. .. py:method:: plot_center_cells(ax: matplotlib.axes.Axes = None, color='black', linestyle='--', **kwargs) Plot lines centered to the cells. .. py:method:: set_ticks_as_dxdy(ax: matplotlib.axes.Axes = None, **kwargs) Set the ticks of the axis as the dx and dy of the mesh. .. py:method:: set_ticks_as_matrice(ax: matplotlib.axes.Axes = None, Fortran_type: bool = True, **kwargs) Set the ticks of the axis as the row and column of a matrice .. py:method:: plot_circle_at_centers(ax: matplotlib.axes.Axes = None, color='black', radius: float = None, **kwargs) Plot circles at the center of the cells. .. py:method:: plot_indices_at_centers(ax: matplotlib.axes.Axes = None, Fortran_type: bool = True, **kwargs) Plot the indices of the cells at the center of the cells. .. py:method:: plot_memoryposition_at_centers(ax: matplotlib.axes.Axes = None, transpose=False, Fortran_type: bool = True, f_contiguous: bool = True, **kwargs) Plot the position of the cells at the center of the cells. .. py:method:: plot_indices_at_bordersX(ax: matplotlib.axes.Axes = None, Fortran_type: bool = True, **kwargs) Plot the indices of the cells at the borders of the cells. .. py:method:: plot_indices_at_bordersY(ax: matplotlib.axes.Axes = None, Fortran_type: bool = True, **kwargs) Plot the indices of the cells at the borders of the cells. .. py:method:: plot_Xarrows_at_center(ax: matplotlib.axes.Axes = None, randomize: bool = False, amplitude: numpy.ndarray = None, color='black', **kwargs) Plot arrows at the center of the cells. .. py:method:: plot_Yarrows_at_center(ax: matplotlib.axes.Axes = None, randomize: bool = False, amplitude: numpy.ndarray = None, color='black', **kwargs) Plot arrows at the center of the cells. .. py:method:: plot_Xarrows_at_borders(ax: matplotlib.axes.Axes = None, randomize: bool = False, amplitudeX: numpy.ndarray = None, amplitudeY: numpy.ndarray = None, color='black', **kwargs) Plot arrows at the borders of the cells. .. py:method:: plot_Yarrows_at_borders(ax: matplotlib.axes.Axes = None, randomize: bool = False, amplitudeX: numpy.ndarray = None, amplitudeY: numpy.ndarray = None, color='black', **kwargs) Plot arrows at the borders of the cells. .. py:method:: plot_normal_arrows_at_borders(ax: matplotlib.axes.Axes = None, color='black', **kwargs) Plot arrows at the borders of the cells. .. py:method:: scale_axes(ax: matplotlib.axes.Axes = None, factor: float = 0.1, **kwargs) Scale the axes of the plot to fit the data. .. py:method:: plot_reconstructed_values_at_borders(ax: matplotlib.axes.Axes = None, colors=['green', 'blue', 'red', 'brown'], radius: float = None, **kwargs) Plot 4 small circles on each side of the border. .. py:method:: plot_splitted_values_at_borders(ax: matplotlib.axes.Axes = None, qx: numpy.ndarray = None, qy: numpy.ndarray = None, colors=['green', 'blue', 'red', 'brown'], radius: float = None, **kwargs) Plot 4 small circles on each side of the border. .. py:method:: set_aspect_labels(ax: matplotlib.axes.Axes = None, **kwargs) Set the aspect of the plot to be equal. .. py:method:: set_aspect_labels_matrice(ax: matplotlib.axes.Axes = None, **kwargs) Set the aspect of the plot to be equal. .. py:method:: zeros() Return a 2D array of zeros with the shape of the mesh. .. py:method:: ones() Return a 2D array of ones with the shape of the mesh. .. py:method:: zeros_bordersX() Return a 2D array of zeros with the shape of the mesh + 1 in x direction. .. py:method:: zeros_bordersY() Return a 2D array of zeros with the shape of the mesh + 1 in y direction. .. py:method:: ones_bordersX() Return a 2D array of ones with the shape of the mesh + 1 in x direction. .. py:method:: ones_bordersY() Return a 2D array of ones with the shape of the mesh + 1 in y direction. .. py:method:: apply_splitting_X(q: numpy.ndarray) Apply the splitting rule to the X direction. .. py:method:: apply_splitting_Y(q: numpy.ndarray) Apply the splitting rule to the Y direction. .. py:method:: scale_amplitude(amplitude: numpy.ndarray, factor: float = None) Scale the amplitude of the arrows. .. py:method:: plot_outside_domain(ax: matplotlib.axes.Axes = None, color='black', **kwargs) Plot a hashed zone outside of the domain.