TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Sondes.h
1/****************************************************************************
2* Copyright (c) 2024, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Sondes_included
17#define Sondes_included
18
19#include <Champ_Generique_base.h>
20#include <Champs_compris.h>
21#include <TRUST_List.h>
22
23#include <Sonde.h>
24#include <Noms.h>
25
26/*! @brief classe Sondes Cette classe represente une liste de sondes.
27 *
28 * @sa Sonde Postraitement
29 */
30class Sondes : public LIST(OWN_PTR(Sonde))
31{
32 Declare_instanciable(Sondes);
33public:
34 inline void ouvrir_fichiers();
35 inline void fermer_fichiers();
36 void completer();
37 inline void init_bords();
38 void associer_post(const Postraitement&);
39 void postraiter();
40 void mettre_a_jour(double temps, double tinit);
41 OBS_PTR(Champ_base) get_from_cache(OBS_PTR(Champ_Generique_base)& mon_champ, const Nom& nom_champ_lu_);
42 void clear_cache();
44 const Motcles& get_noms_champs_postraitables() const { return noms_champs_postraitables_; }
45 bool update_positions=false;
48 void resetTime(double time) { for (auto &itr : *this) itr->resetTime(time); };
49
50private:
51 // Mecanisme de cache pour les sondes:
52 LIST(OBS_PTR(Champ_base)) sourceList;
53 LIST(OWN_PTR(Champ_base)) espaceStockageList;
54 Noms sourceNoms;
55 OBS_PTR(Postraitement) mon_post;
56 Motcles noms_champs_postraitables_;
57};
58
59inline void Sondes::init_bords()
60{
61 for (auto& itr : *this) itr->init_bords();
62}
63
64/*! @brief Ouvre tous les fichiers associes a chacune des sondes de la liste.
65 *
66 */
68{
69 for (auto &itr : *this) itr->ouvrir_fichier();
70}
71
72/*! @brief Ferme tous les fichiers des sondes de la liste.
73 *
74 */
76{
77 for (auto &itr : *this) itr->fermer_fichier();
78}
79
80#endif /* Sondes_included */
class Champ_Generique_base
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Un tableau d'objets de la classe Motcle.
Definition Motcle.h:63
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
classe Postraitement La classe est dotee -d une liste de champs generiques champs_post_complet_ qui c...
classe Sondes Cette classe represente une liste de sondes.
Definition Sondes.h:31
OBS_PTR(Champ_base) get_from_cache(OBS_PTR(Champ_Generique_base) &mon_champ
void set_update_positions(bool update_positions)
Modifie le parametrage des sondes mobiles.
Definition Sondes.cpp:164
void fermer_fichiers()
Ferme tous les fichiers des sondes de la liste.
Definition Sondes.h:75
void mettre_a_jour(double temps, double tinit)
Effectue une mise a jour en temps de chacune des sondes de la liste.
Definition Sondes.cpp:146
void postraiter()
Effectue le postraitement sur chacune des sondes de la liste.
Definition Sondes.cpp:107
const Motcles & get_noms_champs_postraitables() const
Definition Sondes.h:44
void ouvrir_fichiers()
Ouvre tous les fichiers associes a chacune des sondes de la liste.
Definition Sondes.h:67
void clear_cache()
Definition Sondes.cpp:114
void set_noms_champs_postraitables()
Definition Sondes.cpp:85
void completer()
Definition Sondes.cpp:98
void init_bords()
Definition Sondes.h:59
void resetTime(double time)
Definition Sondes.h:48
void associer_post(const Postraitement &)
Associe un postraitement a la liste des sondes.
Definition Sondes.cpp:156
const Nom & nom_champ_lu_
Definition Sondes.h:41
bool get_update_positions()
Renvoie le parametrage des sondes mobiles.
Definition Sondes.cpp:172
bool update_positions
Definition Sondes.h:45