|
TrioCFD 1.9.9_beta
TrioCFD documentation
|
class Schema_Euler_Semi_Implicite Il herite de schema Euler implicite et porte un solveur, linéaire ou non linéaire. Le principe repose sur une interpolation temporelle (schéma theta) des champs entre les pas de temps n et n+1. Pour un champ u(n), on écrit : u(n+theta) = theta * u(n+1) + (1-theta) * u(n) Si theta = 1, on a bien un schéma entièrement implicite, si theta = 0, schema explicite (ATTENTION CEPENDANT à la valeur theta=0). introduit un coefficient theta d'interpolation temporelle More...
#include <Schema_Euler_Semi_Implicite.h>
Public Member Functions | |
| void | set_param (Param &) const override |
| double | temps_intermediaire () const |
| int | faire_un_pas_de_temps_pb_couple (Probleme_Couple &, int &ok) override |
| int | faire_un_pas_de_temps_eqn_base (Equation_base &) override |
| double | coeff_theta () const |
| bool | is_explicit () |
| Renvoie TRUE si le schéma semi-implicite est totalement explicite (important, car theta = 0 pose problème). | |
| 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) |
| bool | iterateTimeStep (bool &converged) override |
| Calculate the U(n+1) unknown for each equation (if solved) of the problem with the selected time scheme. | |
| const double & | residu_old () const |
| 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 | completer () override |
| int | resolution_monolithique (const Nom &nom) const |
| Entree & | lire_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 ¶m) const override |
| Public Member Functions inherited from Schema_Temps_base | |
| virtual void | initialize () |
| virtual void | terminate () |
| virtual double | computeTimeStep (bool &stop) const |
| virtual void | validateTimeStep () |
| virtual bool | isStationary () const |
| Returns 1 if during the last time step, the problem has not evolved. | |
| 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 Nom & | le_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) |
| virtual void | mettre_a_jour_dt_stab () |
| double | pas_de_temps () const |
| Returns the current time step (delta_t). | |
| const DoubleTab & | pas_de_temps_locaux () const |
| virtual bool | corriger_dt_calcule (double &dt) const |
| Corrects the computed time step passed as parameter and verifies it is not "too" small (< dt_min_). | |
| 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 Entree & | lire_nb_pas_dt_max (Entree &) |
| Reads the maximum number of time steps. | |
| virtual Entree & | lire_periode_sauvegarde_securite_en_heures (Entree &) |
| virtual Entree & | lire_temps_cpu_max (Entree &) |
| virtual Entree & | lire_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 Nom & | norm_residu () const |
| int & | schema_impr () |
| const int & | schema_impr () const |
| virtual void | associer_pb (const Probleme_base &) |
| Probleme_base & | pb_base () |
| const Probleme_base & | pb_base () const |
| virtual void | modifier_second_membre (const Equation_base &eqn, DoubleTab &secmem) |
| virtual void | ajouter_inertie (Matrice_Base &mat_morse, DoubleTab &secmem, const Equation_base &eqn) const |
| 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 Sortie & | printOn (Sortie &) const |
| Writes the object to an output stream. Virtual method to override. | |
| virtual Entree & | readOn (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_info * | get_info () const |
| Returns type information for the Objet_U. | |
| const Nom & | que_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 Interprete & | interprete () const |
| Interprete & | interprete () |
| Public Member Functions inherited from Process | |
| virtual | ~Process () |
Protected Attributes | |
| double | theta_ =-123. |
| 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 Nom & | nom_du_cas () |
| Returns a constant reference to the case name. This method is static. | |
| static Nom & | get_set_nom_du_cas () |
| Returns a non-constant reference to the case name (to allow modification). This method is static. | |
| static const Type_info * | info () |
| Returns type information for the Objet_U (static version). | |
| static const Objet_U & | self_cast (const Objet_U &) |
| Method added for casting in Python. | |
| static Objet_U & | self_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 Sortie & | Journal (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_U & | operator= (const Objet_U &) |
| Assignment operator: does nothing (the number and identifier are preserved). | |
class Schema_Euler_Semi_Implicite Il herite de schema Euler implicite et porte un solveur, linéaire ou non linéaire. Le principe repose sur une interpolation temporelle (schéma theta) des champs entre les pas de temps n et n+1. Pour un champ u(n), on écrit : u(n+theta) = theta * u(n+1) + (1-theta) * u(n) Si theta = 1, on a bien un schéma entièrement implicite, si theta = 0, schema explicite (ATTENTION CEPENDANT à la valeur theta=0). introduit un coefficient theta d'interpolation temporelle
Definition at line 32 of file Schema_Euler_Semi_Implicite.h.
|
inline |
Definition at line 48 of file Schema_Euler_Semi_Implicite.h.
|
overridevirtual |
Reimplemented from Schema_Euler_Implicite.
Definition at line 60 of file Schema_Euler_Semi_Implicite.cpp.
|
overridevirtual |
Reimplemented from Schema_Euler_Implicite.
Definition at line 53 of file Schema_Euler_Semi_Implicite.cpp.
| bool Schema_Euler_Semi_Implicite::is_explicit | ( | ) |
Renvoie TRUE si le schéma semi-implicite est totalement explicite (important, car theta = 0 pose problème).
Definition at line 48 of file Schema_Euler_Semi_Implicite.cpp.
|
overridevirtual |
Reimplemented from Schema_Euler_Implicite.
Definition at line 39 of file Schema_Euler_Semi_Implicite.cpp.
|
inline |
Definition at line 42 of file Schema_Euler_Semi_Implicite.h.
|
protected |
Definition at line 52 of file Schema_Euler_Semi_Implicite.h.