TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Fourier_trans.h
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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#ifndef Fourier_trans_included
17#define Fourier_trans_included
18#include <IJK_Field_vector.h>
19#include <IJK_Field.h>
20#include <Objet_U.h>
21#include <TRUSTArrays.h>
22#include <Redistribute_Field.h>
23#include <fftw3.h>
24#include <TRUSTTab.h>
25
26// NBR DE TERMES INTER !!!
27// #define NVAL_INTER 32
28
29// NBR DE TERMES DE SORTIE !!!
30// #define N_RES 21
31
32class Domaine_IJK;
33class Fourier_trans : public Objet_U
34{
35 Declare_instanciable(Fourier_trans);
36public:
37 void sauvegarde() const;
38 void reprise();
39 void postraiter(Nom&) const;
40 void update(const IJK_Field_vector3_double& vitesse,
41 const IJK_Field_double& pression,
42 const IJK_Field_double& masse_vol,
43 const IJK_Field_double& champ_mu);
44
45 void initialize( const Domaine_IJK& /* splitting d'origine */
46 , const Domaine_IJK& /* splitting de post-traitement*/
47 , VECT(ArrOfDouble) /* tableau des v mo */
48 , ArrOfDouble rhomoy
49 , ArrOfDouble numoy
50 , const double T_KMAX
51 , const double T_KMIN
52 , int avec_reprise );
53
54 int N_echantillons() const
55 {
56 return N_echantillons_;
57 }
58
59protected:
60
61 void Traitement_spectral(const IJK_Field_double& entree, IJK_Field_double& reel, IJK_Field_double& imag, int sens); // 1 pour direct -1 pour inverse
62 void Traitement_spectral_klayer_direct(const IJK_Field_double& entree, IJK_Field_double& reel, IJK_Field_double& imag, int k);
63 void Traitement_spectral_klayer_inverse(IJK_Field_double& reel, IJK_Field_double& imag, int k);
64 void Ecrire_entete(Sortie& os, int flag_valeur_instantanee = 0) const;
65 void postraiter_TFi(Sortie&, int flag_valeur_instantanee = 0) const;
66 void postraiter_TFx(Sortie&, int flag_valeur_instantanee = 0) const;
67 void postraiter_TFy(Sortie&, int flag_valeur_instantanee = 0) const;
70
71 /* ici penser a fixer le resultat en fonction du nombre de param que l'on veux changer */
74 VECT(ArrOfDouble) vit_moy_;
75 ArrOfDouble rho_moy_;
76 ArrOfDouble nu_moy_;
77 double TCL_kmax_;
78 double TCL_kmin_;
79
80 fftw_plan plan;
81 fftw_plan inverseplan;
82 fftw_complex* in;
83 fftw_complex* out;
84
85 // Z coordinates of statistics points
86 ArrOfDouble elem_coord_;
87 //taille des mailles;
88 double dx_;
89 double dy_;
90 ArrOfDouble tab_dz_;
91 // Last instantaneous value of the space average (only on processor 0)
92 VECT(ArrOfDouble) moyenne_spatiale_instantanee_;
93 // Temporal integral of statistics variables
94 VECT(ArrOfDouble) integrale_temporelle_;
95 // Integration number
97
98 /* ATTENTION Les tableaux ont ete deplacer ici pour pouvoir etre initialiser avant le calcl car cela coute aussi cher que la TF */
99 FixedVector <IJK_Field_double, 86> Avant_TF ;
100 FixedVector <IJK_Field_double, 86> Reel_TF ;
101 FixedVector <IJK_Field_double, 86> Imag_TF ;
102 IJK_Field_vector3_double vitesse ;
103 IJK_Field_double champ_mu ;
104 IJK_Field_double masse_vol ;
105 IJK_Field_double pression ;
106 /*
107 IJK_Field_double Div_U;
108 IJK_Field_double DUiDx;
109 IJK_Field_double DUjDy;
110 IJK_Field_double DUkDz;
111 */
112 VECT(ArrOfDouble) TFx_ ;
113 VECT(ArrOfDouble) TFy_ ;
114 VECT(ArrOfDouble) TFi_ ;
115 ArrOfDouble tri_ki;
116 IntTab ref_ki;
117};
118#endif
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
FixedVector< Redistribute_Field, 3 > redistribute_to_post_splitting_faces_
VECT(ArrOfDouble) moyenne_spatiale_instantanee_
void initialize(const Domaine_IJK &, const Domaine_IJK &, VECT(ArrOfDouble), ArrOfDouble rhomoy, ArrOfDouble numoy, const double T_KMAX, const double T_KMIN, int avec_reprise)
VECT(ArrOfDouble) TFy_
fftw_complex * out
fftw_plan inverseplan
FixedVector< IJK_Field_double, 86 > Reel_TF
ArrOfDouble nu_moy_
FixedVector< IJK_Field_double, 86 > Imag_TF
fftw_complex * in
VECT(ArrOfDouble) vit_moy_
void Traitement_spectral_klayer_direct(const IJK_Field_double &entree, IJK_Field_double &reel, IJK_Field_double &imag, int k)
VECT(ArrOfDouble) TFi_
Redistribute_Field redistribute_to_post_splitting_elem_
VECT(ArrOfDouble) TFx_
ArrOfDouble tab_dz_
FixedVector< IJK_Field_double, 27 > resultat_
void Traitement_spectral_klayer_inverse(IJK_Field_double &reel, IJK_Field_double &imag, int k)
IJK_Field_vector3_double vitesse
ArrOfDouble rho_moy_
void Traitement_spectral(const IJK_Field_double &entree, IJK_Field_double &reel, IJK_Field_double &imag, int sens)
void sauvegarde() const
void update(const IJK_Field_vector3_double &vitesse, const IJK_Field_double &pression, const IJK_Field_double &masse_vol, const IJK_Field_double &champ_mu)
void postraiter_TFy(Sortie &, int flag_valeur_instantanee=0) const
ArrOfDouble tri_ki
fftw_plan plan
ArrOfDouble elem_coord_
IJK_Field_double masse_vol
IJK_Field_double pression
int N_echantillons() const
IJK_Field_double champ_mu
FixedVector< IJK_Field_double, 86 > Avant_TF
VECT(ArrOfDouble) integrale_temporelle_
void postraiter_TFi(Sortie &, int flag_valeur_instantanee=0) const
Domaine_IJK post_splitting_
void Ecrire_entete(Sortie &os, int flag_valeur_instantanee=0) const
void postraiter_TFx(Sortie &, int flag_valeur_instantanee=0) const
void postraiter(Nom &) const
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55
Classe de base des flux de sortie.
Definition Sortie.h:52