TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_input_P0.h
1/****************************************************************************
2* Copyright (c) 2023, 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_input_P0_included
17#define Champ_input_P0_included
18
19#include <Champ_Fonc_P0_base.h>
20#include <Champ_Input_Proto.h>
21
22/*! @brief class Champ_input_P0
23 *
24 * Cette classe represente un champ accessible par setInputField
25 * defini sur le domane avec une valeur par element.
26 *
27 *
28 * @sa Champ_Input_Proto
29 */
30
32{
33 Declare_instanciable(Champ_input_P0);
34public:
36
37 void mettre_a_jour(double) override { }
38 void getTemplate(TrioField& afield) const override;
39 void setValue(const TrioField& afield) override;
40
41protected:
42 // Factorisation function between several input field classes
43 void set_nb_comp(int i) override; // calls fixer_nb_comp
44 void set_name(const Nom&) override; // calls nommer
45 virtual const Nom& get_name() const; // calls le_nom
46
47private:
48 int nb_elems_reels_sous_domaine_=0; //if sous-domaine : number of elements of the sous-domaine on this proc
49 int nb_elems_reels_loc_=0; //total number of local elements
50};
51
52#endif /* Champ_input_P0_included */
This is the base class for all the Fields which can be written by a call to Problem::setInputField.
class Champ_input_P0
void set_nb_comp(int i) override
void set_name(const Nom &) override
void setValue(const TrioField &afield) override
Fills valeurs_ on either the whole domain or a subdomaine.
void mettre_a_jour(double) override
Mise a jour en temps du champ.
virtual const Nom & get_name() const
friend class Champ_Input_P0_Composite
void getTemplate(TrioField &afield) const override
Provides afield with a name, a time interval, components, and no field ownership.
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31