TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Bords_Internes.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 <Bords_Internes.h>
17
18Implemente_instanciable_32_64(Bords_Internes_32_64, "Bords_Internes", LIST(Bord_Interne_32_64<_T_>));
19
20template <typename _SIZE_>
22
23template <typename _SIZE_>
25
26/*! @brief Associe un domaine a tous les objets Bord_Interne de la liste.
27 *
28 * @param (Domaine& un_domaine) le domaine a associer aux Bord_Interne de la liste
29 */
30template <typename _SIZE_>
32{
33 for (auto& itr : *this) itr.associer_domaine(un_domaine);
34}
35
36/*! @brief Renvoie le nombre total de faces contenues dans la liste des Bord_Interne, i.
37 *
38 * e. la somme de toutes
39 * les faces de tous les objet Bords_Interne contenu dans
40 * la liste.
41 *
42 * @return (int) le nombre total de faces contenues dans la liste des Bord_Interne
43 */
44template <typename _SIZE_>
46{
47 int_t nombre = 0;
48 for (const auto &itr : *this) nombre += itr.nb_faces();
49
50 return nombre;
51}
52
53/*! @brief Renvoie le nombre total de faces de type specifie contenues dans la liste des Bord_Interne
54 *
55 * i.e. la somme de toutes les faces de type specifie
56 * de tous les objet Bord_Interne contenu dans
57 * la liste.
58 *
59 * @param (Type_Face type) le type des faces a compter
60 * @return (int) le nombre total de faces contenues dans la liste des Bord_Interne
61 */
62template <typename _SIZE_>
64{
65 int_t nombre = 0;
66 for (const auto &itr : *this)
67 if (type == itr.faces().type_face()) nombre += itr.nb_faces();
68
69 return nombre;
70}
71
72
73template class Bords_Internes_32_64<int>;
74#if INT_is_64_ == 2
76#endif
77
78
Classe Bord_Interne La classe sert a representer un ensemble de faces qui sont internes.
Class Bords_Internes Cette classe represente une liste d'objets de type Bords_Interne.
void associer_domaine(const Domaine_t &)
Associe un domaine a tous les objets Bord_Interne de la liste.
Domaine_32_64< _SIZE_ > Domaine_t
int_t nb_faces() const
Renvoie le nombre total de faces contenues dans la liste des Bord_Interne, i.
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