TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_Generique_Predefini.h
1/****************************************************************************
2* Copyright (c) 2026, 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
17#ifndef Champ_Generique_Predefini_included
18#define Champ_Generique_Predefini_included
19
20#include <Champ_Gen_de_Champs_Gen.h>
21
22
23/*! @brief class Champ_Generique_Predefini
24 *
25 */
26
27// Field intended to encapsulate a generic field whose expression is predefined
28// so that users have shortcuts in terms of syntax
29//
30//// Data file syntax to follow
31//
32// "field_name" Predefini { Pb_champ "pb_name" "field_name_to_create" }
33//
34// "field_name" set by the user will be the name of the constructed generic field (field_)
35// "field_name_to_create" type of generic field to create (ex: kinetic_energy)
36
37
39{
40
41 Declare_instanciable(Champ_Generique_Predefini);
42
43public:
44
45 void set_param(Param& param) const override;
46 int lire_motcle_non_standard(const Motcle&, Entree&) override;
47 void completer(const Postraitement_base& post) override;
48 const Champ_Generique_base& get_source(int i) const override;
49 const Noms get_property(const Motcle& query) const override;
50 const Champ_base& get_champ(OWN_PTR(Champ_base)& espace_stockage) const override;
51 const Champ_base& get_champ_without_evaluation(OWN_PTR(Champ_base)& espace_stockage) const override;
52 void nommer(const Nom&) override;
53 const Nom& get_nom_post() const override;
54 void nommer_source() override;
56
57protected:
58
59 Nom type_champ_; //Type of predefined field to read (ex: energie_cinetique)
61 OWN_PTR(Champ_Generique_base) champ_; //The generic field predefined by type_champ_
62
63};
64
65#endif
66
Base class of generic fields having other generic fields as source. The use of the class methods reli...
class Champ_Generique_Predefini
const Champ_base & get_champ(OWN_PTR(Champ_base)&espace_stockage) const override
void nommer(const Nom &) override
Assigns a name to the Objet_U. Virtual method to override.
OWN_PTR(Champ_Generique_base) champ_
const Nom & get_nom_post() const override
const Champ_base & get_champ_without_evaluation(OWN_PTR(Champ_base)&espace_stockage) const override
const Noms get_property(const Motcle &query) const override
Returns the requested property.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void completer(const Postraitement_base &post) override
const Champ_Generique_base & get_source(int i) const override
void set_param(Param &param) const override
class Champ_Generique_base
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
friend class Entree
Definition Objet_U.h:71
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Base class for all post-processing objects.