wolfhece.assets.mesh

Module Contents

class wolfhece.assets.mesh.Mesh2D(src_header: wolfhece.wolf_array.header_wolf)[source]

Bases: wolfhece.wolf_array.header_wolf

Inheritance diagram of wolfhece.assets.mesh.Mesh2D

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

shape[source]
_factor = None[source]
plot_cells(ax: matplotlib.axes.Axes = None, transpose: bool = False, color='black', **kwargs)[source]

Plot the grid of the mesh.

plot_center_cells(ax: matplotlib.axes.Axes = None, color='black', linestyle='--', **kwargs)[source]

Plot lines centered to the cells.

set_ticks_as_dxdy(ax: matplotlib.axes.Axes = None, **kwargs)[source]

Set the ticks of the axis as the dx and dy of the mesh.

set_ticks_as_matrice(ax: matplotlib.axes.Axes = None, Fortran_type: bool = True, **kwargs)[source]

Set the ticks of the axis as the row and column of a matrice

plot_circle_at_centers(ax: matplotlib.axes.Axes = None, color='black', radius: float = None, **kwargs)[source]

Plot circles at the center of the cells.

plot_indices_at_centers(ax: matplotlib.axes.Axes = None, Fortran_type: bool = True, **kwargs)[source]

Plot the indices of the cells at the center of the cells.

plot_memoryposition_at_centers(ax: matplotlib.axes.Axes = None, transpose=False, Fortran_type: bool = True, f_contiguous: bool = True, **kwargs)[source]

Plot the position of the cells at the center of the cells.

plot_indices_at_bordersX(ax: matplotlib.axes.Axes = None, Fortran_type: bool = True, **kwargs)[source]

Plot the indices of the cells at the borders of the cells.

plot_indices_at_bordersY(ax: matplotlib.axes.Axes = None, Fortran_type: bool = True, **kwargs)[source]

Plot the indices of the cells at the borders of the cells.

plot_Xarrows_at_center(ax: matplotlib.axes.Axes = None, randomize: bool = False, amplitude: numpy.ndarray = None, color='black', **kwargs)[source]

Plot arrows at the center of the cells.

plot_Yarrows_at_center(ax: matplotlib.axes.Axes = None, randomize: bool = False, amplitude: numpy.ndarray = None, color='black', **kwargs)[source]

Plot arrows at the center of the cells.

plot_Xarrows_at_borders(ax: matplotlib.axes.Axes = None, randomize: bool = False, amplitudeX: numpy.ndarray = None, amplitudeY: numpy.ndarray = None, color='black', **kwargs)[source]

Plot arrows at the borders of the cells.

plot_Yarrows_at_borders(ax: matplotlib.axes.Axes = None, randomize: bool = False, amplitudeX: numpy.ndarray = None, amplitudeY: numpy.ndarray = None, color='black', **kwargs)[source]

Plot arrows at the borders of the cells.

plot_normal_arrows_at_borders(ax: matplotlib.axes.Axes = None, color='black', **kwargs)[source]

Plot arrows at the borders of the cells.

scale_axes(ax: matplotlib.axes.Axes = None, factor: float = 0.1, **kwargs)[source]

Scale the axes of the plot to fit the data.

plot_reconstructed_values_at_borders(ax: matplotlib.axes.Axes = None, colors=['green', 'blue', 'red', 'brown'], radius: float = None, **kwargs)[source]

Plot 4 small circles on each side of the border.

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)[source]

Plot 4 small circles on each side of the border.

set_aspect_labels(ax: matplotlib.axes.Axes = None, **kwargs)[source]

Set the aspect of the plot to be equal.

set_aspect_labels_matrice(ax: matplotlib.axes.Axes = None, **kwargs)[source]

Set the aspect of the plot to be equal.

zeros()[source]

Return a 2D array of zeros with the shape of the mesh.

ones()[source]

Return a 2D array of ones with the shape of the mesh.

zeros_bordersX()[source]

Return a 2D array of zeros with the shape of the mesh + 1 in x direction.

zeros_bordersY()[source]

Return a 2D array of zeros with the shape of the mesh + 1 in y direction.

ones_bordersX()[source]

Return a 2D array of ones with the shape of the mesh + 1 in x direction.

ones_bordersY()[source]

Return a 2D array of ones with the shape of the mesh + 1 in y direction.

apply_splitting_X(q: numpy.ndarray)[source]

Apply the splitting rule to the X direction.

apply_splitting_Y(q: numpy.ndarray)[source]

Apply the splitting rule to the Y direction.

scale_amplitude(amplitude: numpy.ndarray, factor: float = None)[source]

Scale the amplitude of the arrows.

plot_outside_domain(ax: matplotlib.axes.Axes = None, color='black', **kwargs)[source]

Plot a hashed zone outside of the domain.