TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Champ_Proto.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 Champ_Proto_included
17#define Champ_Proto_included
18
19#include <TRUSTTab.h>
20
21class Nom;
22class Entree;
23
24/*! @brief classe Champ_Proto Classe representant un prototype de Champ.
25 *
26 * Tous les classes
27 * representant des champs derivent de Champ_proto. Champ_proto offre
28 * des methodes classiques sur des champs (min, max, norme, += ...)
29 * mais ne contient pas de membre representant des donnees.
30 * La plupart des methodes de Champ_proto font appel aux methodes de
31 * meme nom d'un objet DoubleTab renvoye par la methode abstraite
32 * de Champ_proto valeurs().
33 *
34 * @sa Champ_base DoubleTab, Classe abstraite., Methode abstraite:, DoubleTab& valeurs()=0, const DoubleTab& valeurs() const
35 */
37{
38public:
39 virtual ~Champ_Proto() { }
40 virtual DoubleTab& valeurs()=0;
41 virtual const DoubleTab& valeurs() const =0;
42
43 /* par defaut, ces methodes renvoient valeurs() */
44 virtual inline DoubleTab& valeurs(double temps) { return valeurs(); }
45 virtual inline const DoubleTab& valeurs(double temps) const { return valeurs(); }
46
47 virtual inline DoubleTab& futur(int i = 1) { return valeurs(); }
48 virtual inline const DoubleTab& futur(int i = 1) const { return valeurs(); }
49
50 virtual inline DoubleTab& passe(int i = 1) { return valeurs(); }
51 virtual inline const DoubleTab& passe(int i = 1) const { return valeurs(); }
52
53 int lire_dimension(Entree&, const Nom&);
54 int lire_dimension(int dim, const Nom& le_nom_);
55
56 // XXX : Elie Saikali : ca c'est interdit !! c'est tout
57 double operator()(int i, int j) const = delete;
58 double& operator()(int i, int j) = delete;
59 double operator()(int i) const = delete;
60 double& operator()(int i) = delete;
61};
62
63#endif /* Champ_Proto_included */
classe Champ_Proto Classe representant un prototype de Champ.
Definition Champ_Proto.h:37
virtual DoubleTab & futur(int i=1)
Definition Champ_Proto.h:47
virtual const DoubleTab & passe(int i=1) const
Definition Champ_Proto.h:51
double & operator()(int i)=delete
virtual const DoubleTab & valeurs() const =0
virtual const DoubleTab & futur(int i=1) const
Definition Champ_Proto.h:48
virtual DoubleTab & valeurs()=0
double operator()(int i) const =delete
int lire_dimension(Entree &, const Nom &)
Verification de la dimension du champ Renvoie la dimension du champ.
double & operator()(int i, int j)=delete
virtual DoubleTab & valeurs(double temps)
Definition Champ_Proto.h:44
virtual ~Champ_Proto()
Definition Champ_Proto.h:39
virtual const DoubleTab & valeurs(double temps) const
Definition Champ_Proto.h:45
virtual DoubleTab & passe(int i=1)
Definition Champ_Proto.h:50
double operator()(int i, int j) const =delete
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31