TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Operateur_Conv_base.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 Operateur_Conv_base_included
17#define Operateur_Conv_base_included
18
19#include <Operateur_base.h>
20#include <TRUST_Ref.h>
21
22class Champ_base;
23
24/*! @brief classe Operateur_Conv_base Cette classe est la base de la hierarchie des operateurs representant
25 *
26 * un terme de convection dans une equation.
27 *
28 * @sa Operateur_base, Classe abstraite, Methode abstraite, void associer_vitesse(const Champ_Inc_base& vit )
29 */
30
32{
33 Declare_base(Operateur_Conv_base);
34
35public :
36
37 virtual void associer_vitesse(const Champ_base& vit ) =0;
38 inline double dt_stab_conv() const;
39 inline void fixer_dt_stab_conv(double dt);
40 virtual void associer_norme_vitesse(const Champ_base& norme_vitesse);
41 virtual void associer_vitesse_pour_pas_de_temps(const Champ_base& vitesse);
42 virtual void set_incompressible(const int);
43 virtual void associer_champ_temp(const Champ_Inc_base&, bool) const { }
44 virtual void set_transporting_velocity_phase_index(int idx);
45
46protected :
47 OBS_PTR(Champ_base) la_norme_vitesse;
48 OBS_PTR(Champ_base) vitesse_pour_pas_de_temps_;
50 int incompressible_ = 1; // incompressible_= 1 -> l'operateur discretise div(v x inco), incompressible_ = 0 -> il discretise v.grad(inco)
51};
52
53//Descrition
54// renvoie la valeur du pas de temps de stabilite en convection
56{
57 assert(!est_egal(dt_stab_conv_,123.));
58 return dt_stab_conv_;
59}
60
61//Descrition
62// permet de fixer la valeur du pas de temps de stabilite en convection
64{
65 dt_stab_conv_ = dt;
66}
67
68#endif
Classe Champ_Inc_base.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Operateur_Conv_base Cette classe est la base de la hierarchie des operateurs representant
double dt_stab_conv() const
virtual void set_transporting_velocity_phase_index(int idx)
virtual void set_incompressible(const int)
virtual void associer_vitesse(const Champ_base &vit)=0
virtual void associer_norme_vitesse(const Champ_base &norme_vitesse)
void fixer_dt_stab_conv(double dt)
OBS_PTR(Champ_base) vitesse_pour_pas_de_temps_
virtual void associer_champ_temp(const Champ_Inc_base &, bool) const
virtual void associer_vitesse_pour_pas_de_temps(const Champ_base &vitesse)
OBS_PTR(Champ_base) la_norme_vitesse
classe Operateur_base Classe est la base de la hierarchie des objets representant un