wolfhece.Results2DGPU
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
- wolfhece.Results2DGPU._load_res(x) tuple[scipy.sparse.csr_array, scipy.sparse.csr_array, scipy.sparse.csr_array] [source]
- wolfhece.Results2DGPU._load_res_h(x) tuple[scipy.sparse.csr_array, scipy.sparse.csr_array, scipy.sparse.csr_array] [source]
- class wolfhece.Results2DGPU.Cache_Results2DGPU(fname: str, start_idx: int, end_idx: int = -1, only_h=False)[source]
Gestion en mémoire de plusieurs résultats GPU Stockage CSR afin d’économiser la mémoire (Scipy CSR)
- get_h(idx: int, dense: bool = True) numpy.ndarray | scipy.sparse.csr_array [source]
- Retourne la matrice de hauteur d’eau de la position idx (0-based)
en CSR (Scipy CSR)
en dense (Numpy array)
- class wolfhece.Results2DGPU.wolfres2DGPU(fname: str, eps=0.0, idx: str = '', plotted: bool = True, mapviewer=None, store=None)[source]
Bases:
wolfhece.wolfresults_2D.Wolfresults_2D
Gestion des résultats du code GPU 2D Surcharge de “Wolfresults_2D”
- setup_cache(start_idx: int = 0, end_idx: int = -1, only_h: bool = False)[source]
Setup cache from start_idx result to end_idx result
if only_h is True, only waterdepth is loaded into memory
- Parameters:
start_idx – start index (0-based)
end_idx – end index (0-based)
only_h – only waterdepth is loaded into memory
- get_nbresults(force_update_timessteps=True)[source]
Récupération du nombre de résultats
Lecture du fichier de tracking afin de permettre une mise à jour en cours de calcul
- read_oneresult(which: int = -1)[source]
Lecture d’un pas de sauvegarde
which: result number to read; 0-based; -1 == last one
- _read_oneresult_only_h(which: int = -1)[source]
Lecture d’un pas de sauvegarde
which: result number to read; 0-based; -1 == last one
- _update_result_view()[source]
Procédure interne de mise à jour du pas
Etapes partagées par read_next et read_previous