TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Correlation_Vec_Sca_VEF.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 Correlation_Vec_Sca_VEF_included
17#define Correlation_Vec_Sca_VEF_included
18
19#include <Champ_Fonc_P1NC.h>
20
21/*! @brief classe Correlation_Vec_Sca_VEF
22 *
23 * @sa Champ_Fonc_P1NC Correlation_Vec_Sca_VEF
24 */
26{
27 Declare_instanciable(Correlation_Vec_Sca_VEF);
28public:
29 void associer_champ_Vec(const Champ_base&);
30 void associer_champ_Sca(const Champ_base&);
31
32 inline const Champ_base& mon_champ_Vec() const { return mon_champ_Vec_.valeur(); }
33 inline const Champ_base& mon_champ_Sca() const { return mon_champ_Sca_.valeur(); }
34 inline void mettre_a_jour(double) override;
35
36protected:
38};
39
41{
42 DoubleTab& valeurs_Vec = mon_champ_Vec_->valeurs();
43 DoubleTab& valeurs_Sca = mon_champ_Sca_->valeurs();
44 int nb_faces = valeurs_Sca.size();
45
46 DoubleTab& correlation = valeurs();
47 int face, ncom;
48 for (face = 0; face < nb_faces; face++)
49 {
50 correlation(face, 0) = valeurs_Sca(face);
51 for (ncom = 0; ncom < dimension; ncom++)
52 correlation(face, ncom + 1) = valeurs_Vec(face, ncom);
53 }
54
55 changer_temps(tps);
57}
58
59#endif /* Correlation_Vec_Sca_VEF_included */
DoubleTab & valeurs() override
Surcharge Champ_base::valeurs() Renvoie le tableau des valeurs.
classe Champ_Fonc_P1NC
void mettre_a_jour(double temps) override
Mise a jour en temps du champ.
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.
classe Correlation_Vec_Sca_VEF
const Champ_base & mon_champ_Sca() const
void associer_champ_Sca(const Champ_base &)
const Champ_base & mon_champ_Vec() const
void mettre_a_jour(double) override
Mise a jour en temps du champ.
void associer_champ_Vec(const Champ_base &)
OBS_PTR(Champ_base) mon_champ_Vec_
static int dimension
Definition Objet_U.h:99
_SIZE_ size() const
Definition TRUSTVect.tpp:45