16#include <Eq_rayo_semi_transp.h>
17#include <Pb_rayo_semi_transp.h>
18#include <Matrice_Morse_Sym.h>
19#include <Champ_Uniforme.h>
20#include <Matrice_Bloc.h>
21#include <Discret_Thyd.h>
22#include <Fluide_base.h>
36 rayo_solv_->resoudre(temps);
58 if (mot ==
"conditions_limites|boundary_conditions")
63 else if (mot ==
"solveur")
65 Cerr <<
"Reading and typing of the radiation equation solver :" << finl;
66 Nom nom_solveur(
"Solv_");
69 nom_solveur += type_solv_sys;
70 Cerr <<
"Name of the radiation equation solver : " << nom_solveur << finl;
73 solveur_.nommer(
"solveur_irradiance");
87 le_dom_Cl_dis->les_conditions_limites(i)->associer_fr_dis_base(la_fr_dis);
91 Cerr <<
"Reading and typing of the diffusion operator of equation " <<
que_suis_je() << finl;
94 if (
fluide().is_rayo_semi_transp())
96 if (
fluide().is_longueur_rayo_discretised())
100 Cerr <<
"Error in Eq_rayo_semi_transp::completer." << finl;
101 Cerr <<
"You may not have discretized the problem of type Pb_Couple_rayo_semi_transp." << finl;
107 Cerr <<
"Error : the radiative properties of the incompressible fluid have not" << finl;
108 Cerr <<
"been defined while a semi transparent radiation problem is used." << finl;
109 Cerr <<
"The fields kappa and indice which respectively define the absoption coefficient" << finl;
110 Cerr <<
"and the refraction index must be added to the fluid properties." << finl;
115 Cerr <<
"Error while reading the Radiation equation. Your fluid is of type " <<
fluide().
que_suis_je() << finl;
116 Cerr <<
"Currently only fluid of type Fluide_base can be considered with the semi transparent radiation model." << finl;
130 rayo_solv_->assembler_matrice();
140 if (
fluide().is_rayo_semi_transp())
144 le_fluide_ = un_fluide;
148 Cerr <<
"Error : the radiative properties of the incompressible fluid have not" << finl;
149 Cerr <<
"been defined while a semi transparent radiation problem is used." << finl;
150 Cerr <<
"The fields kappa and indice which respectively define the absoption coefficient" << finl;
151 Cerr <<
"and the refraction index must be added to the fluid properties." << finl;
156 Cerr <<
"Error while reading the Radiation equation. Your fluid is of type " <<
fluide().
que_suis_je() << finl;
157 Cerr <<
"Currently only fluid of type Fluide_base can be considered with the semi transparent radiation model." << finl;
170 Cerr <<
"You forgot to associate the fluid to the problem named " <<
probleme().
le_nom() << finl;
173 return le_fluide_.valeur();
186 Cerr <<
"You forgot to associate the fluid to the problem named " <<
probleme().
le_nom() << finl;
189 return le_fluide_.valeur();
207 Cerr <<
"Error for Eq_rayo_semi_transp::operateur(int i)" << finl;
209 Cerr <<
"and you are trying to access the " << i <<
" th one." << finl;
230 Cerr <<
"Error for Eq_rayo_semi_transp::operateur(int i)" << finl;
232 Cerr <<
"and you are trying to access the " << i <<
" th one." << finl;
240 if (opt == DESCRIPTION)
250 Cerr <<
"Radiation equation discretisation" << finl;
258 if (discr ==
"VEFPreP1B") discr =
"VEF";
260 rayo_solv_.typer(type);
261 rayo_solv_->associer_equation_rayo(*
this);
271 return pb_rayo_semi_transp_->discretisation();
283 const int n1 = rayo_solv_->nb_colonnes_tot();
284 const int n2 = rayo_solv_->nb_colonnes();
297 DoubleTab ligne_tmp(n1);
298 for (
int i = 0; i < n2; i++)
307 for (k = tab1RR(i) - 1; k < tab1RR(i + 1) - 1; k++)
308 coeffRR[k] = ligne_tmp(tab2RR[k] - 1);
311 for (k = tab1RV(i) - 1; k < tab1RV(i + 1) - 1; k++)
312 coeffRV[k] = ligne_tmp(n2 + tab2RV[k] - 1);
318 const int n1 = rayo_solv_->nb_colonnes_tot();
319 const int n2 = rayo_solv_->nb_colonnes();
325 matrice_tmp.typer(
"Matrice_Bloc");
328 matrice.
get_bloc(0, 0).typer(
"Matrice_Morse_Sym");
329 matrice.
get_bloc(0, 1).typer(
"Matrice_Morse");
341 IntVect compteur_MBrr(n2);
342 IntVect compteur_MBrv(n2);
349 for (iligne = 0; iligne < n2; iligne++)
352 for (k = tab1(iligne) - 1; k < tab1(iligne + 1) - 1; k++)
354 jcolonne = tab2(k) - 1;
358 if ((jcolonne >= iligne) && (jcolonne < n2))
361 compteur_MBrr(iligne)++;
367 compteur_MBrv(iligne)++;
375 for (
int i = 0; i < n2; i++)
377 tab1RR(i + 1) = compteur_MBrr(i) + tab1RR(i);
378 tab1RV(i + 1) = compteur_MBrv(i) + tab1RV(i);
385 int compteurRR, compteurRV;
386 for (iligne = 0; iligne < n2; iligne++)
389 compteurRR = tab1RR(iligne) - 1;
390 compteurRV = tab1RV(iligne) - 1;
391 for (k = tab1(iligne) - 1; k < tab1(iligne + 1) - 1; k++)
393 jcolonne = tab2(k) - 1;
397 if ((jcolonne >= iligne) && (jcolonne < n2))
400 tab2RR(compteurRR) = tab2(k);
407 tab2RV(compteurRV) = tab2(k) - n2;
class Discret_Thyd This class is the base class representing a discretization
class Discretisation_base This class represents a spatial discretization scheme, which
void discretiser_champ(const Motcle &directive, const Domaine_dis_base &z, const Nom &nom, const Nom &unite, int nb_comp, int nb_pas_dt, double temps, OWN_PTR(Champ_Inc_base)&champ, const Nom &sous_type=NOM_VIDE) const
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
const Frontiere_dis_base & frontiere_dis(const Nom &) const
Returns the boundary of Name nom.
An input stream whose source is a character string.
Class defining operators and methods for all reading operation in an input flow (file,...
Milieu_base & milieu() override
Returns the physical medium of the equation (the Fluide_base upcast to Milieu_base).
void associer_milieu_base(const Milieu_base &) override
Associates a physical medium with the equation.
void set_param(Param &titi) const override
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void associer_pb_base(const Probleme_base &pb) override
Associates with the Problem passed as parameter.
void dimensionner_Mat_Bloc_Morse_Sym(Matrice &matrice_tmp)
void completer() override
Completes the construction (initialization) of objects associated with the equation.
void discretiser() override
Discretizes the equation.
bool initTimeStep(double dt) override
Allocation and initialization of the unknown and boundary conditions until present+dt.
Matrice_Morse la_matrice_
void associer_fluide(const Fluide_base &un_fluide)
void Mat_Morse_to_Mat_Bloc(Matrice &matrice_tmp)
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
const Operateur & operateur(int) const override
Returns the operator at the specified index: returns terme_diffusif if i = 0, exits if i > 0.
Operateur_Diff terme_diffusif_
const Discretisation_base & discretisation() const
Returns the discretisation associated with the equation.
int nombre_d_operateurs() const override
class Equation_base The role of an equation is the calculation of one or more fields....
virtual int verif_Cl() const
Verifies the compatibility of boundary conditions with the equation.
virtual void associer_pb_base(const Probleme_base &)
Associates with the Problem passed as parameter.
virtual Entree & lire_cl(Entree &)
Reading of boundary conditions in an input stream.
virtual void completer()
Completes the construction (initialization) of objects associated with the equation.
Probleme_base & probleme()
Returns the problem associated with the equation.
virtual void associer_sch_tps_base(const Schema_Temps_base &)
Associates the time scheme with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual bool initTimeStep(double dt)
Allocation and initialization of the unknown and boundary conditions until present+dt.
virtual void discretiser()
Discretizes the equation.
Champs_compris champs_compris_
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
Base class for an incompressible fluid and its properties:
class Frontiere_dis_base Class representing a discretized boundary.
virtual void dimensionner(int N, int M)
virtual const Matrice & get_bloc(int i, int j) const
Matrice_Morse_Sym class - Represents a sparse symmetric matrix M stored in Morse format.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
void dimensionner(int n, _SIZE_ nnz)
Size the matrix with n lines and n columns and nnz zero-values coefficients.
Matrice class - Generic class in the matrix hierarchy.
Milieu_base This class is the base of the (physical) medium hierarchy.
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
An array of character strings (VECT(Nom)).
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
class Operateur Generic class of the operator hierarchy.
Helper class to factorize the readOn method of Objet_U classes.
void ajouter_non_std(const char *keyword, const Objet_U *value, Param::Nature nat=Param::OPTIONAL)
Register a keyword handled by Objet_U::lire_motcle_non_standard.
Semi-transparent radiation problem. Pb_rayo_semi_transp is a Probleme_base with 4 specific features:
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
class Probleme_base It is a Probleme_U that is not a coupling.
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.