TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Diff_EF_base.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 Op_Diff_EF_base_included
17#define Op_Diff_EF_base_included
18
19#include <Neumann_sortie_libre.h>
20#include <Operateur_Diff_base.h>
21#include <Domaine_Cl_EF.h>
22
23#include <Op_EF_base.h>
24#include <Domaine_EF.h>
25#include <TRUST_Ref.h>
26
27class Champ_Inc_base;
28class Sortie;
29
30enum class AJOUTE_SCAL { GEN , D3_8 , D2_4 };
31enum class AJOUTE_VECT { GEN , D3_8 , D2_4 };
32
33/*! @brief class Op_Diff_EF_base Classe de base des operateurs de diffusion EF
34 *
35 */
37{
38
39 Declare_base(Op_Diff_EF_base);
40
41public:
42
43 int impr(Sortie& os) const override;
44 void associer(const Domaine_dis_base& , const Domaine_Cl_dis_base& ,const Champ_Inc_base& ) override;
45 double calculer_dt_stab() const override;
46 virtual void remplir_nu(DoubleTab&) const=0;
47
48protected:
49
50 OBS_PTR(Domaine_EF) le_dom_EF;
53 mutable DoubleTab nu_;
54
55};
56
57inline void remplir_marqueur_sommet_neumann(ArrOfInt& marqueur,const Domaine_EF& domaine_EF,const Domaine_Cl_EF& domaine_Cl_EF , int transpose_partout)
58{
59 marqueur.resize_array(domaine_EF.nb_som_tot());
60 if ( transpose_partout) return;
61 // Neumann :
62 int n_bord;
63 int nb_bords=domaine_EF.nb_front_Cl();
64 const IntTab& face_sommets=domaine_EF.face_sommets();
65 int nb_som_face=domaine_EF.nb_som_face();
66 for (n_bord=0; n_bord<nb_bords; n_bord++)
67 {
68 const Cond_lim& la_cl = domaine_Cl_EF.les_conditions_limites(n_bord);
69
70 if (sub_type(Neumann_sortie_libre,la_cl.valeur()))
71 {
72 const Front_VF& le_bord = ref_cast(Front_VF,la_cl->frontiere_dis());
73 int nfin =le_bord.nb_faces_tot();
74 for (int ind_face=0; ind_face<nfin; ind_face++)
75 {
76 int face=le_bord.num_face(ind_face);
77 for (int i1=0; i1<nb_som_face; i1++)
78 {
79 int glob2=face_sommets(face,i1);
80 marqueur[glob2]=1;
81
82 }
83 }
84 }
85 }
86}
87
88#endif
Classe Champ_Inc_base.
classe Cond_lim Classe generique servant a representer n'importe quelle classe
Definition Cond_lim.h:31
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
const Cond_lim & les_conditions_limites(int) const
Renvoie la i-ieme condition aux limites.
class Domaine_EF
Definition Domaine_EF.h:59
int face_sommets(int i, int j) const
renvoie le numero du ieme sommet de la face num_face.
Definition Domaine_VF.h:583
int nb_som_face() const
renvoie le nombre de sommets par face.
Definition Domaine_VF.h:494
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
int nb_front_Cl() const
int nb_som_tot() const
class Front_VF
Definition Front_VF.h:36
int nb_faces_tot() const
Definition Front_VF.h:58
int num_face(const int) const
Definition Front_VF.h:68
classe Neumann_sortie_libre Cette classe represente une frontiere ouverte sans vitesse imposee
friend class Sortie
Definition Objet_U.h:75
class Op_Diff_EF_base Classe de base des operateurs de diffusion EF
double calculer_dt_stab() const override
Calcul dt_stab.
OBS_PTR(Champ_Inc_base) inconnue
void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &, const Champ_Inc_base &) override
OBS_PTR(Domaine_EF) le_dom_EF
int impr(Sortie &os) const override
DOES NOTHING - to override in derived classes.
virtual void remplir_nu(DoubleTab &) const =0
OBS_PTR(Domaine_Cl_EF) la_zcl_EF
classe Operateur_Diff_base Cette classe est la base de la hierarchie des operateurs representant
Classe de base des flux de sortie.
Definition Sortie.h:52
void resize_array(_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)