TrioCFD 1.9.9_beta
TrioCFD documentation
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
class Conds_lim This class represents a vector of boundary conditions.
Definition Conds_lim.h:32
Classe Dirichlet_homogene This class is the base class of the hierarchy of homogeneous Dirichlet-type...
Dirichlet This class is the base class of the hierarchy of Dirichlet-type boundary conditions.
Definition Dirichlet.h:31
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
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
Returns the name of the field.
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
Navier Velocity boundary condition of type "Navier":
Definition Navier.h:31
Classe Neumann_homogene This class is the base class of the hierarchy of homogeneous Neumann-type bou...
Classe Neumann This class is the base class of the hierarchy of Neumann-type boundary conditions.
Definition Neumann.h:31
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
class Periodique This class represents a periodic boundary condition.
Definition Periodique.h:31
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52