TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Type_Verifie.cpp
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#include <Type_Verifie.h>
16#include <Motcle.h>
17#include <Noms.h>
18
19static Motcles motcle_obsolete;
20
21// Parcours du jeu de donnees pour verification des mots cles obsoletes
22void verifie(const Nom& type)
23{
24 int n=72;
25 if( motcle_obsolete.size()!=n)
26 {
27 int i=0;
28 // Definition des anciens mots cles desormais plus reconnus
29 motcle_obsolete.dimensionner(n);
30 motcle_obsolete[i++] = "Solv_GCP_SSOR";
31 motcle_obsolete[i++] = "Frontiere_Ouverte_Rayo_transp_VDF";
32 motcle_obsolete[i++] = "Frontiere_Ouverte_Rayo_transp_VEF";
33 motcle_obsolete[i++] = "EchgItemsComm";
34 motcle_obsolete[i++] = "LireMED";
35 motcle_obsolete[i++] = "EcrMED";
36 motcle_obsolete[i++] = "Canal_thermo";
37 motcle_obsolete[i++] = "Prandtl_sous_maille";
38 motcle_obsolete[i++] = "Decentre";
39 motcle_obsolete[i++] = "Distance_perio";
40 motcle_obsolete[i++] = "T_paroi";
41 motcle_obsolete[i++] = "Champ_front_lineaire";
42 motcle_obsolete[i++] = "Champ_front_analytique";
43 motcle_obsolete[i++] = "Tourbillon";
44 motcle_obsolete[i++] = "Puissance_Thermique_Uniforme";
45 motcle_obsolete[i++] = "Source_Constituant_Uniforme";
46 motcle_obsolete[i++] = "Seuil_convg_implicite";
47 motcle_obsolete[i++] = "Seuil_resol_implicite";
48 motcle_obsolete[i++] = "Seuil_convg_variable";
49 motcle_obsolete[i++] = "Schema_Crank_Nicholson";
50 motcle_obsolete[i++] = "Resoudre_ALE";
51 motcle_obsolete[i++] = "Resoudre_QComp";
52 motcle_obsolete[i++] = "Periodique_1Proc";
53 motcle_obsolete[i++] = "Corriger_coord_perio";
54 motcle_obsolete[i++] = "Echange_domcut";
55 motcle_obsolete[i++] = "Extruder_en3_perio";
56 motcle_obsolete[i++] = "Extruder_perio";
57 motcle_obsolete[i++] = "ScatterAscii";
58 motcle_obsolete[i++] = "frontiere_ouverte_gradient_pression_impose_VEF";
59 motcle_obsolete[i++] = "Champ_front_calc_intern";
60 motcle_obsolete[i++] = "Champ_front_calc_recycl_fluct_pbperio";
61 motcle_obsolete[i++] = "Champ_front_calc_recycl_champ";
62 motcle_obsolete[i++] = "Champ_front_calc_intern_2pbs";
63 motcle_obsolete[i++] = "Champ_front_calc_recycl_fluct";
64 motcle_obsolete[i++] = "direction_periodicite";
65 motcle_obsolete[i++] = "NPHypre";
66 motcle_obsolete[i++] = "NPPetsc";
67 motcle_obsolete[i++] = "Latatomed";
68 motcle_obsolete[i++] = "Latatoother";
69 motcle_obsolete[i++] = "MG";
70 motcle_obsolete[i++] = "precond_local";
71 motcle_obsolete[i++] = "quick_period";
72 motcle_obsolete[i++] = "diffusivite";
73 motcle_obsolete[i++] = "Ecrire_fic_meshtv";
74 motcle_obsolete[i++] = "meshtv";
75 motcle_obsolete[i++] = "paroi_couple";
76 motcle_obsolete[i++] = "corriger_coordonnees";
77 motcle_obsolete[i++] = "Champ_front_debit_VEF";
78 motcle_obsolete[i++] = "Schema_MacCormack";
79 motcle_obsolete[i++] = "Alternant";
80 motcle_obsolete[i++] = "Alter_interp";
81 motcle_obsolete[i++] = "Boussinesq";
82 motcle_obsolete[i++] = "Temperature_paroi_NOPASPOURGENEPI";
83 motcle_obsolete[i++] = "Read_MED_For_Testing_No_Verify_Option";
84 motcle_obsolete[i++] = "Reordonner_faces_periodiques";
85 motcle_obsolete[i++] = "gaz_parfait";
86 motcle_obsolete[i++] = "gaz_reel_rhoT";
87 motcle_obsolete[i++] = "melange_gaz_parfait";
88 motcle_obsolete[i++] = "melange_binaire";
89 motcle_obsolete[i++] = "Convection_Diffusion_fraction_massique_MB_QC";
90 motcle_obsolete[i++] = "Convection_Diffusion_fraction_massique_QC";
91 motcle_obsolete[i++] = "Pb_Thermohydraulique_QC_fraction_massique";
92 motcle_obsolete[i++] = "Convection_Diffusion_fraction_massique_MB_Turbulent_QC";
93 motcle_obsolete[i++] = "Convection_Diffusion_fraction_massique_Turbulent_QC";
94 motcle_obsolete[i++] = "Pb_Thermohydraulique_Turbulent_QC_fraction_massique";
95 motcle_obsolete[i++] = "Lire_MEDfile";
96 motcle_obsolete[i++] = "Ecrire_MEDfile";
97 motcle_obsolete[i++] = "Champ_Fonc_MEDFile";
98 motcle_obsolete[i++] = "seuil_statio_relatif_deconseille";
99 motcle_obsolete[i++] = "CoviMAC";
100 motcle_obsolete[i++] = "ecrire_fichier_xyz_valeur_bin";
101 motcle_obsolete[i++] = "option_PolyMAC_MPFA";
102 assert(i==n);
103 }
104 // GF on ne constuit les noms de la nouvelle syntaxe que si necessaire
105 // cela optimise un peu...
106 int rang=motcle_obsolete.search((Motcle)type);
107 if (rang!=-1)
108 {
109
110 // Definition de la nouvelle syntaxe
111 Noms nouvelle_syntaxe(n);
112 int i=0;
113 nouvelle_syntaxe[i++] = "1.2, le format du jeu de donnees pour le solveur de pression a change:\nsolveur_pression GCP_ssor { omega 1.5 seuil 1.e-8 impr }\nDevient, pour tenir compte du preconditionneur:\nsolveur_pression GCP { precond ssor { omega 1.5 } seuil 1.e-8 impr }";
114 nouvelle_syntaxe[i++] = "1.4.9, il devient Frontiere_Ouverte_Rayo_transp";
115 nouvelle_syntaxe[i++] = "1.4.9, il devient Frontiere_Ouverte_Rayo_transp";
116 nouvelle_syntaxe[i++] = "1.5.";
117 nouvelle_syntaxe[i++] = "1.5, il devient Lire_MED";
118 nouvelle_syntaxe[i++] = "1.5, il devient Ecrire_MED, puis Write_MED a v1.9.2";
119 nouvelle_syntaxe[i++] = "1.5, il devient Canal";
120 nouvelle_syntaxe[i++] = "1.5, il suffit de mettre Prandtl";
121 nouvelle_syntaxe[i++] = "1.5.1, il est a remplacer par generic";
122 nouvelle_syntaxe[i++] = "1.5.1, il n'est plus necessaire dans la definition de la loi de paroi Shifted";
123 nouvelle_syntaxe[i++] = "1.5.1, il devient Temperature_paroi";
124 nouvelle_syntaxe[i++] = "1.5.1, on doit utiliser Champ_front_fonc_XYZ a la place";
125 nouvelle_syntaxe[i++] = "1.5.1, on doit utiliser Champ_front_fonc_XYZ a la place";
126 nouvelle_syntaxe[i++] = "1.5.1, on doit utiliser Champ_fonc_XYZ a la place";
127 nouvelle_syntaxe[i++] = "1.5.1, on doit utiliser Puissance_Thermique a la place";
128 nouvelle_syntaxe[i++] = "1.5.1, on doit utiliser Source_Constituant a la place";
129 nouvelle_syntaxe[i++] = "1.5.1, on doit utiliser Seuil_convergence_implicite a la place";
130 nouvelle_syntaxe[i++] = "1.5.1, on doit utiliser Seuil_convergence_solveur a la place";
131 nouvelle_syntaxe[i++] = "1.5.1, on doit utiliser Seuil_convergence_variable a la place";
132 nouvelle_syntaxe[i++] = "1.5.2, on doit utiliser Sch_CN_EX_iteratif ou Sch_CN_iteratif a la place";
133 nouvelle_syntaxe[i++] = "1.5.2, on doit utiliser Resoudre a la place";
134 nouvelle_syntaxe[i++] = "1.5.2, on doit utiliser Resoudre a la place";
135 nouvelle_syntaxe[i++] = "1.5.3, on doit utiliser le mot cle Periodique dans le decoupeur pour specifier les bords periodiques.";
136 nouvelle_syntaxe[i++] = "1.5.5, on doit utiliser Declarer_bord_perio { ... }";
137 nouvelle_syntaxe[i++] = "1.5.7, il n'est plus necessaire pour paralleliser certaines conditions limites.";
138 nouvelle_syntaxe[i++] = "1.5.7, you should use Extruder_en3 keyword and after RegroupeBord keyword to create periodic boundary.";
139 nouvelle_syntaxe[i++] = "1.6.0, you should use Extruder keyword and after RegroupeBord keyword to create periodic boundary.";
140 nouvelle_syntaxe[i++] = "1.6.0, you should use ScatterFormatte.";
141 nouvelle_syntaxe[i++] = "1.6.0, you should use frontiere_ouverte_gradient_pression_impose_VEFPREP1B.";
142 nouvelle_syntaxe[i++] = "1.6.1, you should use Champ_front_recyclage instead.";
143 nouvelle_syntaxe[i++] = "1.6.1, you should use Champ_front_recyclage instead.";
144 nouvelle_syntaxe[i++] = "1.6.1, you should use Champ_front_recyclage instead.";
145 nouvelle_syntaxe[i++] = "1.6.1, you should use Champ_front_recyclage instead.";
146 nouvelle_syntaxe[i++] = "1.6.1, you should use Champ_front_recyclage instead.";
147 nouvelle_syntaxe[i++] = "1.6.1, it is no longer necessary for a periodic boundary condition.";
148 nouvelle_syntaxe[i++] = "1.6.1, you should use Lata_to_med with new syntax.";
149 nouvelle_syntaxe[i++] = "1.6.1, you should use Lata_to_other with new syntax.";
150 nouvelle_syntaxe[i++] = "1.6.1, is no longer available as solver.";
151 nouvelle_syntaxe[i++] = "1.6.1, is no longer available as precond.";
152 nouvelle_syntaxe[i++] = "1.6.1, Numerical Platon library is not included anymore. Look at the new keyword Petsc.";
153 nouvelle_syntaxe[i++] = "1.6.1, Numerical Platon library is not included anymore. Look at the new keyword Petsc.";
154 nouvelle_syntaxe[i++] = "1.6.4, you should use quick instead (periodic boundary condition is supported with the last keyword).";
155 nouvelle_syntaxe[i++] = "1.6.4, you should use coefficient_diffusion instead.";
156 nouvelle_syntaxe[i++] = "1.6.4, you should use Postraiter_domaine keyword instead with LATA format.";
157 nouvelle_syntaxe[i++] = "1.6.4, you should use LATA format.";
158 nouvelle_syntaxe[i++] = "1.6.6, you should use paroi_contact instead.";
159 nouvelle_syntaxe[i++] = "1.6.7, because is activated now by default.";
160 nouvelle_syntaxe[i++] = "1.6.7, you should use Champ_front_debit instead.";
161 nouvelle_syntaxe[i++] = "1.6.7, you should use another time scheme.";
162 nouvelle_syntaxe[i++] = "1.6.7, you should use another convection scheme.";
163 nouvelle_syntaxe[i++] = "1.6.7, you should use another convection scheme.";
164 nouvelle_syntaxe[i++] = "1.6.8, you should use now: Boussinesq_temperature { ... } , Boussinesq_concentration { ... }";
165 nouvelle_syntaxe[i++] = "1.6.9.";
166 nouvelle_syntaxe[i++] = "1.7.6, never use that keyword!!!";
167 nouvelle_syntaxe[i++] = "1.8.1, use declarer_bord_perio keyword instead";
168 nouvelle_syntaxe[i++] = "1.8.4, you should use gaz_parfait_QC";
169 nouvelle_syntaxe[i++] = "1.8.4, you should use rhoT_gaz_reel_QC";
170 nouvelle_syntaxe[i++] = "1.8.4, you should use multi_gaz_parfait_QC";
171 nouvelle_syntaxe[i++] = "1.8.4, you should use binaire_gaz_parfait_QC";
172 nouvelle_syntaxe[i++] = "1.8.4, you should use Convection_Diffusion_Espece_Binaire_QC";
173 nouvelle_syntaxe[i++] = "1.8.4, you should use Convection_Diffusion_Espece_Multi_QC";
174 nouvelle_syntaxe[i++] = "1.8.4, you should use Pb_Thermohydraulique_Especes_QC";
175 nouvelle_syntaxe[i++] = "1.8.4, you should use Convection_Diffusion_Espece_Binaire_Turbulent_QC";
176 nouvelle_syntaxe[i++] = "1.8.4, you should use Convection_Diffusion_Espece_Multi_Turbulent_QC";
177 nouvelle_syntaxe[i++] = "1.8.4, you should use Pb_Thermohydraulique_Especes_Turbulent_QC";
178 nouvelle_syntaxe[i++] = "1.9.2, you should use Read_MED";
179 nouvelle_syntaxe[i++] = "1.9.2, you should use Write_MED";
180 nouvelle_syntaxe[i++] = "1.9.2, you should use Champ_Fonc_MED";
181 nouvelle_syntaxe[i++] = "1.9.2, you should use Residuals { relative 1 } instead.";
182 nouvelle_syntaxe[i++] = "1.9.3, you should use PolyMAC_MPFA instead.";
183 nouvelle_syntaxe[i++] = "1.9.4, you should use Ecrire_fichier_xyz_valeur { binary_file dt 1 fields 2 field1 field2 boundaries 1 boundary1 } instead.";
184 nouvelle_syntaxe[i++] = "1.9.6, you should use Option_PolyMAC_family instead.";
185 assert(i==n);
186 Cerr << "The keyword " << motcle_obsolete[rang] << " is now obsolete," << finl;
187 Cerr << "since the version " << nouvelle_syntaxe[rang] << finl << finl;
188 Cerr << "Look if necessary at the reference manual and change your data file." << finl;
190 }
191 // Parcours les releases notes pour afficher des infos en relation avec le mot cle type
192 cherche_dans_les_releases_notes(type);
193}
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Un tableau d'objets de la classe Motcle.
Definition Motcle.h:63
int search(const Motcle &t) const
Definition Motcle.cpp:321
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
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455