TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Domaine_EF.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 Domaine_EF_included
17#define Domaine_EF_included
18
19#include <Elem_EF_base.h>
20#include <TRUST_Deriv.h>
21#include <Domaine_VF.h>
22
23class Geometrie;
24
25/*! @brief class Domaine_EF
26 *
27 * @brief Instantiable class derived from Domaine_VF.
28 * This class holds the geometric information required by the
29 * Finite Element (FE) method (Crouzeix-Raviart element).
30 * The class stores a number of pieces of information about faces.
31 * The set of faces also includes boundary faces and
32 * joint faces. Faces are split into 2 categories:
33 * - non-standard faces: on a joint, on a boundary, or internal
34 * but belonging to a boundary element
35 * - standard faces: internal faces not belonging to a boundary element
36 * This distinction corresponds to the treatment of boundary conditions:
37 * standard faces do not "see" the boundary conditions.
38 * The full set of faces is numbered as follows:
39 * - faces on a Domaine_joint appear first
40 * (in the order of the les_joints vector)
41 * - faces on a Domaine_bord appear next
42 * (in the order of the les_bords vector)
43 * - non-standard internal faces appear next
44 * - standard internal faces appear last
45 * All non-standard faces requiring special treatment are thus grouped first.
46 * Two element types are distinguished:
47 * - non-standard elements: they have at least one boundary face
48 * - standard elements: they have no boundary face
49 * Standard (resp. non-standard) elements are not stored consecutively
50 * in the Domaine object. The rang_elem_non_std array is used to
51 * selectively access one or the other type of element.
52 *
53 */
54
56{
57 Declare_instanciable(Domaine_EF);
58public:
59 void typer_elem(Domaine& domaine_geom) override;
60 void discretiser() override;
61 void swap(int, int, int);
62 void modifier_pour_Cl(const Conds_lim&) override;
63
64 inline const Elem_EF_base& type_elem() const { return type_elem_.valeur(); }
65 inline int nb_elem_Cl() const { return nb_elem() - nb_elem_std_; }
66 inline int nb_faces_joint() const { return 0; /* return nb_faces_joint_; A FAIRE */ }
67 inline int nb_faces_std() const { return nb_faces_std_; }
68 inline int nb_elem_std() const { return nb_elem_std_; }
69 inline double carre_pas_du_maillage() const { return h_carre; }
70 inline double carre_pas_maille(int i) const { return h_carre_(i); }
71 inline IntVect& rang_elem_non_std() { return rang_elem_non_std_; }
72
73 inline const IntVect& rang_elem_non_std() const { return rang_elem_non_std_; }
76 virtual void calculer_IPhi(const Domaine_Cl_dis_base& zcl);
77 virtual void calculer_Bij(DoubleTab& bij_);
78 virtual void calculer_Bij_gen(DoubleTab& bij);
79 void calculer_Bij() { calculer_Bij(Bij_); }
80
81 // inline const DoubleVect& volumes_sommets() const { return volumes_sommets_; }
82 inline const DoubleVect& volumes_thilde() const { return volumes_thilde_; }
83 inline const DoubleVect& volumes_sommets_thilde() const { return volumes_sommets_thilde_; }
84 inline const DoubleVect& porosite_sommet() const { return porosite_sommets_; }
85 inline DoubleVect& set_porosite_sommet() { return porosite_sommets_; }
86
87 void calculer_h_carre();
89 inline const DoubleTab& Bij() const { return Bij_; }
90 inline const DoubleTab& Bij_thilde() const { return Bij_thilde_; }
91 inline const DoubleTab& IPhi() const { return IPhi_; }
92 inline const DoubleTab& IPhi_thilde() const { return IPhi_thilde_; }
93
94 virtual void verifie_compatibilite_domaine();
95
96protected:
97 DoubleTab IPhi_, IPhi_thilde_;
98
99private:
100 DoubleVect porosite_sommets_, volumes_sommets_thilde_, volumes_thilde_;
101 // OWN_PTR(Champ_Don_base) champ_porosite_sommets_,champ_porosite_lu_;
102 DoubleTab Bij_, Bij_thilde_; // storage of the Bije matrices
103
104 double h_carre = 1.e30; // square of the mesh step
105 DoubleVect h_carre_; // square of the mesh step per cell
106 OWN_PTR(Elem_EF_base) type_elem_; // type of the discretisation element
107
108 Sortie& ecrit(Sortie& os) const;
109 IntVect orientation_;
110};
111
112#endif /* Domaine_EF_included */
class Conds_lim This class represents a vector of boundary conditions.
Definition Conds_lim.h:32
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_EF
Definition Domaine_EF.h:56
int nb_elem_std() const
Definition Domaine_EF.h:68
void calculer_volumes_sommets(const Domaine_Cl_dis_base &zcl)
double carre_pas_maille(int i) const
Definition Domaine_EF.h:70
void calculer_h_carre()
const DoubleVect & porosite_sommet() const
Definition Domaine_EF.h:84
virtual void calculer_Bij_gen(DoubleTab &bij)
const Elem_EF_base & type_elem() const
Definition Domaine_EF.h:64
void modifier_pour_Cl(const Conds_lim &) override
const DoubleTab & IPhi_thilde() const
Definition Domaine_EF.h:92
const DoubleTab & IPhi() const
Definition Domaine_EF.h:91
int nb_elem_Cl() const
Definition Domaine_EF.h:65
void calculer_Bij()
Definition Domaine_EF.h:79
DoubleTab IPhi_thilde_
Definition Domaine_EF.h:97
const DoubleTab & Bij() const
Definition Domaine_EF.h:89
void calculer_porosites_sommets()
const IntVect & rang_elem_non_std() const
Definition Domaine_EF.h:73
const DoubleTab & Bij_thilde() const
Definition Domaine_EF.h:90
void discretiser() override
DoubleTab IPhi_
Definition Domaine_EF.h:97
double carre_pas_du_maillage() const
Definition Domaine_EF.h:69
int nb_faces_std() const
Definition Domaine_EF.h:67
const DoubleVect & volumes_thilde() const
Definition Domaine_EF.h:82
DoubleVect & set_porosite_sommet()
Definition Domaine_EF.h:85
int nb_faces_joint() const
Definition Domaine_EF.h:66
const DoubleVect & volumes_sommets_thilde() const
Definition Domaine_EF.h:83
IntVect & rang_elem_non_std()
Definition Domaine_EF.h:71
void swap(int, int, int)
virtual void verifie_compatibilite_domaine()
void calculer_volumes_entrelaces()
void typer_elem(Domaine &domaine_geom) override
virtual void calculer_IPhi(const Domaine_Cl_dis_base &zcl)
class Domaine_VF
Definition Domaine_VF.h:44
IntVect rang_elem_non_std_
Definition Domaine_VF.h:252
int nb_elem_std_
Definition Domaine_VF.h:250
int nb_faces_std_
Definition Domaine_VF.h:251
friend class Sortie
Definition Objet_U.h:70