TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Option_PolyMAC_family.cpp
1/****************************************************************************
2* Copyright (c) 2026, 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#include <Option_PolyMAC_family.h>
17#include <Motcle.h>
18#include <Param.h>
19
20Implemente_instanciable(Option_PolyMAC_family,"Option_PolyMAC_family|Option_PolyMAC",Interprete);
21
22// XD Option_PolyMAC_family interprete Option_PolyMAC BRACE Class of PolyMAC options.
23
28
30
32
34{
35 Param param(que_suis_je());
36 param.ajouter_non_std("use_osqp",(this)); // XD_ADD_P rien
37 // XD_CONT Flag to use the old formulation of the M2 matrix provided by the OSQP library. Only useful for PolyMAC_CDO
38 // XD_CONT version.
39 param.ajouter_non_std("maillage_vdf|vdf_mesh",(this)); // XD_ADD_P rien
40 // XD_CONT Flag used to force the calculation of the equiv tab.
41 param.ajouter_non_std("interp_ve1",(this)); // XD_ADD_P rien
42 // XD_CONT Flag to enable a first-order face-to-element velocity interpolation. By default, it is not activated which
43 // XD_CONT means a second order interpolation. Only useful for PolyMAC_MPFA version.
44 param.ajouter_non_std("traitement_axi",(this)); // XD_ADD_P rien
45 // XD_CONT Flag used to relax the time-step stability criterion in case of a thin slice geometry while modelling an
46 // XD_CONT axi-symetrical case. Only useful for PolyMAC_MPFA version.
48 return is;
49}
50
52{
53 if (mot == "use_osqp")
54 USE_NEW_M2 = 0;
55 else if (mot == "maillage_vdf" || mot == "vdf_mesh")
56 MAILLAGE_VDF = 1;
57 else if (mot == "interp_ve1")
58 INTERP_VE1 = 1;
59 else if (mot == "traitement_axi")
61 else
62 return -1;
63 return 1;
64}
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Classe de base des objets "interprete".
Definition Interprete.h:38
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
friend class Entree
Definition Objet_U.h:76
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
Entree & interpreter(Entree &) override
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
void ajouter_non_std(const char *keyword, const Objet_U *value, Param::Nature nat=Param::OPTIONAL)
Register a keyword handled by Objet_U::lire_motcle_non_standard.
Definition Param.cpp:489
int lire_avec_accolades_depuis(Entree &is)
Parse the parameter block { ... } from is.
Definition Param.cpp:32
Classe de base des flux de sortie.
Definition Sortie.h:52