TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Marqueur_FT.cpp
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#include <Marqueur_FT.h>
16#include <Probleme_base.h>
17#include <Domaine_VF.h>
18#include <Transport_Interfaces_FT_Disc.h>
19
20Implemente_instanciable(Marqueur_FT,"Marqueur_FT",Marqueur_Lagrange_base);
21
23{
24
25 return os;
26}
27
28//Lecture d un marqueur
29// ensemble_points : On lit les informations necessaires pour localiser les particules
30// -soit lues dans un fichier
31// -soit generees dans des sous domaines
32// t_debut_integration : temps de debut d integration des trajectoires (fixe a t_init par defaut)
33
35{
36 //temporaire
37 /*
38 Motcles les_mots(2);
39 {
40 les_mots[0] = "ensemble_points";
41 les_mots[1] = "t_debut_integration";
42 }
43
44 Motcle motlu, accolade_fermee="}", accolade_ouverte="{";
45 is >> motlu;
46 if(motlu!=accolade_ouverte)
47 {
48 Cerr << "On attendait une { a la lecture d'une " << que_suis_je() << finl;
49 Cerr << "et non : " << motlu << finl;
50 Process::exit();
51 }
52 is >> motlu;
53
54 while (motlu != accolade_fermee)
55 {
56 int rang=les_mots.search(motlu);
57 switch(rang){
58 case 0 :
59 {
60 is>>ensemble_points_;
61 break;
62 }
63 case 1 :
64 {
65 is>>t_debut_integr_;
66 break;
67 }
68 }
69 is >> motlu;
70 }
71 */
72 //temporaire
74 return is;
75}
76
77//Surcharge de Marqueur_Lagrange_base::discretiser()
78//Les coordonnees des points a suivre sont :
79// -soit lues dans un fichier
80// -soit generees dans des sous domaines
81
83{
84 //temporaire
85 /*
86 Marqueur_Lagrange_base::discretiser(pb,dis);
87 Maillage_FT_Disc& maillage = ref_cast(Maillage_FT_Disc,ensemble_points());
88 const DoubleTab & sommets = maillage.sommets() ;
89
90 DoubleTab sommets_tmp;
91 //Premier cas : les sommets ont ete lus dans un fichier
92 //On copie sommets dans un tableau temporaire sommets_tmp
93 if (maillage.nb_marqs_par_sz().size()==0)
94 {
95 int dim0=sommets.dimension(0);
96 int dim1=sommets.dimension(1);
97 sommets_tmp.resize(dim0,dim1);
98
99 for (int i=0;i<dim0;i++)
100 for (int j=0;j<dim1;j++)
101 sommets_tmp(i,j)=sommets(i,j);
102 }
103 else
104 //Deuxieme cas : les sommets sont crees dans des sous domaines
105 //On remplit le tableau temporaire
106 maillage.generer_marqueurs_sz(sommets_tmp);
107
108 maillage.construire_points(sommets_tmp);
109 calculer_valeurs_champs();
110 */
111
112 //temporaire
114}
115
116//Calcul des valeurs du champ postraitable densite_particules_
117//Estimation du nombre de partcules par maille
119{
120 //temporaire
121 /*
122 DoubleTab& val_densite = densite_particules_.valeurs();
123 const Maillage_FT_Disc& ens_points = ref_cast(Maillage_FT_Disc,ensemble_points());
124 const ArrOfInt & sommet_elem = ens_points.sommet_elem();
125 val_densite = 0.;
126 int nb_som = ens_points.nb_sommets();
127 int elem;
128
129 for (int som=0; som<nb_som; som++)
130 {
131 elem = sommet_elem[som];
132 if (elem!=-1)
133 val_densite(elem) += 1.;
134 else
135 {
136 if (je_suis_maitre())
137 Cerr<<"Une particule n est pas localisee dans le domaine"<<finl;
138 Process::exit();
139 }
140 }
141 */
142
143 //temporaire
145}
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Marqueur_FT La classe Marqueur_FT est une classe instanciable permettant de suivre des particu...
Definition Marqueur_FT.h:30
void calculer_valeurs_champs() override
void discretiser(const Probleme_base &pb, const Discretisation_base &dis) override
classe Marqueur_Lagrange_base La classe Marqueur_Lagange_base est la classe de base des classes de ma...
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52