TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Operateur_NConserv.cpp
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#include <Operateur_NConserv.h>
17
18Implemente_instanciable(Operateur_NConserv, "Operateur_NConserv", OWN_PTR(Operateur_NConserv_base));
19// XD op_non_conservativtifs_deriv objet_lecture op_non_conservativtifs_deriv NO_BRACE not_set
20
21
22// XD termes_non_conservatifs_negligeable op_non_conservativtifs_deriv negligeable NO_BRACE For Coloc discretization.
23// XD_CONT Suppresses the non_conservative operator.
24
25// XD termes_non_conservatifs_hll op_non_conservativtifs_deriv hll NO_BRACE Keyword for Coloc discretization. Activates
26// XD_CONT the HLL non-conservative scheme.
27
28// XD convection_hll convection_deriv hll NO_BRACE Keyword for Coloc discretization. Activates the HLL conservative
29// XD_CONT scheme.
30
31// XD convection_rusanov convection_deriv rusanov NO_BRACE Keyword for Coloc discretization. Activates the Rusanov
32// XD_CONT conservative scheme.
33
34Sortie& Operateur_NConserv::printOn(Sortie& os) const { return Operateur::ecrire(os); }
35
36Entree& Operateur_NConserv::readOn(Entree& is)
37{
39 return is;
40}
41
43{
44 if (Motcle(typ) == Motcle("negligeable"))
45 {
46 OWN_PTR(Operateur_NConserv_base)::typer("Op_NConserv_negligeable");
47 }
48 else
49 {
50 Equation_base& eqn = mon_equation.valeur();
51 Nom nom_type = eqn.discretisation().get_name_of_type_for(que_suis_je(), typ, eqn);
52 OWN_PTR(Operateur_NConserv_base)::typer(nom_type);
53 }
54 Cerr << valeur().que_suis_je() << finl;
55}
56
57DoubleTab& Operateur_NConserv::ajouter(const DoubleTab& donnee, DoubleTab& resu) const
58{
59 DoubleTab& tmp = valeur().ajouter(donnee, resu);
60 return tmp;
61}
62
63DoubleTab& Operateur_NConserv::calculer(const DoubleTab& donnee, DoubleTab& resu) const
64{
65 DoubleTab& tmp = valeur().calculer(donnee, resu);
66 return tmp;
67}
68
virtual Nom get_name_of_type_for(const Nom &class_operateur, const Nom &type_operteur, const Equation_base &eqn, const OBS_PTR(Champ_base)&champ_supp=OBS_PTR(Champ_base)()) const
remplit le Nom type en focntion de la classe de operateur, du type de l'operateur et de l'equation
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
const Discretisation_base & discretisation() const
Renvoie la discretisation associee a l'equation.
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
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
Entree & lire(Entree &)
Lit un operateur sur un flot d'entree.
Definition Operateur.cpp:44
Sortie & ecrire(Sortie &) const
Definition Operateur.cpp:24
Motcle typ
Definition Operateur.h:76
Classe de base des flux de sortie.
Definition Sortie.h:52