# Assembly of Plate and Panel Models (`compmech.panel.assembly`)

class `compmech.panel.assembly.``PanelAssembly`(panels)

  Class for Panel Assemblies

  This class has some useful methods that will help plotting output for different panel groups within the assembly and so forth.

  Parameters: | panels : iterable A list, tuple etc of `Panel` objects.

  Methods

  `get_size`() |
  `plot`(c, group[, invert_y, vec, filename, ...]) | Contour plot for a Ritz constants vector.
  `uvw`(c, group[, gridx, gridy]) | Calculates the displacement field

  `plot`(c, group, invert_y=False, vec='w', filename='', ax=None, figsize=(3.5, 2.0), save=True, title='', identify=False, show_boundaries=False, boundary_line='--k', boundary_linewidth=1.0, colorbar=False, cbar_nticks=2, cbar_format=None, cbar_title='', cbar_fontsize=10, aspect='equal', clean=True, dpi=400, texts=[], xs=None, ys=None, gridx=50, gridy=50, num_levels=400, vecmin=None, vecmax=None, calc_data_only=False)

    Contour plot for a Ritz constants vector.

    Parameters: | c : np.ndarray The Ritz constants that will be used to compute the field contour. group : str A group to plot. Each panel in `panels` should contain an attribute `group`, which is used to identify which entities should be plotted together. vec : str, optional Can be one of the components: Displacement: `'u'`, `'v'`, `'w'`, `'phix'`, `'phiy'` Strain: `'exx'`, `'eyy'`, `'gxy'`, `'kxx'`, `'kyy'`, `'kxy'`, `'gyz'`, `'gxz'` Stress: `'Nxx'`, `'Nyy'`, `'Nxy'`, `'Mxx'`, `'Myy'`, `'Mxy'`, `'Qy'`, `'Qx'` invert_y : bool, optional Inverts the axis of the plot. save : bool, optional Flag telling whether the contour should be saved to an image file. dpi : int, optional Resolution of the saved file in dots per inch. filename : str, optional The file name for the generated image file. If no value is given, the parameter of the `Panel` object will be used. ax : AxesSubplot, optional When `ax` is given, the contour plot will be created inside it. figsize : tuple, optional The figure size given by `(width, height)`. title : str, optional If any string is given a title is added to the contour plot. indentify : bool, optional If domains should be identified. If yes, the name of each panel is used. show_boundaries : bool, optional If boundaries between domains should be drawn. boundary_line : str, optional Matplotlib string to define line type and color. boundary_linewidth : float, optional Matplotlib float to define line width. colorbar : bool, optional If a colorbar should be added to the contour plot. cbar_nticks : int, optional Number of ticks added to the colorbar. cbar_format : [ None | format string | Formatter object ], optional See the `matplotlib.pyplot.colorbar` documentation. cbar_fontsize : int, optional Fontsize of the colorbar labels. cbar_title : str, optional Colorbar title. If `cbar_title == ''` no title is added. aspect : str, optional String that will be passed to the `AxesSubplot.set_aspect()` method. clean : bool, optional Clean axes ticks, grids, spines etc. xs : np.ndarray, optional The positions where to calculate the displacement field. Default is `None` and the method `_default_field` is used. ys : np.ndarray, optional The `y` positions where to calculate the displacement field. Default is `None` and the method `_default_field` is used. gridx : int, optional Number of points along the axis where to calculate the displacement field. gridy : int, optional Number of points along the where to calculate the displacement field. num_levels : int, optional Number of contour levels (higher values make the contour smoother). vecmin : float, optional Minimum value for the contour scale (useful to compare with other results). If not specified it will be taken from the calculated field. vecmax : float, optional Maximum value for the contour scale. calc_data_only : bool, optional If only calculated data should be returned.
    Returns: | ax : matplotlib.axes.Axes The Matplotlib object that can be used to modify the current plot if needed. data : dict Data calculated during the plotting procedure.

  `uvw`(c, group, gridx=50, gridy=50)

    Calculates the displacement field

    For a given full set of Ritz constants `c`, the displacement field is calculated and stored in the parameters `u`, `v`, `w`, `phix`, `phiy` of the `Panel` object.

    Parameters: | c : float The full set of Ritz constants group : str A group to plot. Each panel in `panels` should contain an attribute `group`, which is used to identify which entities should be plotted together. gridx : int, optional Number of points along the axis where to calculate the displacement field. gridy : int, optional Number of points along the where to calculate the displacement field.
    Returns: | out : tuple A tuple of `np.ndarrays` containing `(xs, ys, u, v, w, phix, phiy)`.

    Notes

    The returned values `u``, `v`, `w`, `phix`, `phiy` are stored as parameters with the same name in the `Panel` object.