TrioCFD 1.9.9_beta
TrioCFD documentation
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// Traversal of the data set to check for obsolete keywords
22void verifie(const Nom& type)
23{
24 int n=72;
25 if( motcle_obsolete.size()!=n)
26 {
27 int i=0;
28 // Definition of old keywords that are no longer recognized
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: the new syntax names are only built if necessary
105 // this optimizes slightly...
106 int rang=motcle_obsolete.search((Motcle)type);
107 if (rang!=-1)
108 {
109
110 // Definition of the new syntax
111 Noms nouvelle_syntaxe(n);
112 int i=0;
113 nouvelle_syntaxe[i++] = "1.2, the format of the data set for the pressure solver has changed:\nsolveur_pression GCP_ssor { omega 1.5 seuil 1.e-8 impr }\nBecomes, to account for the preconditioner:\nsolveur_pression GCP { precond ssor { omega 1.5 } seuil 1.e-8 impr }";
114 nouvelle_syntaxe[i++] = "1.4.9, it becomes Frontiere_Ouverte_Rayo_transp";
115 nouvelle_syntaxe[i++] = "1.4.9, it becomes Frontiere_Ouverte_Rayo_transp";
116 nouvelle_syntaxe[i++] = "1.5.";
117 nouvelle_syntaxe[i++] = "1.5, it becomes Lire_MED";
118 nouvelle_syntaxe[i++] = "1.5, it becomes Ecrire_MED, then Write_MED at v1.9.2";
119 nouvelle_syntaxe[i++] = "1.5, it becomes Canal";
120 nouvelle_syntaxe[i++] = "1.5, just use Prandtl";
121 nouvelle_syntaxe[i++] = "1.5.1, it should be replaced by generic";
122 nouvelle_syntaxe[i++] = "1.5.1, it is no longer necessary in the definition of the Shifted wall law";
123 nouvelle_syntaxe[i++] = "1.5.1, it becomes Temperature_paroi";
124 nouvelle_syntaxe[i++] = "1.5.1, you should use Champ_front_fonc_XYZ instead";
125 nouvelle_syntaxe[i++] = "1.5.1, you should use Champ_front_fonc_XYZ instead";
126 nouvelle_syntaxe[i++] = "1.5.1, you should use Champ_fonc_XYZ instead";
127 nouvelle_syntaxe[i++] = "1.5.1, you should use Puissance_Thermique instead";
128 nouvelle_syntaxe[i++] = "1.5.1, you should use Source_Constituant instead";
129 nouvelle_syntaxe[i++] = "1.5.1, you should use Seuil_convergence_implicite instead";
130 nouvelle_syntaxe[i++] = "1.5.1, you should use Seuil_convergence_solveur instead";
131 nouvelle_syntaxe[i++] = "1.5.1, you should use Seuil_convergence_variable instead";
132 nouvelle_syntaxe[i++] = "1.5.2, you should use Sch_CN_EX_iteratif or Sch_CN_iteratif instead";
133 nouvelle_syntaxe[i++] = "1.5.2, you should use Resoudre instead";
134 nouvelle_syntaxe[i++] = "1.5.2, you should use Resoudre instead";
135 nouvelle_syntaxe[i++] = "1.5.3, you should use the keyword Periodique in the partitioner to specify periodic boundaries.";
136 nouvelle_syntaxe[i++] = "1.5.5, you should use Declarer_bord_perio { ... }";
137 nouvelle_syntaxe[i++] = "1.5.7, it is no longer necessary to parallelize certain boundary conditions.";
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 // Traverse the release notes to display info related to the keyword type
192 cherche_dans_les_releases_notes(type);
193}
A character string (Nom) in uppercase.
Definition Motcle.h:26
An array of Motcle objects.
Definition Motcle.h:63
int search(const Motcle &t) const
Definition Motcle.cpp:319
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466