TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Conds_lim.cpp
1/****************************************************************************
2* Copyright (c) 2026, 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 <Domaine_Cl_dis_base.h>
17#include <Frontiere_dis_base.h>
18#include <Schema_Temps_base.h>
19#include <Equation_base.h>
20#include <Conds_lim.h>
21#include <Domaine.h>
22
23Implemente_instanciable(Conds_lim,"Conds_lim",VECT(Cond_lim));
24// XD condlimlu objet_lecture nul NO_BRACE Boundary condition specified.
25// XD attr bord chaine bord REQ Name of the edge where the boundary condition applies.
26// XD attr cl condlim_base cl REQ Boundary condition at the boundary called bord (edge).
27
28// XD condlims listobj condlims INHERITS_BRACE condlimlu NO_COMMA Boundary conditions.
29
30Sortie& Conds_lim::printOn(Sortie& s ) const { return s << que_suis_je() << " " << le_nom(); }
31
32Entree& Conds_lim::readOn(Entree& s ) { return s ; }
33
34/*! @brief Appel Cond_lim::completer() sur chaque condition aux llimites du vecteur.
35 *
36 */
38{
39 if (!size()) return; //rien a faire
40 // Completer les CL.
41 for (auto& itr : *this) itr->completer();
42
43 // WEC : Fixer le nombre de valeurs temporelles des champ_front
44 // Cela pourrait etre fait dans Cond_lim_base::completer(),
45 // mais il faudrait retoucher a plein de classes derivees...
46 int nb_cases = (*this)[0]->domaine_Cl_dis().equation().schema_temps().nb_valeurs_temporelles();
47
48 for (auto& itr : *this) itr->fixer_nb_valeurs_temporelles(nb_cases);
49
50 Domaine& dom=(*this)[0]->frontiere_dis().frontiere().domaine();
51 dom.construire_renum_som_perio(*this, z);
52}
classe Cond_lim Classe generique servant a representer n'importe quelle classe
Definition Cond_lim.h:31
classe Conds_lim Cette classe represente un vecteur de conditions aux limites.
Definition Conds_lim.h:32
void completer(const Domaine_dis_base &)
Appel Cond_lim::completer() sur chaque condition aux llimites du vecteur.
Definition Conds_lim.cpp:37
void construire_renum_som_perio(const Conds_lim &, const Domaine_dis_base &)
Definition Domaine.cpp:2237
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Classe de base des flux de sortie.
Definition Sortie.h:52