TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Operateur_negligeable.h
1/****************************************************************************
2* Copyright (c) 2024, 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_negligeable_included
17#define Operateur_negligeable_included
18
19#include <TRUSTTab.h>
20
23class Champ_Inc_base;
24
25/*! @brief Classe Opnegligeable This class defines the interface of a negligible operator
26 *
27 * by defining ajouter, calculer and mettre_a_jour methods
28 * that perform no computation.
29 * This class is used when defining negligible operators
30 * through multiple inheritance.
31 *
32 * @sa Op_Diff_negligeable Op_Diff_K_Eps_negligeable Op_Conv_negligeable, Interface class, outside the TRUST operator hierarchy., Must be part of a multiple inheritance to be, useful for defining an instantiable negligible operator.
33 */
35{
36public :
37
38 inline DoubleTab& ajouter(const DoubleTab&, DoubleTab& ) const;
39 inline DoubleTab& calculer(const DoubleTab&, DoubleTab& ) const;
40 inline void mettre_a_jour(double );
41
42protected :
43 inline void associer(const Domaine_dis_base&, const Domaine_Cl_dis_base&, const Champ_Inc_base&);
44};
45
46
47
48/*! @brief Adds the contribution of a negligible operator to an array.
49 *
50 * DOES NOTHING, returns the array parameter unmodified.
51 *
52 * @param (DoubleTab&) the array on which the operator is applied
53 * @param (DoubleTab& x)
54 * @return (DoubleTab&) the input parameter x unmodified
55 */
56inline DoubleTab& Operateur_negligeable::ajouter(const DoubleTab&, DoubleTab& x) const
57{
58 return x;
59}
60
61
62/*! @brief Initializes the array parameter with the contribution of the negligible operator: initializes the array to ZERO.
63 *
64 * @param (DoubleTab&) the array on which the operator is applied
65 * @param (DoubleTab& x)
66 * @return (DoubleTab&) the input array set to zero
67 */
68inline DoubleTab& Operateur_negligeable::calculer(const DoubleTab&,
69 DoubleTab& x) const
70{
71 return x=0.0;
72}
73
74
75/*! @brief Time update of a negligible operator: DOES NOTHING
76 *
77 * @param (double)
78 */
80{
81}
82
83
84/*! @brief Associates various objects to a negligible operator: DOES NOTHING
85 *
86 * @param (Domaine_dis_base&)
87 * @param (Domaine_Cl_dis_base&)
88 * @param (Champ_Inc_base&)
89 */
93#endif
Class Champ_Inc_base.
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Classe Opnegligeable This class defines the interface of a negligible operator.
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const
Initializes the array parameter with the contribution of the negligible operator: initializes the arr...
void mettre_a_jour(double)
Time update of a negligible operator: DOES NOTHING.
void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &, const Champ_Inc_base &)
Associates various objects to a negligible operator: DOES NOTHING.
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const
Adds the contribution of a negligible operator to an array.