TrioCFD 1.9.9_beta
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 Calls Cond_lim::completer() on each boundary condition in the vector.
35 *
36 */
38{
39 if (!size()) return; // nothing to do
40 // Complete the BCs.
41 for (auto& itr : *this) itr->completer();
42
43 // WEC: Set the number of temporal values of champ_front
44 // This could be done in Cond_lim_base::completer(),
45 // but we would need to modify many derived classes...
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}
class Cond_lim Generic class used to represent any class
Definition Cond_lim.h:31
class Conds_lim This class represents a vector of boundary conditions.
Definition Conds_lim.h:32
void completer(const Domaine_dis_base &)
Calls Cond_lim::completer() on each boundary condition in the vector.
Definition Conds_lim.cpp:37
void construire_renum_som_perio(const Conds_lim &, const Domaine_dis_base &)
Definition Domaine.cpp:2233
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Base class for output streams.
Definition Sortie.h:52