TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Operateur_Conv.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_included
17#define Operateur_Conv_included
18
19#include <Operateur_Conv_base.h>
20#include <TRUST_Deriv.h>
21#include <Operateur.h>
22#include <TRUST_Ref.h>
23
24class Champ_base;
25
26/*! @brief Operateur_Conv Generic class of the hierarchy of operators representing a convection term.
27 *
28 * An Operateur_Conv object can reference any object
29 * derived from Operateur_Conv_base.
30 *
31 * @sa Operateur_Conv_base Operateur
32 */
33class Operateur_Conv : public Operateur, public OWN_PTR(Operateur_Conv_base)
34{
35 Declare_instanciable(Operateur_Conv);
36public :
37
38 inline Operateur_base& l_op_base() override;
39 inline const Operateur_base& l_op_base() const override;
40 DoubleTab& ajouter(const DoubleTab&, DoubleTab& ) const override;
41 DoubleTab& calculer(const DoubleTab&, DoubleTab& ) const override;
42 inline void associer_vitesse(const Champ_base&) ;
43 inline const Champ_base& vitesse() const ;
44 void typer() override;
45 inline void typer(const Nom&);
46 inline int op_non_nul() const override;
48protected :
49
50 OBS_PTR(Champ_base) la_vitesse;
51};
52
53/*! @brief Returns the underlying object upcast to Operateur_base.
54 *
55 * @return (Operateur_base&) the underlying object upcast to Operateur_base
56 */
58{
59 return valeur();
60}
61/*! @brief Returns the underlying object upcast to Operateur_base (const version).
62 *
63 * @return (Operateur_base&) the underlying object upcast to Operateur_base
64 */
66{
67 return valeur();
68}
69
70/*! @brief Associates the velocity (as the transporting velocity) to the convection operator.
71 *
72 * @param (Champ_Inc_base& vit) the unknown field representing the velocity
73 * @return the unknown field representing the transporting velocity
74 */
76{
77 la_vitesse = vit;
78}
79
80/*! @brief Returns the transporting velocity of the operator.
81 *
82 * @return (Champ_Inc_base&) the unknown field representing the transporting velocity
83 */
85{
86 return la_vitesse.valeur();
87}
88
89
90
91/*! @brief Types the operator.
92 *
93 * @param (Nom& typ) the name representing the type of the operator
94 */
95inline void Operateur_Conv::typer(const Nom& a_type)
96{
97 OWN_PTR(Operateur_Conv_base)::typer(a_type);
98}
99
101{
102 return this->operator bool();
103}
104#endif
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Operateur_Conv_base This class is the base of the hierarchy of operators representing.
Operateur_Conv Generic class of the hierarchy of operators representing a convection term.
Operateur_base & l_op_base() override
Returns the underlying object upcast to Operateur_base.
void typer() override
Types the operator: "Op_Conv" + keyword + discretisation + unknown.
OBS_PTR(Champ_base) la_vitesse
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
Initializes the array passed as parameter with the contribution of the operator.
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
Adds the contribution of the operator to the array passed as parameter.
const Champ_base & vitesse() const
Returns the transporting velocity of the operator.
void associer_norme_vitesse(const Champ_base &)
void associer_vitesse(const Champ_base &)
Associates the velocity (as the transporting velocity) to the convection operator.
int op_non_nul() const override
class Operateur_base This class is the base of the hierarchy of objects representing an
class Operateur Generic class of the operator hierarchy.
Definition Operateur.h:39