TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Periodique.h
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#ifndef Periodique_included
17#define Periodique_included
18
19#include <Cond_lim_base.h>
20#include <TRUSTTab.h>
21
22/*! @brief classe Periodique Cette classe represente une condition aux limites periodique.
23 *
24 * On peut specifier une periodicite en X, Y ou Z.
25 * Toutes les faces de la frontiere associee a cette condition doivent
26 * avoir la meme orientation
27 *
28 * @sa Cond_lim_base, Toutes les faces de la frontiere associee a cette condition doivent, avoir la meme orientation
29 */
31{
32 Declare_instanciable(Periodique);
33public:
34 void mettre_a_jour(double temps) override { }
35 int face_associee(int i) const { return face_front_associee_[i]; }
36 inline const ArrOfInt& face_associee() const { return face_front_associee_; }
37 double distance() const { return distance_; }
38 inline const ArrOfDouble& direction_perio() const { return direction_perio_; }
39 int direction_periodicite() const;
40 inline int est_periodique_selon_un_axe() const { return direction_xyz_ >= 0; }
41
42protected:
43 // Tableau de taille nb_faces() + nb_faces_virt()
44 // face_front_associee_[i] est l'indice de la face opposee sur cette frontiere (vaut -1 si la face opposee n'existe pas pour une face virtuelle)
46 ArrOfDouble direction_perio_;
47 double distance_ = -500.;
48 // -1, 0, 1, ou 2
49 int direction_xyz_ = -100;
50 int compatible_avec_eqn(const Equation_base&) const override { return 1; }
51 void completer() override;
52};
53
54#endif
classe Cond_lim_base Classe de base pour la hierarchie des classes qui representent les differentes c...
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
classe Periodique Cette classe represente une condition aux limites periodique.
Definition Periodique.h:31
void completer() override
NE FAIT RIEN A surcharger dans les classes derivees.
double distance_
Definition Periodique.h:47
const ArrOfInt & face_associee() const
Definition Periodique.h:36
ArrOfDouble direction_perio_
Definition Periodique.h:46
double distance() const
Definition Periodique.h:37
int face_associee(int i) const
Definition Periodique.h:35
int compatible_avec_eqn(const Equation_base &) const override
Definition Periodique.h:50
void mettre_a_jour(double temps) override
Effectue une mise a jour en temps de la condition aux limites.
Definition Periodique.h:34
int est_periodique_selon_un_axe() const
Definition Periodique.h:40
ArrOfInt face_front_associee_
Definition Periodique.h:45
int direction_periodicite() const
const ArrOfDouble & direction_perio() const
Definition Periodique.h:38
int direction_xyz_
Definition Periodique.h:49