TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
SupprimeBord.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 <SupprimeBord.h>
17#include <EFichier.h>
18Implemente_instanciable_32_64(SupprimeBord_32_64,"Supprime_Bord",Interprete_geometrique_base_32_64<_T_>);
19// XD supprime_bord interprete supprime_bord INHERITS_BRACE Keyword to remove boundaries (named Boundary_name1
20// XD_CONT Boundary_name2 ) of the domain named domain_name.
21// XD attr domaine ref_domaine domain REQ Name of domain
22// XD attr bords list_nom bords REQ { Boundary_name1 Boundaray_name2 }
23
24template <typename _SIZE_>
26{
27 return Interprete::printOn(os);
28}
29
30template <typename _SIZE_>
32{
33 return Interprete::readOn(is);
34}
35
36template <typename _SIZE_>
38{
39 //Nom nom_dom;
40 LIST(Nom) nlistbord;
41 this->associer_domaine(is);
42 Nom mot;
43 is >>mot;
44 if (mot!="{")
45 {
46 Cerr<< "we expected { and not "<<mot<<finl;
48 }
49 is >>mot;
50 while (mot!="}")
51 {
52 nlistbord.add(mot);
53 is>>mot;
54 }
55 Domaine_t& dom=this->domaine();
56 Cout<<"HERE "<<nlistbord<<finl;
57
58 for (int b=0; b<nlistbord.size(); b++)
59 {
60
61 {
62 // la recup des bords et des raccords est dans la boucle
63 // pour pouvoir supprimer ...
64 Bords_t& listbord=dom.faces_bord();
65 Raccords_t& listrac=dom.faces_raccord();
66 const Nom& nombord=nlistbord[b];
67 int num_b=dom.rang_frontiere(nombord);
68 if (num_b<listbord.size())
69 listbord.suppr(dom.bord(nombord));
70 else
71 listrac.suppr(dom.raccord(nombord));
72 }
73 }
74 return is;
75}
76
77
78template class SupprimeBord_32_64<int>;
79#if INT_is_64_ == 2
81#endif
82
83
Raccord_t & raccord(int i)
Definition Domaine.h:248
int rang_frontiere(const Nom &) const
Definition Domaine.cpp:1052
Bords_t & faces_bord()
Definition Domaine.h:198
Raccords_t & faces_raccord()
Definition Domaine.h:253
Bord_t & bord(int i)
Definition Domaine.h:193
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Interprete_geometrique_base .
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:76
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
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52
class SupprimeBord Supprimebord dom { bord1 , bord2 }
Entree & interpreter_(Entree &) override
Bords_32_64< _SIZE_ > Bords_t
Raccords_32_64< _SIZE_ > Raccords_t
Domaine_32_64< _SIZE_ > Domaine_t