TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Random_process.h
1/****************************************************************************
2* Copyright (c) 2019, 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 Random_process_included
17#define Random_process_included
18
19#include <FixedVector.h>
20#include <Domaine_IJK.h>
21#include <iostream>
22#include <iomanip>
23#include <string>
24#include <vector>
25#include <Force_ph.h>
26#include <random>
27#include <Objet_U.h>
28#include <Redistribute_Field.h>
29#include <Parser.h>
30#include <Domaine_IJK.h>
31#include <Multigrille_Adrien.h>
32#include <Interprete.h>
33#include <TRUST_Ref.h>
34
35class Probleme_base;
36
37// #include <Force_sp.h>
38// #include <OpDiffTurbIJK.h>
39// #include <OpConvIJKQuickSharp.h>
40// #include <OpCentre4IJK.h>
41// #include <OpConvIJKAmont.h>
42// #include <Linear_algebra_tools.h>
43// #include <Boundary_Conditions.h>
44// #include <IJK_Interfaces.h>
45// #include <IJK_FT_Post.h>
46
47
48class Random_process : public Objet_U
49{
50 Declare_instanciable_sans_constructeur_ni_destructeur( Random_process ) ;
51
52public:
53
56 void initialise(double eps_etoile, double tL,
57 int nl, int nm, int nn, std::string nom_fichier_sortie, Nom nom_sauvegarde);//,int random_fixed_);
58 void next_step(double dt, int it);
59 void next_step2(double dt, int it);
60 void next_step3(ArrOfDouble& advection_velocity, double dt, int it);
61 void write(std::string nom_fichier_sortie, double temps);
62 void write_separate(std::string nom_fichier_sortie, double t);
63 std::vector< std::vector< std:: vector < double > > > get_b();
64 // std:: vector < double > get_b_flt();
65 ArrOfDouble& get_b_flt();
66 std::minstd_rand initialise_gen(int i);
67 int get_semi_gen();
68
69private:
70
71 int nl,nm,nn,n_lmn;
72 double eps_etoile,tL;
73 int kmin,kmax;
74
75 std::minstd_rand gen;
76 std::string nom_fichier_;
77 Nom nom_sauvegarde_;
78// IntTab semi_gen_et_modulo_reprise_;
79 ArrOfInt semi_gen_et_modulo_reprise_;
80 std::normal_distribution < double > distribution;
81 int moke_gen_;
82
83 std::vector< std::vector< std:: vector < double > > > process;
84 ArrOfDouble process_flt;
85
86// int i_offset;
87// int j_offset;
88// int k_offset;
89
90// je voudrai declarer et me servir de ces attributs
91// std::string const nomFichierReprise_("reprise_gen.sauv");
92// std::string nomFichierReprise_;
93// std::ofstream *gen_write_;
94// std::ofstream gen_write_;
95// std::ifstream *gen_read_;
96// std::ifstream gen_read_;
97};
98
99
100#endif
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 Probleme_base C'est un Probleme_U qui n'est pas un couplage.
void next_step2(double dt, int it)
void write(std::string nom_fichier_sortie, double temps)
void write_separate(std::string nom_fichier_sortie, double t)
std::vector< std::vector< std::vector< double > > > get_b()
void next_step3(ArrOfDouble &advection_velocity, double dt, int it)
ArrOfDouble & get_b_flt()
void next_step(double dt, int it)
void initialise(double eps_etoile, double tL, int nl, int nm, int nn, std::string nom_fichier_sortie, Nom nom_sauvegarde)
std::minstd_rand initialise_gen(int i)