TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Convection_Diffusion_Fluide_Dilatable_Proto.h
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#ifndef Convection_Diffusion_Fluide_Dilatable_Proto_included
17#define Convection_Diffusion_Fluide_Dilatable_Proto_included
18
19#include <TRUSTTabs_forward.h>
20#include <Interface_blocs.h>
21
25class Champ_Inc_base;
26class Probleme_base;
27class Matrice_Morse;
28class YAML_data;
29class Sortie;
30class Entree;
31
33{
34public:
35 // E Saikali
36 // Convection_Diffusion_std because of virtual inheritance — calling the base class from the other side...
37 // Otherwise methods must be placed in Equation_base... to be decided...
38 // [ Templates would be nicer here... unfortunately!]
39 static std::vector<YAML_data> data_a_sauvegarder(const Convection_Diffusion_std& eq, const Fluide_Dilatable_base& fld);
40 static int Sauvegarder_WC(Sortie& os, const Convection_Diffusion_std& eq, const Fluide_Dilatable_base& fld);
41 static int Reprendre_WC(Entree& is, double temps,Convection_Diffusion_std& eq, Fluide_Dilatable_base& fld,
42 Champ_Inc_base& inco, Probleme_base& pb);
43
45
46protected:
47 public_for_cuda
49 Matrice_Morse& mat_morse, const DoubleTab& present, DoubleTab& secmem);
50protected:
51 void calculer_div_rho_u_impl(DoubleTab& res, const Convection_Diffusion_Fluide_Dilatable_base& eqn ) const;
52 void assembler_blocs(Convection_Diffusion_Fluide_Dilatable_base& eqn,matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl);
53
55 DoubleTab& derivee, const bool is_expl);
56
57 virtual void calculer_div_u_ou_div_rhou(DoubleTab& res) const = 0;
58 virtual bool is_thermal() const = 0;
59 virtual bool is_generic() const = 0;
60 mutable OWN_PTR(Champ_Inc_base) ch_unite_;
61#ifdef TRUST_USE_GPU
62 BigDoubleVect tab_coeff_diffusif_; // Work array
63#else
64 DoubleVect tab_coeff_diffusif_; // Work array
65#endif
66};
67
68#endif /* Convection_Diffusion_Fluide_Dilatable_Proto_included */
Class Champ_Inc_base.
void calculer_div_rho_u_impl(DoubleTab &res, const Convection_Diffusion_Fluide_Dilatable_base &eqn) const
static std::vector< YAML_data > data_a_sauvegarder(const Convection_Diffusion_std &eq, const Fluide_Dilatable_base &fld)
DoubleTab & derivee_en_temps_inco_sans_solveur_masse_impl(Convection_Diffusion_Fluide_Dilatable_base &eqn, DoubleTab &derivee, const bool is_expl)
Returns the time derivative of the equation's unknown.
public_for_cuda void assembler_impl(Convection_Diffusion_Fluide_Dilatable_base &eqn, Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
static int Reprendre_WC(Entree &is, double temps, Convection_Diffusion_std &eq, Fluide_Dilatable_base &fld, Champ_Inc_base &inco, Probleme_base &pb)
virtual void calculer_div_u_ou_div_rhou(DoubleTab &res) const =0
static int Sauvegarder_WC(Sortie &os, const Convection_Diffusion_std &eq, const Fluide_Dilatable_base &fld)
void assembler_blocs(Convection_Diffusion_Fluide_Dilatable_base &eqn, matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl)
Base class for convection-diffusion equations for a dilatable fluid.
Convection_Diffusion_std This class is the base for equations modelling the transport.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Base class for a dilatable fluid, inheriting from Fluide_base.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
class Probleme_base It is a Probleme_U that is not a coupling.
Base class for output streams.
Definition Sortie.h:52
YAML_data class: collection of all needed information for data to save/restore in order to write the ...
Definition YAML_data.h:26