TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Conduction_IBM.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 <Conduction_IBM.h>
17#include <Param.h>
18
19Implemente_instanciable(Conduction_IBM, "Conduction_IBM", Conduction);
20// XD Conduction_ibm Conduction Conduction_ibm INHERITS_BRACE IBM Heat equation.
21// XD attr correction_variable_initiale entier correction_variable_initiale OPT Modify initial variable
22
24{
25 return s << que_suis_je() << finl;
26}
27
29{
31 readOn_ibm_proto(is, *this);
32 return is;
33}
34
36{
39}
40
47
49{
52 return true;
53}
54
55// ajoute les contributions des operateurs et des sources
56void Conduction_IBM::assembler(Matrice_Morse& matrice, const DoubleTab& inco, DoubleTab& resu)
57{
58 assembler_ibm_proto(matrice, inco, resu);
59}
60
61// for IBM methods; on ajoute source PDF au RHS
66
68{
69 if (equation_non_resolue() == 0)
70 {
71 Cerr << "*******(IBM) Use an implicit time scheme (at least Euler explicit + diffusion) with Source_PDF_base.*******" << finl;
72 abort();
73 }
74}
bool initTimeStep(double dt) override
Allocation et initialisation de l'inconnue et des CLs jusqu'a present+dt.
void verify_scheme() override
void derivee_en_temps_inco_sources(DoubleTrav &) override
void set_param(Param &titi) const override
int preparer_calcul() override
Tout ce qui ne depend pas des autres problemes eventuels.
void assembler(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem) override
Classe Conduction Cette classe represente l'equation d'evolution.
Definition Conduction.h:41
void set_param(Param &) const override
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
bool initTimeStep_ibm_proto(double ddt)
Entree & readOn_ibm_proto(Entree &is, Equation_base &eq)
void assembler_ibm_proto(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
void set_param_ibm_proto(Param &param) const
DoubleTab & derivee_en_temps_inco_ibm_proto(DoubleTab &)
virtual int equation_non_resolue() const
virtual int preparer_calcul()
Tout ce qui ne depend pas des autres problemes eventuels.
virtual bool initTimeStep(double dt)
Allocation et initialisation de l'inconnue et des CLs jusqu'a present+dt.
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
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
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
static void abort()
Routine de sortie de Trio-U sur une erreur abort().
Definition Process.cpp:570
Classe de base des flux de sortie.
Definition Sortie.h:52