TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Reordonner_faces_periodiques.h
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#ifndef Reordonner_faces_periodiques_included
17#define Reordonner_faces_periodiques_included
18
19#include <Interprete_geometrique_base.h>
20#include <TRUSTTabs_forward.h>
21#include <Domaine_forward.h>
22
23/*! @brief This interpreter reorders the faces of a periodic boundary according to the convention used in the partitioner.
24 *
25 * First the faces at one end of the domain, then in the same order, the twin faces on the opposite boundary.
26 */
27template <typename _SIZE_>
29{
30public:
31 using int_t = _SIZE_;
32
33 static int reordonner_faces_periodiques(const Domaine_32_64<_SIZE_>& domaine, IntTab_T<_SIZE_>& faces, const ArrOfDouble& direction_perio, const double epsilon);
34
35 static int check_faces_periodiques(const Frontiere_32_64<_SIZE_>& frontiere, ArrOfDouble& vecteur_delta, ArrOfDouble& erreur,
36 bool verbose=false);
37
38 static void renum_som_perio(const Domaine_32_64<_SIZE_>& dom,
39 ArrOfInt_T<_SIZE_>& renum_som_perio, bool calculer_espace_virtuel);
40
41 static void chercher_direction_perio(ArrOfDouble& direction_perio, const Domaine_32_64<_SIZE_>& dom, const Nom& bord);
42};
43
44using Reordonner_faces_periodiques = Reordonner_faces_periodiques_32_64<int>;
45using Reordonner_faces_periodiques_64 = Reordonner_faces_periodiques_32_64<trustIdType>;
46
47#endif
class Domaine_32_64 A Domain is a mesh composed of a set of geometric elements of the same type.
Definition Domaine.h:62
Class Frontiere.
Definition Frontiere.h:32
Class Interprete_geometrique_base.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
This interpreter reorders the faces of a periodic boundary according to the convention used in the pa...
static void chercher_direction_perio(ArrOfDouble &direction_perio, const Domaine_32_64< _SIZE_ > &dom, const Nom &bord)
static int reordonner_faces_periodiques(const Domaine_32_64< _SIZE_ > &domaine, IntTab_T< _SIZE_ > &faces, const ArrOfDouble &direction_perio, const double epsilon)
Reorders the "faces" array according to the periodic face convention: First the faces of one end,...
static int check_faces_periodiques(const Frontiere_32_64< _SIZE_ > &frontiere, ArrOfDouble &vecteur_delta, ArrOfDouble &erreur, bool verbose=false)
Tries to verify whether the faces on boundary num_bord are ordered according to the periodic face con...
static void renum_som_perio(const Domaine_32_64< _SIZE_ > &dom, ArrOfInt_T< _SIZE_ > &renum_som_perio, bool calculer_espace_virtuel)