TrioCFD 1.9.9_beta
TrioCFD documentation
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 Generic class of the hierarchy of operators computing the gradient
24 *
25 * of a field. An Operateur_Grad object can reference any object
26 * derived from 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 Returns the underlying object upcast to Operateur_base
46 *
47 * @return (Operateur_base&) the underlying object upcast to Operateur_base
48 */
50{
51 return valeur();
52}
53/*! @brief Returns the underlying object upcast to Operateur_base (const version)
54 *
55 * @return (Operateur_base&) the underlying object upcast to Operateur_base
56 */
58{
59 return valeur();
60}
61
63{
64 return this->operator bool();
65}
66
67#endif
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Classe Operateur_Grad Generic class of the hierarchy of operators computing the gradient.
int op_non_nul() const override
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
Initializes the array passed as parameter with the contribution of the operator.
Operateur_base & l_op_base() override
Returns the underlying object upcast to Operateur_base.
void typer_direct(const Nom &)
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
Adds the contribution of the operator to the array passed as parameter.
void typer() override
Types the operator: types as "Op_Grad_"+discretisation()+.
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