TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Convection_Diffusion_Temperature_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 <Convection_Diffusion_Temperature_IBM.h>
17#include <Discretisation_base.h>
18#include <Probleme_base.h>
19#include <Param.h>
20
21Implemente_instanciable(Convection_Diffusion_Temperature_IBM, "Convection_Diffusion_Temperature_IBM", Convection_Diffusion_Temperature);
22// XD convection_diffusion_temperature_ibm convection_diffusion_temperature convection_diffusion_temperature_ibm INHERITS_BRACE IBM Energy equation (temperature diffusion convection).
23// XD attr correction_variable_initiale entier correction_variable_initiale OPT Modify initial variable
24
26{
28}
29
31{
33 readOn_ibm_proto(is, *this);
34 return is;
35}
36
42
50
57
58// adds contributions from operators and sources
59void Convection_Diffusion_Temperature_IBM::assembler(Matrice_Morse& matrice, const DoubleTab& inco, DoubleTab& resu)
60{
61 assembler_ibm_proto(matrice, inco, resu);
62}
63
64// for IBM methods; adds PDF source to RHS
69
71{
72 if (is_IBM() && equation_non_resolue() == 0)
73 {
74 Cerr << "*******(IBM) Use an implicit time scheme (at least Euler explicit + diffusion) with Source_PDF_base.*******" << finl;
75 abort();
76 }
77}
int preparer_calcul() override
Everything that does not depend on other possible problems.
void assembler(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem) override
bool initTimeStep(double dt) override
Allocation and initialization of the unknown and boundary conditions until present+dt.
Convection_Diffusion_Temperature Special case of Convection_Diffusion_std.
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()
Everything that does not depend on other possible problems.
virtual bool initTimeStep(double dt)
Allocation and initialization of the unknown and boundary conditions until present+dt.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
static void abort()
Abort routine for TRUST on a fatal error.
Definition Process.cpp:573
Base class for output streams.
Definition Sortie.h:52