TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Diff_negligeable.cpp
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#include <Op_Diff_negligeable.h>
17#include <Discretisation_base.h>
18#include <Champ_base.h>
19
20
21Implemente_instanciable(Op_Diff_negligeable,"Op_Diff_negligeable",Operateur_Diff_base);
22Implemente_instanciable(Op_Dift_negligeable,"Op_Dift_negligeable",Op_Diff_negligeable);
23
25
27
28Sortie& Op_Diff_negligeable::printOn(Sortie& os) const { return os; }
29
30Entree& Op_Diff_negligeable::readOn(Entree& is) { return is; }
31
32/*! @brief Associe la diffusivite a l'operateur.
33 *
34 * @param (Champ_Don_base& ch) le champ representant la diffusivite
35 */
37{
38 la_diffusivite=ch;
39}
40
41/*! @brief Renvoie le champ representant la diffusivite.
42 *
43 * @return (Champ_Don_base&) le champ representant la diffusivite
44 */
46{
47 return la_diffusivite.valeur();
48}
49
50void Op_Diff_negligeable::calculer_pour_post(Champ_base& espace_stockage,const Nom& option,int comp) const
51{
52 if (Motcle(option)=="stabilite")
53 {
54 DoubleTab& es_valeurs = espace_stockage.valeurs();
55 es_valeurs = calculer_dt_stab();
56 }
57 else
58 Operateur_base::calculer_pour_post(espace_stockage,option,comp);
59}
60
62{
63 Motcle loc;
64 if (Motcle(option)=="stabilite")
65 loc = "elem";
66 else if (Motcle(option)=="flux_bords" || Motcle(option)=="flux_surfacique_bords")
67 loc = "face";
68
69 return loc;
70}
71
72void Op_Diff_negligeable::ajouter_flux(const DoubleTab& inconnue, DoubleTab& contribution) const
73{
74 // nothing to do
75}
76
77void Op_Diff_negligeable::calculer_flux(const DoubleTab& inconnue, DoubleTab& flux) const
78{
79 flux = 0.0;
80}
81
virtual DoubleTab & valeurs()=0
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
Classe Op_Diff_negligeable Cette classe represente un operateur de diffusion negligeable.
void calculer_pour_post(Champ_base &espace_stockage, const Nom &option, int comp) const override
Motcle get_localisation_pour_post(const Nom &option) const override
void associer_diffusivite(const Champ_base &) override
Associe la diffusivite a l'operateur.
void calculer_flux(const DoubleTab &inconnue, DoubleTab &flux) const override
void ajouter_flux(const DoubleTab &inconnue, DoubleTab &contribution) const override
const Champ_base & diffusivite() const override
Renvoie le champ representant la diffusivite.
classe Operateur_Diff_base Cette classe est la base de la hierarchie des operateurs representant
void calculer_pour_post(Champ_base &espace_stockage, const Nom &option, int comp) const override
virtual double calculer_dt_stab() const
Calcul dt_stab.
Classe de base des flux de sortie.
Definition Sortie.h:52