TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Domaine_Cl_dis_base.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 Domaine_Cl_dis_base_included
17#define Domaine_Cl_dis_base_included
18
19#include <Conds_lim.h>
20#include <TRUST_Ref.h>
21#include <MorEqn.h>
22#include <Domaine_forward.h>
23
24/*! @brief class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
25 *
26 * . Domaine_Cl_dis_base is a piece of equation so it
27 * inherits from MorEqn, it is through this inheritance that each
28 * Domaine_Cl_dis_base object contains a reference to the equation to which it
29 * refers. The discretized boundary conditions represent the
30 * boundary conditions of the discretized domain associated with the equation
31 * referenced by Domaine_Cl_dis_base.
32 * Domaine_Cl_dis_base has a member representing the boundary conditions.
33 *
34 * @sa MorEqn Conds_lim Cond_lim_base, Abstract class., Abstract methods:, void completer(const Domaine_dis_base& ), void imposer_cond_lim(Champ_Inc_base& )
35 */
36class Domaine_Cl_dis_base : public MorEqn, public Objet_U
37{
38
39 Declare_base(Domaine_Cl_dis_base);
40
41public:
42
43 // Method overridden from Objet_U:
44 void nommer(const Nom& nom) override;
45 const Cond_lim& les_conditions_limites(int ) const;
48 const Conds_lim& les_conditions_limites() const;
49 int nb_cond_lim() const;
50 virtual void mettre_a_jour(double temps);
51 virtual void mettre_a_jour_ss_pas_dt(double temps);
52 void resetTime(double time);
53 void completer();
54 int contient_Cl(const Nom&);
56 const Domaine_dis_base& domaine_dis() const;
57 Domaine& domaine();
58 const Domaine& domaine() const;
59
60 virtual void associer(const Domaine_dis_base& ddb) { /* Does nothing by default */ }
61
62 virtual int calculer_coeffs_echange(double temps);
63 // !SC: passing OWN_PTR(Champ_Inc_base) is no longer necessary since there is a ref now
64 virtual void imposer_cond_lim(Champ_Inc_base&,double ) = 0;
65 int nb_faces_Cl() const;
66
67 virtual const Cond_lim& la_cl_de_la_face(int num_face) const;
68
69 const Cond_lim_base& condition_limite_de_la_face_reelle(int face_globale, int& face_locale) const;
70 const Cond_lim_base& condition_limite_de_la_face_virtuelle(int face_globale, int& face_locale) const;
73 void changer_temps_futur(double temps,int i);
74 void calculer_derivee_en_temps(double t1, double t2);
75 void set_temps_defaut(double temps);
76 int avancer(double temps);
77 int reculer(double temps);
78 virtual int initialiser(double temps);
79 inline const Nom& le_nom() const override;
80
81 virtual void associer_inconnue(const Champ_Inc_base&);
82 virtual const Champ_Inc_base& inconnue() const;
83 virtual Champ_Inc_base& inconnue();
84
85protected:
86
89 OBS_PTR(Champ_Inc_base) mon_inconnue;
90 virtual void completer(const Domaine_dis_base& ) = 0;
91};
92
93inline const Nom& Domaine_Cl_dis_base::le_nom() const
94{
95 return nom_;
96}
97
98#endif
99
Class Champ_Inc_base.
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
class Cond_lim Generic class used to represent any class
Definition Cond_lim.h:31
class Conds_lim This class represents a vector of boundary conditions.
Definition Conds_lim.h:32
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
virtual void mettre_a_jour_ss_pas_dt(double temps)
Performs a time update for sub-time-steps of a time scheme (e.g. in RungeKutta).
virtual void associer(const Domaine_dis_base &ddb)
virtual int calculer_coeffs_echange(double temps)
Computes the exchange coefficients for thermally coupled problems.
void calculer_derivee_en_temps(double t1, double t2)
Computes the growth rate of unsteady BCs between t1 and t2.
void nommer(const Nom &nom) override
Assigns a name to the Objet_U. Virtual method to override.
virtual int initialiser(double temps)
Initializes the BCs. Unlike the update methods, the.
virtual const Champ_Inc_base & inconnue() const
const Cond_lim_base & condition_limite_de_la_frontiere(Nom frontiere) const
Returns the boundary condition associated with a boundary of the given name.
int reculer(double temps)
Rotates the wheel of all BCs back to the given time.
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
virtual void imposer_cond_lim(Champ_Inc_base &, double)=0
int nb_cond_lim() const
Returns the number of boundary conditions.
virtual const Cond_lim & la_cl_de_la_face(int num_face) const
Given a boundary face index in the Domaine_VF, returns the boundary condition to which this face.
void completer()
Calls Cond_lim_base::completer() on each boundary condition.
virtual void completer(const Domaine_dis_base &)=0
Conds_lim & les_conditions_limites()
Returns the array of boundary conditions.
void resetTime(double time)
Domaine_dis_base & domaine_dis()
Returns a reference to the discretized domain associated with the boundary conditions.
virtual void associer_inconnue(const Champ_Inc_base &)
void set_temps_defaut(double temps)
Changes the i-th future time of all BCs.
virtual void mettre_a_jour(double temps)
Performs a time update of all boundary conditions.
int avancer(double temps)
Rotates the wheel of all BCs up to the given time.
int contient_Cl(const Nom &)
Returns 1 if the object contains a boundary condition with the specified Name.
const Cond_lim_base & condition_limite_de_la_face_reelle(int face_globale, int &face_locale) const
Returns the boundary condition associated with a given real face.
const Cond_lim_base & condition_limite_de_la_face_virtuelle(int face_globale, int &face_locale) const
Returns the boundary condition associated with a given virtual face.
OBS_PTR(Champ_Inc_base) mon_inconnue
void changer_temps_futur(double temps, int i)
Changes the i-th future time of all BCs.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
class MorEqn Class that groups the functionalities of linking with an
Definition MorEqn.h:35
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Definition Objet_U.cpp:54