TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Dirichlet_loi_paroi.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 <Dirichlet_loi_paroi.h>
17#include <Domaine_Cl_dis_base.h>
18#include <Equation_base.h>
19#include <Motcle.h>
20
21Implemente_base(Dirichlet_loi_paroi, "Dirichlet_loi_paroi", Dirichlet);
22
23Sortie& Dirichlet_loi_paroi::printOn(Sortie& s) const { return s << que_suis_je() << finl; }
24
25Entree& Dirichlet_loi_paroi::readOn(Entree& s) { le_champ_front.typer("Champ_front_vide"); return s; }
26
28{
29 int nf = la_frontiere_dis->frontiere().nb_faces(), f1 = la_frontiere_dis->frontiere().num_premiere_face();
30 int N = tab.line_size();
31
32 for (int f =0 ; f < nf ; f++)
33 for (int n = 0 ; n<N ; n++)
34 tab(f + f1, n) |= 1;
35}
36
38{
39 Motcle dom_app=eqn.domaine_application();
40 Motcle Turbulence="Turbulence";
41
42 if (dom_app==Turbulence)
43 return 1;
44 else err_pas_compatible(eqn);
45 return 0;
46}
47
49{
50 if (mon_temps!=tps) {me_calculer() ; mon_temps=tps;}
51}
52
54{
55 d_.resize(0,domaine_Cl_dis().equation().inconnue().valeurs().line_size());
56 la_frontiere_dis->frontiere().creer_tableau_faces(d_);
57 return 1;
58}
void err_pas_compatible(const Equation_base &) const
Cette methode est appelee quand la condition aux limites n'est pas compatible avec l'equation sur laq...
Domaine_Cl_dis_base & domaine_Cl_dis()
Renvoie le domaine des conditions aux limites discretisee dont l'objet fait partie.
Classe Dirichlet_loi_paroi Classe de base pour les valeurs impose pour une condition aux limites des ...
void mettre_a_jour(double tps) override
Effectue une mise a jour en temps de la condition aux limites.
int compatible_avec_eqn(const Equation_base &) const override
virtual void me_calculer()=0
virtual void liste_faces_loi_paroi(IntTab &)
virtual int initialiser(double temps) override
Initialisation en debut de calcul.
classe Dirichlet Cette classe est la classe de base de la hierarchie des conditions aux limites de ty...
Definition Dirichlet.h:31
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
virtual const Motcle & domaine_application() const
Renvoie "indetermine" Navier_Stokes_standard par exemple surcharge cette methode.
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
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 de base des flux de sortie.
Definition Sortie.h:52
int line_size() const
Definition TRUSTVect.tpp:67