TrioCFD 1.9.9_beta
TrioCFD documentation
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 class Champ_Proto Class representing a Field prototype.
25 *
26 * All classes
27 * representing fields derive from Champ_proto. Champ_proto offers
28 * classic methods on fields (min, max, norm, += ...)
29 * but does not contain a member representing data.
30 * Most Champ_proto methods call methods of the same name
31 * of a DoubleTab object returned by the abstract method
32 * of Champ_proto valeurs().
33 *
34 * @sa Champ_base DoubleTab, Abstract class., Abstract method:, 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 /* by default, these methods return 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 : that's forbidden !! that's all
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 */
class Champ_Proto Class representing a Field prototype.
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 of the field dimension Returns the dimension of the field.
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: a character string for naming TRUST objects.
Definition Nom.h:31