wolfhece.report.simplesimgpu ============================ .. py:module:: wolfhece.report.simplesimgpu .. autoapi-nested-parse:: Create a report on a simple simulation from wolfgpu Module Contents --------------- .. py:function:: cm2pts(cm) Convert centimeters to points for PyMuPDF. One point equals 1/72 inches. .. py:function:: A4_rect() Return the A4 rectangle in PyMuPDF units. (0, 0) is the top-left corner in PyMuPDF coordinates. .. py:function:: rect_cm(x, y, width, height) Create a rectangle in PyMuPDF units from centimeters. (0, 0) is the top-left corner in PyMuPDF coordinates. .. py:function:: get_rect_from_text(text, width, fontsize=10, padding=5) Get a rectangle that fits the text in PyMuPDF units. :param text: The text to fit in the rectangle. :param width: The width of the rectangle in centimeters. :param fontsize: The font size in points. :param padding: Padding around the text in points. :return: A PyMuPDF rectangle that fits the text. .. py:function:: list_to_html(list_items, font_size='10pt', font_family='Helvetica') .. py:function:: list_to_html_aligned(list_items, font_size='10pt', font_family='Helvetica') .. py:class:: SimpleSimGPU_Report(sim: wolfgpu.simple_simulation.SimpleSimulation | pathlib.Path | str, **kwargs) .. py:attribute:: _doc :value: None .. py:attribute:: _summary .. py:method:: _summary_versions() Find the versions of the simulation, wolfhece and the wolfgpu package .. py:method:: _summary_spatial_extent() Return the summary of the spatial extent of the simulation .. py:method:: _summary_number_of_cells() Return the summary of the number of cells in the simulation .. py:method:: _summary_time_evolution() Return the summary of the time evolution of the simulation .. py:method:: _summary_boundary_conditions() Return the summary of the boundary conditions of the simulation .. py:method:: _summary_infiltration() Return the summary of the infiltration conditions of the simulation .. py:method:: _figure_infiltration() Add the infiltration image to the PDF report .. py:method:: _summary_bathymetry() Return the summary of the bathymetry of the simulation .. py:method:: _summary_initial_conditions() Return the summary of the initial conditions of the simulation .. py:method:: _figure_histogram_waterdepth() Add the histogram of bathymetry to the PDF report .. py:method:: _figure_histogram_manning() Add the histogram of bathymetry to the PDF report .. py:method:: _summary_bridge() Return the summary of the bridge conditions of the simulation .. py:method:: _summary_warnings() Return the summary of the warnings of the simulation .. py:method:: _summary_errors() Return the summary of the errors of the simulation .. py:method:: _figure_model_extent() Get the bathymetry figure for the PDF report .. py:method:: summary() Create a dictionnary with the summary of the simulation .. py:method:: _layout() Set the layout of the PDF report. Each group has a rectangle of 9cm width and 2.5 cm height. Title rect is 16 cm width and 1.5 cm height. Version rect is 16 cm width and 1 cm height. Logo is at the top-right corner of the page (2 cm width x 3 cm height). .. py:method:: create_report() Create the PDF report for the Simple Simulation GPU .. py:method:: save_report(output_path: pathlib.Path | str = None) Save the report to a PDF file .. py:property:: pdf_path Return the PDF document .. py:class:: SimpleSimGPU_Report_wx(sim: wolfgpu.simple_simulation.SimpleSimulation | pathlib.Path | str, **kwargs) Bases: :py:obj:`wolfhece.report.pdf.PDFViewer` .. autoapi-inheritance-diagram:: wolfhece.report.simplesimgpu.SimpleSimGPU_Report_wx :parts: 1 :private-bases: A sized frame. Controls added to its content pane will automatically be added to the panes sizer. .. py:attribute:: _report .. py:method:: on_close(event) Handle the close event of the frame .. py:class:: SimpleSimGPU_Reports_wx(dir_or_sims: list[wolfgpu.simple_simulation.SimpleSimulation | pathlib.Path | str] | pathlib.Path, show: bool = True, **kwargs) List of Simple Simulations GPU .. py:class:: SimpleSimGPU_Report_Compare(sims: list[wolfgpu.simple_simulation.SimpleSimulation | pathlib.Path | str] | pathlib.Path, **kwargs) Compare Multiple Simple Simulations GPU .. py:attribute:: _sims :type: list[wolfgpu.simple_simulation.SimpleSimulation] .. py:attribute:: _infos :value: [] .. py:attribute:: _report :value: None .. py:method:: _summary_versions() Find the versions of the simulation, wolfhece and the wolfgpu package .. py:method:: _summary_array_shapes() Return the summary of the array shapes of the simulations .. py:method:: _summary_array_data() Return the summary of the array data of the simulations .. py:method:: _summary_resolution() Return the summary of the resolution of the simulations .. py:method:: _summary_boundary_conditions() Return the summary of the boundary conditions of the simulations .. py:method:: summary() Create a summary of the simulations .. py:method:: _html_table_compare(key: str, text: list) Create an HTML table to compare the simulations One line for each parameter to compare. One column for each simulation. The first column is the parameter name. The first row is the simulation name. .. py:method:: _layout() Set the layout of the PDF report for the comparison. .. py:method:: create_report() Create the PDF report for the comparison .. py:method:: save_report(output_path: pathlib.Path | str = None) Save the report to a PDF file .. py:property:: pdf_path Return the PDF document .. py:class:: SimpleSimGPU_Report_Compare_wx(sims: list[wolfgpu.simple_simulation.SimpleSimulation | pathlib.Path | str], **kwargs) Bases: :py:obj:`wolfhece.report.pdf.PDFViewer` .. autoapi-inheritance-diagram:: wolfhece.report.simplesimgpu.SimpleSimGPU_Report_Compare_wx :parts: 1 :private-bases: A sized frame. Controls added to its content pane will automatically be added to the panes sizer. .. py:attribute:: _report .. py:method:: on_close(event) Handle the close event to clean up resources