TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Traitement_particulier_Solide_canal.cpp
1/****************************************************************************
2* Copyright (c) 2024, 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 <Traitement_particulier_Solide_canal.h>
17#include <Periodique.h>
18#include <Champ_Uniforme.h>
19#include <EcrFicCollecteBin.h>
20#include <TRUSTTrav.h>
21#include <Conduction.h>
22#include <Probleme_base.h>
23
24Implemente_base(Traitement_particulier_Solide_canal,"Traitement_particulier_Solide_canal",Traitement_particulier_Solide_base);
25
26
28{
29 return is;
30}
31
32
34{
35 return is;
36}
37
39{
40
41 // END of initialisation
42 Motcle accouverte = "{" , accfermee = "}" ;
43 Motcle motbidon, motlu;
44 is >> motbidon ;
45 if (motbidon == accouverte)
46 {
47 Motcles les_mots(3);
48 les_mots[0] = "u_inst";
49 les_mots[1] = "stats";
50 les_mots[2] = "nb_points";
51
52 is >> motlu;
53 while(motlu != accfermee)
54 {
55 int rang=les_mots.search(motlu);
56 switch(rang)
57 {
58 case 0 :
59 {
60 // Spatial averages, e.g. u_inst
61 is >> dt_post_inst; // time interval for spatial average output
62 // initialisation for spatial statistics computation
63 Cerr << "Spatial average parameters read..." << finl;
64 Cerr << "dt_post_inst : " << dt_post_inst << finl;
65 break;
66 }
67 case 1 :
68 {
69 // Time statistics
70 is >> temps_deb; // start time for temporal statistics computation
71 is >> temps_fin; // end time for temporal statistics computation
72 is >> dt_post_stat; // time interval for temporal statistics output
73 // initialisation for temporal statistics computation
74 Cerr << "Reading time statitics parameters..." << finl;
75 Cerr << "Initial time : " << temps_deb << " End time : " << temps_fin << finl;
76 Cerr << "Time interval for output : " << dt_post_stat << finl;
77 // Then check whether the values specific to spatial statistics computation were provided.
78 break;
79 }
80 case 2 :
81 {
82 is >> N ;
83 Cerr << "Number of points estimated in the solid for profiles : " << N << finl;
84 break;
85 }
86 }
87 is >> motlu;
88 }
89 is >> motlu;
90 if (motlu != accfermee)
91 {
92 Cerr << "Error while reading in Traitement_particulier_Solide_canal" << finl;;
93 Cerr << "We were expecting a }" << finl;
94 exit();
95 }
96 }
97 else
98 {
99 Cerr << "Error while reading in Traitement_particulier_Solide_canal" << finl;
100 Cerr << "We were expecting a {" << finl;
101 exit();
102 }
103
104 return is;
105}
106
107
108
114
116{
117 /* Equation_base& eqn=mon_equation.valeur();
118 const Discretisation_base& discr=eqn.discretisation();
119 Nom nom_discr=discr.que_suis_je();
120 if(nom_discr=="VEFPreP1B" || nom_discr=="VEF")
121 {
122 N=20;
123 val_moy_temp.resize(N,N);
124 val_moy_temp=0.;
125 }
126 else
127 {*/
128
129 Tmoy_temp.resize(N);
130 Tmoy_temp=0;
131 T2_moy_temp.resize(N);
132 T2_moy_temp=0;
133
134 // }
135}
136
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
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
friend class Entree
Definition Objet_U.h:71
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
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52
Base class for special post-processing treatments on solid equations.
Special post-processing treatment for solid channel configurations.