TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Champ_Vect_Elem_Coloc.cpp
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#include <Champ_Vect_Elem_Coloc.h>
17#include <Domaine_Cl_dis_base.h>
18#include <Dirichlet_homogene.h>
19#include <Neumann_homogene.h>
20#include <Periodique.h>
21#include <Dirichlet.h>
22#include <Symetrie.h>
23#include <Neumann.h>
24#include <Navier.h>
25
26Implemente_instanciable(Champ_Vect_Elem_Coloc, "Champ_Vect_Elem_Coloc", Champ_Elem_Coloc);
27Sortie& Champ_Vect_Elem_Coloc::printOn(Sortie& s) const { return s << que_suis_je() << " " << le_nom(); }
29
31{
32 const Domaine_VF& domaine = ref_cast(Domaine_VF,le_dom_VF.valeur());
34 int i, f, n;
35
36 fcl_.resize(domaine.nb_faces_tot(), 3);
37 for (n = 0; n < cls.size(); n++)
38 {
39 const Front_VF& fvf = ref_cast(Front_VF, cls[n]->frontiere_dis());
40 int idx = sub_type(Neumann, cls[n].valeur())
41 + 2 * sub_type(Navier, cls[n].valeur())
42 + 3 * sub_type(Dirichlet, cls[n].valeur()) + 3 * sub_type(Neumann_homogene, cls[n].valeur())
43 + 4 * sub_type(Dirichlet_homogene, cls[n].valeur())
44 + 5 * sub_type(Periodique, cls[n].valeur());
45 if (!idx)
46 {
47 Cerr << "Champ_Vect_Elem_Coloc : CL non codee rencontree!" << finl;
49 }
50 for (i = 0; i < fvf.nb_faces_tot(); i++)
51 f = fvf.num_face(i), fcl_(f, 0) = idx, fcl_(f, 1) = n, fcl_(f, 2) = i;
52 }
53 fcl_init_ = 1;
54}
const Domaine & domaine() const
const Domaine_Cl_dis_base & domaine_Cl_dis() const
void init_fcl() const override
classe Conds_lim Cette classe represente un vecteur de conditions aux limites.
Definition Conds_lim.h:32
Classe Dirichlet_homogene Cette classe est la classe de base de la hierarchie des conditions aux limi...
classe Dirichlet Cette classe est la classe de base de la hierarchie des conditions aux limites de ty...
Definition Dirichlet.h:31
const Cond_lim & les_conditions_limites(int) const
Renvoie la i-ieme condition aux limites.
class Domaine_VF
Definition Domaine_VF.h:44
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
const Nom & le_nom() const override
Renvoie le nom du champ.
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 Navier Condition aux limites sur la vitesse de type "Navier" :
Definition Navier.h:31
Classe Neumann_homogene Cette classe est la classe de base de la hierarchie des conditions aux limite...
Classe Neumann Cette classe est la classe de base de la hierarchie des conditions aux limites de type...
Definition Neumann.h:31
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
classe Periodique Cette classe represente une condition aux limites periodique.
Definition Periodique.h:31
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52