TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Operateur_Grad.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_Grad_included
17#define Operateur_Grad_included
18
19#include <Operateur_Grad_base.h>
20#include <TRUST_Deriv.h>
21#include <Operateur.h>
22
23/*! @brief Classe Operateur_Grad Classe generique de la hierarchie des operateurs calculant le gradient
24 *
25 * d'un champ. Un objet Operateur_Grad peut referencer n'importe quel
26 * objet derivant de Operateur_Grad_base.
27 *
28 * @sa Operateur_Grad_base Operateur
29 */
30class Operateur_Grad : public Operateur, public OWN_PTR(Operateur_Grad_base)
31{
32 Declare_instanciable(Operateur_Grad);
33public :
34
35 inline Operateur_base& l_op_base() override;
36 inline const Operateur_base& l_op_base() const override;
37 DoubleTab& ajouter(const DoubleTab&, DoubleTab& ) const override;
38 DoubleTab& calculer(const DoubleTab&, DoubleTab& ) const override;
39 void typer () override;
40 void typer_direct(const Nom&);
41 inline int op_non_nul() const override;
42
43};
44
45/*! @brief Renvoie l'objet sous-jacent upcaste en Operateur_base
46 *
47 * @return (Operateur_base&) l'objet sous-jacent upcaste en Operateur_base
48 */
50{
51 return valeur();
52}
53/*! @brief Renvoie l'objet sous-jacent upcaste en Operateur_base (version const)
54 *
55 * @return (Operateur_base&) l'objet sous-jacent upcaste en Operateur_base
56 */
58{
59 return valeur();
60}
61
63{
64 return this->operator bool();
65}
66
67#endif
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Classe Operateur_Grad Classe generique de la hierarchie des operateurs calculant le gradient.
int op_non_nul() const override
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
Initialise le tableau passe en parametre avec la contribution de l'operateur.
Operateur_base & l_op_base() override
Renvoie l'objet sous-jacent upcaste en Operateur_base.
void typer_direct(const Nom &)
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
Ajoute la contribution de l'operateur au tableau passe en parametre.
void typer() override
Type l'operateur: se type "Op_Grad_"+discretisation()+.
classe Operateur_base Classe est la base de la hierarchie des objets representant un
classe Operateur Classe generique de la hierarchie des operateurs.
Definition Operateur.h:39