TrioCFD 1.9.9_beta
TrioCFD documentation
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
Base class for "interpreter" objects.
Definition Interprete.h:38
A character string (Nom) in uppercase.
Definition Motcle.h:26
friend class Entree
Definition Objet_U.h:71
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
Entree & interpreter(Entree &) override
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
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
Base class for output streams.
Definition Sortie.h:52