TrioCFD 1.9.9_beta
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 Associates a domain to all Bord_Interne objects in the list.
27 *
28 * @param (Domaine& un_domaine) the domain to associate to the Bord_Interne objects in the list
29 */
30template <typename _SIZE_>
32{
33 for (auto& itr : *this) itr.associer_domaine(un_domaine);
34}
35
36/*! @brief Returns the total number of faces contained in the list of Bord_Interne, i.
37 *
38 * e. the sum of all
39 * the faces of all Bords_Interne objects contained in
40 * the list.
41 *
42 * @return (int) the total number of faces contained in the list of 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 Returns the total number of faces of the specified type contained in the list of Bord_Interne
54 *
55 * i.e. the sum of all faces of the specified type
56 * of all Bord_Interne objects contained in
57 * the list.
58 *
59 * @param (Type_Face type) the type of faces to count
60 * @return (int) the total number of faces contained in the list of 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
Class Bord_Interne The class serves to represent a set of faces that are internal.
Class Bords_Internes This class represents a list of objects of type Bords_Interne.
void associer_domaine(const Domaine_t &)
Associates a domain to all Bord_Interne objects in the list.
Domaine_32_64< _SIZE_ > Domaine_t
int_t nb_faces() const
Returns the total number of faces contained in the list of Bord_Interne, i.
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