TrioCFD 1.9.9_beta
TrioCFD documentation
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 // boundary and connector retrieval is inside the loop
63 // to allow deletion ...
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:1051
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
Class Interprete_geometrique_base.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:71
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
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