TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Schema_Euler_Implicite_Stationnaire Class Reference

#include <Schema_Euler_Implicite_Stationnaire.h>

Inheritance diagram for Schema_Euler_Implicite_Stationnaire:
[legend]
Collaboration diagram for Schema_Euler_Implicite_Stationnaire:
[legend]

Public Member Functions

void set_param (Param &) const override
int mettre_a_jour () override
 Updates the current time (t+=dt) and the number of time steps performed (nb_pas_dt_++).
int reprendre (Entree &) override
 Restores an Objet_U from an input stream. Virtual method to override.
void ajouter_inertie (Matrice_Base &mat_morse, DoubleTab &secmem, const Equation_base &eqn) const override
void initialize () override
void mettre_a_jour_dt_stab () override
bool corriger_dt_calcule (double &dt_calc) const override
 Corrects the computed time step passed as parameter and verifies it is not "too" small (< dt_min_).
bool iterateTimeStep (bool &converged) override
 Calculate the U(n+1) unknown for each equation (if solved) of the problem with the selected time scheme.
void calculer_pas_de_temps_local_pb ()
DoubleVect & get_dt_loc ()
bool isStationary () const override
 Returns 1 if during the last time step, the problem has not evolved.
Public Member Functions inherited from Schema_Euler_Implicite
bool initTimeStep (double dt) override
int lire_motcle_non_standard (const Motcle &mot, Entree &is) override
 Reads non-simple-type parameters of an Objet_U from an input stream.
int nb_valeurs_temporelles () const override
 Returns the number of temporal values to keep.
int nb_valeurs_futures () const override
 Returns the number of future temporal values.
double temps_futur (int i) const override
 Returns the time at the i-th future value.
double temps_defaut () const override
 Returns the time that fields must return when valeurs() is called.
void Initialiser_Champs (Probleme_base &)
void test_stationnaire (Probleme_base &)
int Iterer_Pb (Probleme_base &, int ite, int &ok)
virtual int faire_un_pas_de_temps_pb_couple (Probleme_Couple &, int &ok)
int faire_un_pas_de_temps_eqn_base (Equation_base &) override
const double & residu_old () const
void completer () override
int resolution_monolithique (const Nom &nom) const
Entreelire_facsec_expert (Entree &)
void lire_facsec_func (Entree &)
void calcul_fac_sec (double &residu_, double &residu_old, double &facsec_)
double facsec_cfl () const
Public Member Functions inherited from Schema_Implicite_base
 OWN_PTR (Solveur_Implicite_base) &solveur()
const OWN_PTR (Solveur_Implicite_base) &solveur() const
void set_param (Param &param) const override
Public Member Functions inherited from Schema_Temps_base
virtual void terminate ()
virtual double computeTimeStep (bool &stop) const
virtual void validateTimeStep ()
virtual void abortTimeStep ()
virtual void resetTime (double time)
int limpr () const
 Returns 1 if there is a need to perform a print (cf dt_impr) Returns 0 otherwise.
void nommer (const Nom &) override
 overrides Objet_U::nommer(const Nom&) Gives a name to the time scheme
const Nomle_nom () const override
 overrides Objet_U::le_nom() Returns the name of the time scheme
int sauvegarder (Sortie &) const override
 Saves the current time and the number of time steps to an output stream.
int reprendre (Entree &) override
 Restarts (reads) the current time and the number of time steps performed from an input stream.
virtual void mettre_a_jour_dt (double toto)
double pas_de_temps () const
 Returns the current time step (delta_t).
const DoubleTab & pas_de_temps_locaux () const
virtual void imprimer (Sortie &os) const
 Prints the time step to an output stream if appropriate.
virtual int impr (Sortie &os) const
 Prints the time step number, the time step value, and the current time.
void imprimer (Sortie &os, Probleme_base &pb) const
 Prints the time step to an output stream if appropriate.
void imprimer (Sortie &os, const Probleme_base &pb) const
virtual int impr (Sortie &os, Probleme_base &pb) const
 Prints the time step number, the time step value, and the current time.
virtual int impr (Sortie &os, const Probleme_base &pb) const
void imprimer_temps_courant (SFichier &) const
double pas_temps_min () const
 Returns the minimum time step.
double & pas_temps_min ()
 Returns a reference to the minimum time step.
double pas_temps_max () const
 Returns the maximum time step.
double & pas_temps_max ()
 Returns a reference to the maximum time step.
int nb_impr () const
 Returns the number of outputs performed.
double temps_courant () const
 Returns the current time.
double temps_precedent () const
 Returns the previous time.
double temps_calcul () const
 Returns the elapsed computation time i.
virtual void changer_temps_courant (const double)
 Changes the current time.
void update_critere_statio (const DoubleTab &tab_critere, Equation_base &equation)
 Updates stationnaire_atteint_ and residu_ (criterion: residu_ < seuil_statio_).
double facteur_securite_pas () const
 Returns the safety factor or multiplier of delta_t.
double & facteur_securite_pas ()
 Returns a reference to the safety factor or multiplier of delta_t.
void notify_failed_timestep ()
virtual int stop () const
 Returns 1 if it is necessary to stop the computation for various reasons:
int lsauv () const
int temps_final_atteint () const
 Returns 1 if the final time has been reached (or exceeded).
int nb_pas_dt_max_atteint () const
 Returns 1 if (the number of time steps >= maximum number of time steps).
int temps_cpu_max_atteint () const
int stationnaire_atteint () const
int stationnaire_atteint_safe () const
int stop_lu () const
 Returns 1 if the .stop file contains a 1, returns 0 otherwise.
int diffusion_implicite () const
 Returns 1 if the time scheme has been read with diffusion_implicite.
double seuil_diffusion_implicite () const
int impr_diffusion_implicite () const
int impr_extremums () const
int niter_max_diffusion_implicite () const
int no_conv_subiteration_diffusion_implicite () const
int no_error_if_not_converged_diffusion_implicite () const
int lire_motcle_non_standard (const Motcle &, Entree &) override
 Reads non-simple-type parameters of an Objet_U from an input stream.
virtual Entreelire_nb_pas_dt_max (Entree &)
 Reads the maximum number of time steps.
virtual Entreelire_periode_sauvegarde_securite_en_heures (Entree &)
virtual Entreelire_temps_cpu_max (Entree &)
virtual Entreelire_residuals (Entree &)
double temps_init () const
 Returns the initial time.
double temps_max () const
 Returns a reference to the maximum time.
double temps_sauv () const
 Returns a reference to the checkpoint time interval.
int nb_sauv_max () const
 Returns the maximum number of checkpoints (estimate).
double temps_impr () const
 Returns a reference to the output time interval.
int precision_impr () const
int wcol () const
int gnuplot_header () const
double seuil_statio () const
 Returns a reference to the stationarity threshold.
int nb_pas_dt_max () const
 Returns a reference to the maximum number of time steps.
int nb_pas_dt () const
 Returns the number of time steps performed.
double mode_dt_start () const
int indice_tps_final_atteint () const
int indice_nb_pas_dt_max_atteint () const
int lu () const
int file_allocation () const
double & set_temps_init ()
double & set_temps_max ()
double & set_temps_courant ()
double & set_temps_precedent ()
int & set_nb_pas_dt ()
int & set_nb_pas_dt_max ()
double & set_dt_min ()
double & set_dt_max ()
double & set_dt_sauv ()
double & set_dt_impr ()
int & set_precision_impr ()
double & set_dt ()
double & set_facsec ()
double & set_seuil_statio ()
int & set_stationnaire_atteint ()
void set_stationnaires_atteints (bool flag)
int & set_diffusion_implicite ()
double & set_seuil_diffusion_implicite ()
int & set_niter_max_diffusion_implicite ()
double & set_mode_dt_start ()
bool & set_indice_tps_final_atteint ()
bool & set_indice_nb_pas_dt_max_atteint ()
bool & set_lu ()
const double & residu () const
double & residu ()
const Nomnorm_residu () const
int & schema_impr ()
const int & schema_impr () const
virtual void associer_pb (const Probleme_base &)
Probleme_basepb_base ()
const Probleme_basepb_base () const
virtual void modifier_second_membre (const Equation_base &eqn, DoubleTab &secmem)
virtual void ajouter_blocs (matrices_t matrices, DoubleTab &secmem, const Equation_base &eqn, const tabs_t &semi_impl={}) const
bool disable_progress () const
void write_dt_ev (bool init)
void write_progress (bool init)
 Writes the .progress file (estimated remaining CPU time).
bool disable_dt_ev () const
void finir () const
 Closes the .dt_ev file.
Public Member Functions inherited from Objet_U
 ~Objet_U () override
 Destructor. Removes the object from the list of objects registered in "memory".
int numero () const
 Returns the index of the object in Memoire::data.
virtual int duplique () const =0
virtual SortieprintOn (Sortie &) const
 Writes the object to an output stream. Virtual method to override.
virtual EntreereadOn (Entree &)
 Reads an Objet_U from an input stream. Virtual method to override.
virtual unsigned taille_memoire () const =0
virtual int est_egal_a (const Objet_U &) const
 Returns 1 if x and *this are the same instance (same memory address).
int get_object_id () const
 Returns the unique identifier of the object (object_id_).
virtual const Type_infoget_info () const
 Returns type information for the Objet_U.
const Nomque_suis_je () const
 Returns the string identifying the class.
const char * le_type () const
 Returns the type name of the Objet_U.
virtual int change_num (const int *const)
 Changes the internal number of the Objet_U.
virtual int associer_ (Objet_U &)
 Associates the Objet_U with another Objet_U. Virtual method to override.
const Interpreteinterprete () const
Interpreteinterprete ()
Public Member Functions inherited from Process
virtual ~Process ()

Protected Attributes

double max_dt_loc_ = 1.0
double steady_security_factor_ = 0.8
DoubleVect dt_loc_
Protected Attributes inherited from Schema_Euler_Implicite
Parser_U facsec_fn_
bool facsec_func_ = false
int nb_ite_max = 200
double residu_old_ = 0
double facsec_max_ = DMAXFLOAT
bool facsec_cfl_ = false
int nb_ite_sans_accel_ = -1
int nb_ite_sans_accel_max_ = 20000
double rapport_residus_ = 1.2
std::vector< std::set< std::string > > resolution_monolithique_
Protected Attributes inherited from Schema_Temps_base
Nom nom_
double dt_ = 0.0
 Computation time step.
DoubleTab dt_locaux_
 Local time steps: Vector of size nb faces of the mesh.
double temps_courant_ = -100.
double temps_precedent_ = -100.
double dt_failed_ = -100.
 Value of a time step if it failed.
double dt_gf_ = DMAXFLOAT
double tinit_ = -DMAXFLOAT
double tmax_ = 1.e30
double tcpumax_ = 1.e30
int nb_pas_dt_ = 0
int nb_pas_dt_max_ = std::numeric_limits<int>::max()
int nb_impr_ = 0
double dt_min_ = 1.e-16
 Minimum time step set by the user.
double dt_max_ = 1.e30
 Maximum time step set by the user.
Nom dt_max_str_
 setting of dt_max as a function of time
Parser_U dt_max_fn_
 Associated Parser_U.
double dt_stab_ =-100.
 Stability time step.
double facsec_ = 1.
double seuil_statio_ = 1.e-12
int seuil_statio_relatif_deconseille_ = 0
 Flag to specify whether seuil_statio_ is an absolute (default) or relative value.
Nom norm_residu_
double dt_sauv_ = 1.e30
int nb_sauv_ = 0
 how many checkpoints have we performed so far?
int nb_sauv_max_ = 10
 Max number of checkpoints that will be performed (useful for PDI backup file).
double limite_cpu_sans_sauvegarde_ = 23 * 3600
 Default 23 hours;.
double periode_cpu_sans_sauvegarde_ = 23 * 3600
 Default 23 hours;.
double temps_cpu_ecoule_ = 0
double dt_impr_ = 1.e30
 Output time interval.
int precision_impr_ = 8
 Number of significant digits for output.
double mode_dt_start_ = -2
 Mode for computing the initial time step - contains a double if dt_init option is used.
double residu_ = 0
double residu_old_slope_ = -1000
double cumul_slope_ = 1e-20
int gnuplot_header_ = 0
bool adapt_dt_tmax_ = false
bool ind_tps_final_atteint = false
bool ind_nb_pas_dt_max_atteint = false
bool ind_temps_cpu_max_atteint = false
bool lu_ = false
int ind_diff_impl_ = 0
double seuil_diff_impl_ = 1.e-6
 Threshold for implicit treatment of diffusion by CG.
int impr_diff_impl_ = 0
int impr_extremums_ = 0
int niter_max_diff_impl_ = 1000
 Maximum iterations for CG diffusion implicitation - Above 1000 iterations, diffusion implicit algorithm may be diverging.
int no_conv_subiteration_diff_impl_ = 0
int no_error_if_not_converged_diff_impl_ = 0
int schema_impr_ = -1
int file_allocation_ = 0
int max_length_cl_ = -10

Additional Inherited Members

Static Public Member Functions inherited from Objet_U
static const Nomnom_du_cas ()
 Returns a constant reference to the case name. This method is static.
static Nomget_set_nom_du_cas ()
 Returns a non-constant reference to the case name (to allow modification). This method is static.
static const Type_infoinfo ()
 Returns type information for the Objet_U (static version).
static const Objet_Uself_cast (const Objet_U &)
 Method added for casting in Python.
static Objet_Uself_cast (Objet_U &)
Static Public Member Functions inherited from Process
static int me ()
 Returns the rank of the local processor in the current communication group. See Comm_Group::rank() and PE_Groups::current_group().
static int nproc ()
 Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current_group().
static bool is_parallel ()
static void exit (int exit_code=-1)
 Exit routine for TRUST within a Kokkos region.
static double mp_sum (double)
 Computes the sum of x over all processors in the current group.
static float mp_sum (float)
static trustIdType mp_sum (trustIdType)
 Computes the sum of x over all processors in the current group.
static double mp_max (double)
static double mp_min (double)
static int mp_max (int)
 Returns the maximum value of x across all processors in the current group.
static int mp_min (int)
 Returns the minimum value of x across all processors in the current group.
static double mp_sum_as_double (int v)
static trustIdType mppartial_sum (trustIdType i)
 Computes the partial sum of x over processors 0 to me()-1 (returns 0 on processor 0).
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2)
 C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: mp_sum_for_each(a, b); mp_sum_for_each(a, b, c); mp_sum_for_each(a, b, c, d); mp_sum_for_each(a, b, c, d, e); All arguments must be of the same type (double or int) and are modified in place. Supports 2-5 parameters.
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2)
 C++14 compatible mp_max_for_each: combine multiple mp_max calls into one collective operation.
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2)
 C++14 compatible mp_min_for_each: combine multiple mp_min calls into one collective operation.
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename _TYPE_>
static void mp_sum_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_max_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_min_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
static bool mp_and (bool)
 Computes the logical AND of b across all processors in the current group.
static bool mp_or (bool)
static int check_int_overflow (trustIdType)
static int je_suis_maitre ()
 Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
static KOKKOS_INLINE_FUNCTION void Kokkos_exit (const char *)
 Exit routine for TRUST within a Kokkos region.
static int node_master ()
 Returns 1 if on the NUMA node master processor, 0 otherwise.
static void exit (const Nom &message, int exit_code=-1)
static bool is_sequential ()
static void barrier ()
 Synchronizes all processors in the current group (waits until all processors have reached the barrier).
static void abort ()
 Abort routine for TRUST on a fatal error.
static SortieJournal (int message_level=0)
 Returns a static Sortie object used as an event journal.
static double ram_processeur ()
static void imprimer_ram_totale (int all_process=0)
static bool force_single_file (const int ranks, const Nom &filename)
Static Public Attributes inherited from Objet_U
static double precision_geom = 1e-10
static constexpr bool HAS_POINTER = false
static int dimension =0
static int format_precision_geom =11
static int axi =0
static int bidim_axi =0
static int DEACTIVATE_SIGINT_CATCH =0
static Type_info info_obj
static bool disable_TU =false
 Flag to disable or not the writing of the .TU files.
static bool stat_per_proc_perf_log =false
 Flag to enable the writing of the statistics detailed per processor in _csv.TU file.
Static Public Attributes inherited from Process
static int exception_sur_exit =0
static int multiple_files =5120
Protected Member Functions inherited from Schema_Implicite_base
 OWN_PTR (Solveur_Implicite_base) le_solveur
Protected Member Functions inherited from Schema_Temps_base
 OBS_PTR (Probleme_base) mon_probleme
Protected Member Functions inherited from Objet_U
 Objet_U ()
 Default constructor: assigns a unique identifier to the object (object_id_) and registers the object in "memory" by giving it a num_obj number.
 Objet_U (const Objet_U &)
 Copy constructor.
const Objet_Uoperator= (const Objet_U &)
 Assignment operator: does nothing (the number and identifier are preserved).

Detailed Description

Definition at line 28 of file Schema_Euler_Implicite_Stationnaire.h.

Member Function Documentation

◆ ajouter_inertie()

void Schema_Euler_Implicite_Stationnaire::ajouter_inertie ( Matrice_Base & mat_morse,
DoubleTab & secmem,
const Equation_base & eqn ) const
overridevirtual

Reimplemented from Schema_Temps_base.

Definition at line 117 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ calculer_pas_de_temps_local_pb()

void Schema_Euler_Implicite_Stationnaire::calculer_pas_de_temps_local_pb ( )

Definition at line 187 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ corriger_dt_calcule()

bool Schema_Euler_Implicite_Stationnaire::corriger_dt_calcule ( double & dt_calc) const
overridevirtual

Corrects the computed time step passed as parameter and verifies it is not "too" small (< dt_min_).

The correction is: delta_t = min((security factor * dt_calc), dt_max) And verifies that delta_t is "sufficiently" larger than dt_min_.

Parameters
(double&dt_calc) the computed time step to verify
Exceptions
ifthe computed time step is less than dt_min

Reimplemented from Schema_Temps_base.

Definition at line 293 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ get_dt_loc()

DoubleVect & Schema_Euler_Implicite_Stationnaire::get_dt_loc ( )
inline

Definition at line 44 of file Schema_Euler_Implicite_Stationnaire.h.

◆ initialize()

void Schema_Euler_Implicite_Stationnaire::initialize ( )
overridevirtual

Reimplemented from Schema_Temps_base.

Definition at line 204 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ isStationary()

bool Schema_Euler_Implicite_Stationnaire::isStationary ( ) const
overridevirtual

Returns 1 if during the last time step, the problem has not evolved.

Parameters
(temps)the time to reach
Returns
(1 if the problem has not evolved, 0 otherwise.)

Reimplemented from Schema_Temps_base.

Definition at line 89 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ iterateTimeStep()

bool Schema_Euler_Implicite_Stationnaire::iterateTimeStep ( bool & converged)
overridevirtual

Calculate the U(n+1) unknown for each equation (if solved) of the problem with the selected time scheme.

Reimplemented from Schema_Euler_Implicite.

Definition at line 262 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ mettre_a_jour()

int Schema_Euler_Implicite_Stationnaire::mettre_a_jour ( )
overridevirtual

Updates the current time (t+=dt) and the number of time steps performed (nb_pas_dt_++).

Returns
(int) always returns 1

Reimplemented from Schema_Euler_Implicite.

Definition at line 95 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ mettre_a_jour_dt_stab()

void Schema_Euler_Implicite_Stationnaire::mettre_a_jour_dt_stab ( )
overridevirtual

Reimplemented from Schema_Temps_base.

Definition at line 239 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ reprendre()

int Schema_Euler_Implicite_Stationnaire::reprendre ( Entree & is)
overridevirtual

Restores an Objet_U from an input stream. Virtual method to override.

Parameters
isInput stream to use for restoration.
Returns
Return code.

Reimplemented from Schema_Euler_Implicite.

Definition at line 107 of file Schema_Euler_Implicite_Stationnaire.cpp.

◆ set_param()

void Schema_Euler_Implicite_Stationnaire::set_param ( Param & param) const
overridevirtual

Reimplemented from Schema_Euler_Implicite.

Definition at line 82 of file Schema_Euler_Implicite_Stationnaire.cpp.

Member Data Documentation

◆ dt_loc_

DoubleVect Schema_Euler_Implicite_Stationnaire::dt_loc_
protected

Definition at line 50 of file Schema_Euler_Implicite_Stationnaire.h.

◆ max_dt_loc_

double Schema_Euler_Implicite_Stationnaire::max_dt_loc_ = 1.0
protected

Definition at line 48 of file Schema_Euler_Implicite_Stationnaire.h.

◆ steady_security_factor_

double Schema_Euler_Implicite_Stationnaire::steady_security_factor_ = 0.8
protected

Definition at line 49 of file Schema_Euler_Implicite_Stationnaire.h.


The documentation for this class was generated from the following files: