TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Sources.h
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#ifndef Sources_included
17#define Sources_included
18
19#include <TRUST_List.h>
20#include <Source.h>
21
22/*! @brief class Sources Sources represents a list of Source objects.
23 *
24 * An equation contains a member Equation_base::les_sources of type
25 * Sources. A Sources object is a piece of an equation, so this class
26 * inherits from MorEqn.
27 *
28 * @sa Source MorEqn
29 */
30class Sources : public LIST(Source), public MorEqn
31{
32 Declare_instanciable(Sources);
33
34public:
35 DoubleTab& ajouter(DoubleTab& ) const;
36 DoubleTab& calculer(DoubleTab& ) const;
37 void contribuer_jacobienne(Matrice_Bloc& matrice, int n) const;
38 void mettre_a_jour(double temps);
39 void resetTime(double temps);
40 void completer();
41 void dimensionner(Matrice_Morse&) const;
42 void contribuer_a_avec(const DoubleTab&, Matrice_Morse&) const;
43 //void contribuer_au_second_membre(DoubleTab& ) const ;
44 virtual void associer_champ_rho(const Champ_base& champ_rho);
45 virtual int a_pour_Champ_Fonc(const Motcle& mot,
46 OBS_PTR(Champ_base)& ch_ref) const;
47 int impr(Sortie&) const;
48 int initialiser(double temps);
49 void check_multiphase_compatibility() const override;
50};
51
52#endif
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
class MorEqn Class that groups the functionalities of linking with an
Definition MorEqn.h:35
OBS_PTR(Equation_base) mon_equation
A character string (Nom) in uppercase.
Definition Motcle.h:26
Base class for output streams.
Definition Sortie.h:52
class Sources Sources represents a list of Source objects.
Definition Sources.h:31
void contribuer_jacobienne(Matrice_Bloc &matrice, int n) const
Definition Sources.cpp:211
int impr(Sortie &) const
Calls Source::impr() on all sources in the list.
Definition Sources.cpp:176
void contribuer_a_avec(const DoubleTab &, Matrice_Morse &) const
Contribution to the implicit matrix of source terms. By default, no contribution.
Definition Sources.cpp:201
int initialiser(double temps)
Calls Source::initialiser(temps) on all sources in the list.
Definition Sources.cpp:226
void resetTime(double temps)
Rest all sources to a given time See ProblemeTrio::resetTime().
Definition Sources.cpp:117
void mettre_a_jour(double temps)
Time update of all sources in the list.
Definition Sources.cpp:109
virtual int a_pour_Champ_Fonc(const Motcle &mot, OBS_PTR(Champ_base)&ch_ref) const
For each source in the list, calls a_pour_Champ_Fonc(mot,ch_ref).
Definition Sources.cpp:154
void check_multiphase_compatibility() const override
Definition Sources.cpp:234
void dimensionner(Matrice_Morse &) const
Sizing of the implicit matrix of source terms.
Definition Sources.cpp:187
void completer()
Calls Source::completer() on all sources in the list.
Definition Sources.cpp:127
virtual void associer_champ_rho(const Champ_base &champ_rho)
For each source in the list, calls the associer_champ_rho method of the source.
Definition Sources.cpp:139
DoubleTab & ajouter(DoubleTab &) const
Adds the contribution of all sources in the list to the array passed as parameter,...
Definition Sources.cpp:85
DoubleTab & calculer(DoubleTab &) const
Calculates the contribution of all sources in the list and stores the result in the array passed as p...
Definition Sources.cpp:98