:py:mod:`wolfhece.Results2DGPU` =============================== .. py:module:: wolfhece.Results2DGPU .. autoapi-nested-parse:: Author: HECE - University of Liege, Pierre Archambeau Date: 2024 Copyright (c) 2024 University of Liege. All rights reserved. This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited. Module Contents --------------- .. py:function:: _load_res(x) -> tuple[scipy.sparse.csr_array, scipy.sparse.csr_array, scipy.sparse.csr_array] .. py:function:: _load_res_h(x) -> tuple[scipy.sparse.csr_array, scipy.sparse.csr_array, scipy.sparse.csr_array] .. py:class:: Cache_Results2DGPU(fname: str, start_idx: int, end_idx: int = -1, only_h=False) Gestion en mémoire de plusieurs résultats GPU Stockage CSR afin d'économiser la mémoire (Scipy CSR) .. py:property:: only_h .. py:method:: get_h(idx: int, dense: bool = True) -> Union[numpy.ndarray, scipy.sparse.csr_array] Retourne la matrice de hauteur d'eau de la position idx (0-based) - en CSR (Scipy CSR) - en dense (Numpy array) .. py:method:: get_qx(idx: int, dense: bool = True) -> Union[numpy.ndarray, scipy.sparse.csr_array] Retourne la matrice de débit X d'eau de la position idx (0-based) - en CSR (Scipy CSR) - en dense (Numpy array) .. py:method:: get_qy(idx: int, dense: bool = True) -> Union[numpy.ndarray, scipy.sparse.csr_array] Retourne la matrice de débit Y d'eau de la position idx (0-based) - en CSR (Scipy CSR) - en dense (Numpy array) .. py:class:: wolfres2DGPU(fname: str, eps=0.0, idx: str = '', plotted: bool = True, mapviewer=None, store=None) Bases: :py:obj:`wolfhece.wolfresults_2D.Wolfresults_2D` .. autoapi-inheritance-diagram:: wolfhece.Results2DGPU.wolfres2DGPU :parts: 1 :private-bases: Gestion des résultats du code GPU 2D Surcharge de "Wolfresults_2D" .. py:property:: all_dt .. py:property:: all_mostly_dry_mesh .. py:property:: all_clock_time .. py:property:: all_wet_meshes .. py:method:: setup_store(store=None) Setup results store .. py:method:: setup_cache(start_idx: int = 0, end_idx: int = -1, only_h: bool = False) Setup cache from start_idx result to end_idx result if only_h is True, only waterdepth is loaded into memory :param start_idx: start index (0-based) :param end_idx: end index (0-based) :param only_h: only waterdepth is loaded into memory .. py:method:: clear_cache() Clear cache .. py:method:: _loader(fname: str) -> int .. py:method:: get_nbresults(force_update_timessteps=True) Récupération du nombre de résultats Lecture du fichier de tracking afin de permettre une mise à jour en cours de calcul .. py:method:: read_oneresult(which: int = -1) Lecture d'un pas de sauvegarde which: result number to read; 0-based; -1 == last one .. py:method:: _read_oneresult_only_h(which: int = -1) Lecture d'un pas de sauvegarde which: result number to read; 0-based; -1 == last one .. py:method:: _update_result_view() Procédure interne de mise à jour du pas Etapes partagées par read_next et read_previous .. py:method:: get_times_steps(nb: int = None) Récupération des temps réels et les pas de calcul de chaque résultat sur disque :param nb : nombre de résultats à lire .. py:method:: get_cached_h(idx) Return cached water depth according to WOLF convention .. py:method:: get_cached_qx(idx) Return cached specific discharge along X according to WOLF convention .. py:method:: get_cached_qy(idx) Return cached specific discharge along Y according to WOLF convention .. py:method:: show_tiles() Show tiles in mapviewer .. py:method:: set_hqxqy_as_initial_conditions(idx: int = None, as_multiblocks: bool = False) Set the result as IC :param idx : 0-based index