TrioCFD 1.9.9_beta
TrioCFD documentation
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 Operateur_Conv_base This class is the base of the hierarchy of operators representing
25 *
26 * a convection term in an 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 -> the operator discretizes div(v x inco), incompressible_ = 0 -> it discretizes v.grad(inco)
51};
52
53// Returns the value of the convective stability time step.
55{
56 assert(!est_egal(dt_stab_conv_,123.));
57 return dt_stab_conv_;
58}
59
60// Sets the value of the convective stability time step.
62{
63 dt_stab_conv_ = dt;
64}
65
66#endif
Class Champ_Inc_base.
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
Operateur_Conv_base This class is the base of the hierarchy of operators representing.
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
class Operateur_base This class is the base of the hierarchy of objects representing an