TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Domaine_Cl_EF.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 Domaine_Cl_EF_included
17#define Domaine_Cl_EF_included
18
19
20
21/*! @brief class Domaine_Cl_EF
22 *
23 * @brief This class holds the arrays used to apply boundary conditions
24 * in the EF formulation.
25 *
26 *
27 * @sa Domaine_Cl_dis_base
28 */
29#include <Domaine_Cl_dis_base.h>
30
31class Champ_Don_base;
32class Domaine_EF;
33class Matrice_Morse;
34
36{
37
38 Declare_instanciable(Domaine_Cl_EF);
39
40public :
41
42 void completer(const Domaine_dis_base& ) override;
43// void mettre_a_jour(double );
44 int initialiser(double temps) override;
45 void imposer_cond_lim(Champ_Inc_base&, double) override;
46
47 void imposer_symetrie(DoubleTab&,int tous_les_sommets_sym=0) const;
48 void imposer_symetrie_partiellement(DoubleTab&,const Noms&) const;
49 void imposer_symetrie_matrice_secmem(Matrice_Morse& la_matrice, DoubleTab& secmem) const;
50
51 void modifie_gradient(ArrOfDouble& grad_mod,const ArrOfDouble& grad,int num_som) const;
52
53
54 int nb_faces_sortie_libre() const;
56 const Domaine_EF& domaine_EF() const;
57
58 int nb_bord_periodicite() const;
59 inline const ArrOfInt& get_type_sommet() const
60 {
61 return type_sommet_ ;
62 };
63protected:
64
65 // Attributes:
66
68
69 // Functions for creating private domain members:
70
71 void remplir_type_elem_Cl(const Domaine_EF& );
72 ArrOfInt type_sommet_; // -1 internal, 0 Neumann, 1 Symmetry, >2 Dirichlet
73 // A vertex is first Dirichlet, then Symmetry, then Neumann, then internal
75};
76
77//
78// Inline functions of class Domaine_Cl_EF
79//
80
81
82
83
84
85#endif
class Champ_Don_base base class of Given Fields (not calculated)
Class Champ_Inc_base.
void remplir_type_elem_Cl(const Domaine_EF &)
Called by remplir_volumes_entrelaces_Cl(): fills type_elem_Cl_.
Domaine_EF & domaine_EF()
int initialiser(double temps) override
Initializes the BCs. Unlike the update methods, the.
const ArrOfInt & get_type_sommet() const
void imposer_symetrie(DoubleTab &, int tous_les_sommets_sym=0) const
Imposes symmetry conditions, i.e. cancels the field components along the normal(s).
int nb_bord_periodicite() const
void modifie_gradient(ArrOfDouble &grad_mod, const ArrOfDouble &grad, int num_som) const
void imposer_symetrie_partiellement(DoubleTab &, const Noms &) const
void imposer_symetrie_matrice_secmem(Matrice_Morse &la_matrice, DoubleTab &secmem) const
Transforms la_matrice and secmem to produce a secmem normal to boundaries, plus the matrix needed to ...
void imposer_cond_lim(Champ_Inc_base &, double) override
Imposes boundary conditions at time "temps" of the Champ_Inc.
OWN_PTR(Champ_Don_base) normales_symetrie_
int nb_faces_sortie_libre() const
ArrOfInt type_sommet_
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
void completer()
Calls Cond_lim_base::completer() on each boundary condition.
class Domaine_EF
Definition Domaine_EF.h:56
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
An array of character strings (VECT(Nom)).
Definition Noms.h:26