TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Integrale_tps_produit_champs.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 Integrale_tps_produit_champs_included
17#define Integrale_tps_produit_champs_included
18
19#include <Integrale_tps_Champ.h>
20
21/*! @brief classe Integrale_tps_produit_champs Cette classe represente l'integrale en temps d'un produit de 2 champs
22 *
23 * eleves a une puissance entiere et positive entre un temps initial et un
24 * temps courant
25 * Un objet Integrale_tps_produit_champs a donc 2 champs associes dont
26 * il represente l'integrale du produit.
27 *
28 */
30{
31 Declare_instanciable(Integrale_tps_produit_champs);
32public:
33
34 inline const OBS_PTR(Champ_Generique_base)& mon_premier_champ() const { return le_champ_ref_; }
35 inline const OBS_PTR(Champ_Generique_base)& mon_second_champ() const { return le_second_champ_ref_; }
36 inline int premiere_puissance() const { return puissance_; }
37 inline int seconde_puissance() const { return seconde_puissance_; }
38 inline const int& get_support_different() const { return support_different_; }
39 inline int& support_different() { return support_different_; }
40
41 inline void associer(const Champ_Generique_base& ch1, const Champ_Generique_base& ch2, int n1, int n2, double t0, double t1)
42 {
43 Integrale_tps_Champ::associer(ch1, n1, t0, t1);
44 le_second_champ_ref_ = ch2;
46 }
47
48 inline void mettre_a_jour(double) override
49 {
51 OWN_PTR(Champ_base) espace_stockage_source;
52 const Champ_base& source = le_champ_ref_->get_champ(espace_stockage_source);
53 le_champ_->changer_temps(source.temps());
54 }
55
56 void mettre_a_jour_integrale() override;
57 void ajoute_produit_tensoriel(double, const Champ_base&, const Champ_base&);
58
59protected:
60 OBS_PTR(Champ_Generique_base) le_second_champ_ref_;
62};
63
64#endif /* Integrale_tps_produit_champs_included */
class Champ_Generique_base
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
virtual double changer_temps(const double t)
Fixe le temps auquel se situe le champ.
double temps() const
Renvoie le temps du champ.
void associer(const Champ_base &, int, double, double)
OWN_PTR(Champ_Fonc_base) le_champ_
classe Integrale_tps_produit_champs Cette classe represente l'integrale en temps d'un produit de 2 ch...
OBS_PTR(Champ_Generique_base) le_second_champ_ref_
const OBS_PTR(Champ_Generique_base) &mon_premier_champ() const
void mettre_a_jour_integrale() override
Mets a jour l'integrale.
const OBS_PTR(Champ_Generique_base) &mon_second_champ() const
void ajoute_produit_tensoriel(double, const Champ_base &, const Champ_base &)
void associer(const Champ_Generique_base &ch1, const Champ_Generique_base &ch2, int n1, int n2, double t0, double t1)