TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Champs_compris_IJK.h
1/****************************************************************************
2* Copyright (c) 2025, 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 Champs_compris_IJK_included
17#define Champs_compris_IJK_included
18
19#include <Champs_compris.h>
20#include <IJK_Field_vector.h>
21
22class Champ_base;
23
24/*! @brief Same as Champs_compris, but specialised for IJK fields and also supports quering for vectorial fields
25 * (aka IJK_Field_vector3_double).
26 *
27 * Note that this class has no member of type "Champs_compris_IJK". This member is kept separate and inserted
28 * in Navier_Stokes_FTD_IJK, IJK_Interfaces, etc., because in some cases (typically at the probleme level Probleme_FTD_IJK_base)
29 * we do not need the member, just the abstract interface below.
30 */
31class Champs_compris_IJK: public Champs_compris_IJK_base
32{
33public :
34 void ajoute_champ_vectoriel(const IJK_Field_vector3_double& champ);
35 bool has_champ_vectoriel(const Motcle& nom) const;
36 const IJK_Field_vector3_double& get_champ_vectoriel(const Motcle& nom) const;
38 const Noms liste_noms_compris() const;
39
40 void switch_ft_fields();
41
42private:
43 void switch_field(const Nom& field_name, const Nom& prefix);
44 void switch_vector_field(const Nom& field_name, const Nom& prefix);
45 static constexpr std::array<const char*,3> COMPOS = {"_X", "_Y", "_Z"};
46
47 std::unordered_map<std::string, OBS_PTR(IJK_Field_vector3_double)> liste_champs_vecto_;
48};
49
50
51#endif /* Champs_compris_IJK_included */
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Same as Champs_compris, but specialised for IJK fields and also supports quering for vectorial fields...
bool has_champ_vectoriel(const Motcle &nom) const
const Noms liste_noms_compris() const
const IJK_Field_vector3_double & get_champ_vectoriel(const Motcle &nom) const
void ajoute_champ_vectoriel(const IJK_Field_vector3_double &champ)
const Noms liste_noms_compris_vectoriel() const
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
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