Sch_CN_iteratif#

#include <Sch_CN_iteratif.h>
Brief description

classe Sch_CN_iteratif Schema en temps alternant un demi - pas de temps d’Euler implicite et un demi - pas de temps de LeapFrog.

How to reference this class#

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Sch\_CN\_iteratif <class-sch-cn-iteratif>`
[Sch\_CN\_iteratif](#class-sch-cn-iteratif)

Detailed description#

La resolution implicite est iterative (point fixe). Le pas de temps est calcule comme le produit du pas de temps de stabilite explicite par un facsec. Le facsec est ajuste automatiquement pour que la resolution converge en un nombre d’iterations predefini. Les caracteristiques de chaque iteration sont ecrites dans le fichier dt_CN. La resolution est gouvernee par 4 parametres (valeurs par defauts entre parentheses) : * seuil (1e-3) : le seuil de convergence. Plus il est bas, plus la resolution est precise. * facsec_max (2) : la valeur du facsec que l’on ne veut pas depasser (eviter les instabilites et capter les phenomenes physiques) * niter_min (2) : le nombre minimum d’iterations. En deca, on continue a iterer meme si on semble avoir atteint la convergence. * niter_avg (3) : le nombre d’iterations que l’on souhaite faire pour arriver a convergence. * niter_max (6) : le nombre d’iteration au - dela duquel on reessaye avec un facsec plus petit. Conseil pour le choix des parametres d’ajustement du facsec : * Choisir seuil en fonction de la precision desiree. * Choisir niter_min : 2 garantit un schema d’ordre 2 en temps. * Si on cherche un stationnaire, choisir seuil_statio> = seuil. * Choisir facsec_max en fonction des phenomenes physiques a capter. * Commencer par tester avec une grande valeur de niter_avg. Observer le comportement du nombre d’iterations. Il bute sur une valeur maximum avant de retomber. * Choisir niter_avg aux 2/3 de cette valeur maximum, et niter_max aux 4/3 ou au double environ.

Inherits from#

Inherited by#

Inheritance graph#

If the image is too small, right-click and open in new tab

../../../../../_images/classSch__CN__iteratif__inherit__graph.png

List of Public Methods#

List of Public Static Methods#

List of Protected Methods#

Complete Member Function Documentation#

completer#

Definition
void Sch_CN_iteratif::completer() override
Brief description
Detailed description

Reimplements:

How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Sch_CN_iteratif::completer() override <sch-cn-iteratif-public-void-sch-cn-iteratif-completer-override>`
[void Sch_CN_iteratif::completer() override](#sch-cn-iteratif-public-void-sch-cn-iteratif-completer-override)

duplique#

Definition
int Sch_CN_iteratif::duplique() const override
Brief description
Detailed description

Reimplements:

How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Sch_CN_iteratif::duplique() const override <sch-cn-iteratif-public-int-sch-cn-iteratif-duplique-const-override>`
[int Sch_CN_iteratif::duplique() const override](#sch-cn-iteratif-public-int-sch-cn-iteratif-duplique-const-override)

faire_un_pas_de_temps_eqn_base#

Definition
int Sch_CN_iteratif::faire_un_pas_de_temps_eqn_base(Equation_base &) override
Brief description
Detailed description

Reimplements:

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Sch_CN_iteratif::faire_un_pas_de_temps_eqn_base(Equation_base &) override <sch-cn-iteratif-public-int-sch-cn-iteratif-faire-un-pas-de-temps-eqn-base-equation-base-ref-override>`
[int Sch_CN_iteratif::faire_un_pas_de_temps_eqn_base(Equation_base &) override](#sch-cn-iteratif-public-int-sch-cn-iteratif-faire-un-pas-de-temps-eqn-base-equation-base-ref-override)

get_info#

Definition
const Type_info * Sch_CN_iteratif::get_info() const override
Brief description

Donne des informations sur le type de l’ Objet_U .

Detailed description

Reimplements:

How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`const Type_info * Sch_CN_iteratif::get_info() const override <sch-cn-iteratif-public-const-type-info-ptr-sch-cn-iteratif-get-info-const-override>`
[const Type_info * Sch_CN_iteratif::get_info() const override](#sch-cn-iteratif-public-const-type-info-ptr-sch-cn-iteratif-get-info-const-override)

initTimeStep#

Definition
bool Sch_CN_iteratif::initTimeStep(double dt) override
Brief description
Detailed description

Reimplements:

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`bool Sch_CN_iteratif::initTimeStep(double dt) override <sch-cn-iteratif-public-bool-sch-cn-iteratif-inittimestep-double-dt-override>`
[bool Sch_CN_iteratif::initTimeStep(double dt) override](#sch-cn-iteratif-public-bool-sch-cn-iteratif-inittimestep-double-dt-override)

iterateTimeStep#

Definition
bool Sch_CN_iteratif::iterateTimeStep(bool &converged) override
Brief description

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

Detailed description

Reimplements:

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`bool Sch_CN_iteratif::iterateTimeStep(bool &converged) override <sch-cn-iteratif-public-bool-sch-cn-iteratif-iteratetimestep-bool-ref-converged-override>`
[bool Sch_CN_iteratif::iterateTimeStep(bool &converged) override](#sch-cn-iteratif-public-bool-sch-cn-iteratif-iteratetimestep-bool-ref-converged-override)

nb_valeurs_futures#

Definition
int Sch_CN_iteratif::nb_valeurs_futures() const override
Brief description

Renvoie le nombre de valeurs temporelles futures.

Detailed description

Ici : n + 1/2 et n + 1 donc 2.

Reimplements:

How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Sch_CN_iteratif::nb_valeurs_futures() const override <sch-cn-iteratif-public-int-sch-cn-iteratif-nb-valeurs-futures-const-override>`
[int Sch_CN_iteratif::nb_valeurs_futures() const override](#sch-cn-iteratif-public-int-sch-cn-iteratif-nb-valeurs-futures-const-override)

nb_valeurs_temporelles#

Definition
int Sch_CN_iteratif::nb_valeurs_temporelles() const override
Brief description

Renvoie le nombre de valeurs temporelles a conserver.

Detailed description

Ici : n, n + 1/2 et n + 1, donc 3

Reimplements:

How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Sch_CN_iteratif::nb_valeurs_temporelles() const override <sch-cn-iteratif-public-int-sch-cn-iteratif-nb-valeurs-temporelles-const-override>`
[int Sch_CN_iteratif::nb_valeurs_temporelles() const override](#sch-cn-iteratif-public-int-sch-cn-iteratif-nb-valeurs-temporelles-const-override)

Sch_CN_iteratif#

Definition
Sch_CN_iteratif::Sch_CN_iteratif()
Brief description
Detailed description
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Sch_CN_iteratif::Sch_CN_iteratif() <sch-cn-iteratif-public-sch-cn-iteratif-sch-cn-iteratif>`
[Sch_CN_iteratif::Sch_CN_iteratif()](#sch-cn-iteratif-public-sch-cn-iteratif-sch-cn-iteratif)

set_param#

Definition
void Sch_CN_iteratif::set_param(Param &titi) override
Brief description
Detailed description

Reimplements:

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Sch_CN_iteratif::set_param(Param &titi) override <sch-cn-iteratif-public-void-sch-cn-iteratif-set-param-param-ref-titi-override>`
[void Sch_CN_iteratif::set_param(Param &titi) override](#sch-cn-iteratif-public-void-sch-cn-iteratif-set-param-param-ref-titi-override)

taille_memoire#

Definition
unsigned Sch_CN_iteratif::taille_memoire() const override
Brief description
Detailed description

Reimplements:

How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`unsigned Sch_CN_iteratif::taille_memoire() const override <sch-cn-iteratif-public-unsigned-sch-cn-iteratif-taille-memoire-const-override>`
[unsigned Sch_CN_iteratif::taille_memoire() const override](#sch-cn-iteratif-public-unsigned-sch-cn-iteratif-taille-memoire-const-override)

temps_defaut#

Definition
double Sch_CN_iteratif::temps_defaut() const override
Brief description

Renvoie le temps que doivent utiliser les champs a l’appel de valeurs()

Detailed description

Ici : t(n + 1/2)

Reimplements:

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`double Sch_CN_iteratif::temps_defaut() const override <sch-cn-iteratif-public-double-sch-cn-iteratif-temps-defaut-const-override>`
[double Sch_CN_iteratif::temps_defaut() const override](#sch-cn-iteratif-public-double-sch-cn-iteratif-temps-defaut-const-override)

temps_futur#

Definition
double Sch_CN_iteratif::temps_futur(int i) const override
Brief description

Renvoie le le temps a la i - eme valeur future.

Detailed description

Reimplements:

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`double Sch_CN_iteratif::temps_futur(int i) const override <sch-cn-iteratif-public-double-sch-cn-iteratif-temps-futur-int-i-const-override>`
[double Sch_CN_iteratif::temps_futur(int i) const override](#sch-cn-iteratif-public-double-sch-cn-iteratif-temps-futur-int-i-const-override)

~Sch_CN_iteratif#

Definition
Sch_CN_iteratif::~Sch_CN_iteratif()
Brief description
Detailed description
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Sch_CN_iteratif::~Sch_CN_iteratif() <sch-cn-iteratif-public-sch-cn-iteratif-dtor-sch-cn-iteratif>`
[Sch_CN_iteratif::~Sch_CN_iteratif()](#sch-cn-iteratif-public-sch-cn-iteratif-dtor-sch-cn-iteratif)

cree_instance#

Definition
Objet_U * Sch_CN_iteratif::cree_instance()
Brief description
Detailed description
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Objet_U * Sch_CN_iteratif::cree_instance() <sch-cn-iteratif-public-static-objet-u-ptr-sch-cn-iteratif-cree-instance>`
[Objet_U * Sch_CN_iteratif::cree_instance()](#sch-cn-iteratif-public-static-objet-u-ptr-sch-cn-iteratif-cree-instance)

info#

Definition
const Type_info * Sch_CN_iteratif::info()
Brief description
Detailed description
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`const Type_info * Sch_CN_iteratif::info() <sch-cn-iteratif-public-static-const-type-info-ptr-sch-cn-iteratif-info>`
[const Type_info * Sch_CN_iteratif::info()](#sch-cn-iteratif-public-static-const-type-info-ptr-sch-cn-iteratif-info)

self_cast#

Definition
const Sch_CN_iteratif & Sch_CN_iteratif::self_cast(const Objet_U &)
Brief description
Detailed description
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`const Sch_CN_iteratif & Sch_CN_iteratif::self_cast(const Objet_U &) <sch-cn-iteratif-public-static-const-sch-cn-iteratif-ref-sch-cn-iteratif-self-cast-const-objet-u-ref>`
[const Sch_CN_iteratif & Sch_CN_iteratif::self_cast(const Objet_U &)](#sch-cn-iteratif-public-static-const-sch-cn-iteratif-ref-sch-cn-iteratif-self-cast-const-objet-u-ref)

self_cast#

Definition
Sch_CN_iteratif & Sch_CN_iteratif::self_cast(Objet_U &)
Brief description
Detailed description
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Sch_CN_iteratif & Sch_CN_iteratif::self_cast(Objet_U &) <sch-cn-iteratif-public-static-sch-cn-iteratif-ref-sch-cn-iteratif-self-cast-objet-u-ref>`
[Sch_CN_iteratif & Sch_CN_iteratif::self_cast(Objet_U &)](#sch-cn-iteratif-public-static-sch-cn-iteratif-ref-sch-cn-iteratif-self-cast-objet-u-ref)

ajuster_facsec#

Definition
void Sch_CN_iteratif::ajuster_facsec(type_convergence cv)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Sch_CN_iteratif::ajuster_facsec(type_convergence cv) <sch-cn-iteratif-protected-void-sch-cn-iteratif-ajuster-facsec-type-convergence-cv>`
[void Sch_CN_iteratif::ajuster_facsec(type_convergence cv)](#sch-cn-iteratif-protected-void-sch-cn-iteratif-ajuster-facsec-type-convergence-cv)

convergence#

Definition
bool Sch_CN_iteratif::convergence(const DoubleTab &u0, const DoubleTab &up1, const DoubleTab &delta, int p) const
Brief description

Indique si le calcul iteratif a converge.

Detailed description

Critere de convergence utilise : || u(n + 1,p + 1) - u(n + 1,p) || <seuil * || u(n + 1/2,p + 1) || C’est equivalent a || u(n + 1,p) - u(n + 1) || <seuil * || (Id - (dt/2).(df/du))^ - 1 || * || u(n + 1/2,p + 1) || ou u(n + 1) est la solution exacte en n + 1, df/du est le lagrangien de f(u), pris en u(n + 1/2) et les normes sont compatibles entre matrices et vecteurs (ici norme infinie).

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`bool Sch_CN_iteratif::convergence(const DoubleTab &u0, const DoubleTab &up1, const DoubleTab &delta, int p) const <sch-cn-iteratif-protected-bool-sch-cn-iteratif-convergence-const-doubletab-ref-u0-const-doubletab-ref-up1-const-doubletab-ref-delta-int-p-const>`
[bool Sch_CN_iteratif::convergence(const DoubleTab &u0, const DoubleTab &up1, const DoubleTab &delta, int p) const](#sch-cn-iteratif-protected-bool-sch-cn-iteratif-convergence-const-doubletab-ref-u0-const-doubletab-ref-up1-const-doubletab-ref-delta-int-p-const)

divergence#

Definition
bool Sch_CN_iteratif::divergence(const DoubleTab &u0, const DoubleTab &up1, const DoubleTab &delta, int p) const
Brief description

Indique si le calcul iteratif a diverge.

Detailed description
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`bool Sch_CN_iteratif::divergence(const DoubleTab &u0, const DoubleTab &up1, const DoubleTab &delta, int p) const <sch-cn-iteratif-protected-bool-sch-cn-iteratif-divergence-const-doubletab-ref-u0-const-doubletab-ref-up1-const-doubletab-ref-delta-int-p-const>`
[bool Sch_CN_iteratif::divergence(const DoubleTab &u0, const DoubleTab &up1, const DoubleTab &delta, int p) const](#sch-cn-iteratif-protected-bool-sch-cn-iteratif-divergence-const-doubletab-ref-u0-const-doubletab-ref-up1-const-doubletab-ref-delta-int-p-const)

iterateTimeStepOnEquation#

Definition
bool Sch_CN_iteratif::iterateTimeStepOnEquation(int i, bool &converged)
Brief description

Calcule une iteration de la resolution sur l’equation i.

Detailed description

Calcule u(n + 1/2,p + 1) = u(n) + f(u(n + 1/2,p))*dt/2 et u(n + 1,p + 1) = u(n) + f(u(n + 1/2,p))*dt ou f donne du/dt en fonction de u Retourne true dans converged si ca ne bouge plus d’une iteration a l’autre, false sinon Renvoie true si OK pour continuer a iterer, false sinon (diverge ou trop d’iterations)

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`bool Sch_CN_iteratif::iterateTimeStepOnEquation(int i, bool &converged) <sch-cn-iteratif-protected-bool-sch-cn-iteratif-iteratetimesteponequation-int-i-bool-ref-converged>`
[bool Sch_CN_iteratif::iterateTimeStepOnEquation(int i, bool &converged)](#sch-cn-iteratif-protected-bool-sch-cn-iteratif-iteratetimesteponequation-int-i-bool-ref-converged)

printOn#

Definition
Sortie & Sch_CN_iteratif::printOn(Sortie &x) const override
Brief description

Surcharge Objet_U::printOn(Sortie&) Imprime le schema en temps sur un flot de sortie.

Detailed description

!! Attention n’est pas symetrique de la lecture !! On ecrit les differents parametres du schema en temps.

Reimplements:

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Sortie & Sch_CN_iteratif::printOn(Sortie &x) const override <sch-cn-iteratif-protected-sortie-ref-sch-cn-iteratif-printon-sortie-ref-x-const-override>`
[Sortie & Sch_CN_iteratif::printOn(Sortie &x) const override](#sch-cn-iteratif-protected-sortie-ref-sch-cn-iteratif-printon-sortie-ref-x-const-override)

readOn#

Definition
Entree & Sch_CN_iteratif::readOn(Entree &) override
Brief description

Lecture d’un schema en temps a partir d’un flot d’entree.

Detailed description

Le format de lecture attendu est le suivant: { [ Motcle valeur_reelle] } Les mots clefs peuvent etre: tinit, tmax, nb_pas_dt_max, dt_min, dt_max, dt_sauv, dt_impr, facsec, seuil_statio,

Reimplements:

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Entree & Sch_CN_iteratif::readOn(Entree &) override <sch-cn-iteratif-protected-entree-ref-sch-cn-iteratif-readon-entree-ref-override>`
[Entree & Sch_CN_iteratif::readOn(Entree &) override](#sch-cn-iteratif-protected-entree-ref-sch-cn-iteratif-readon-entree-ref-override)

Attributes Documentation#

info_obj (public)
const Type_info Sch_CN_iteratif::info_obj
facsec_max (protected)
double Sch_CN_iteratif::facsec_max = 2
iteration (protected)
int Sch_CN_iteratif::iteration = - 1
last_facsec (protected)
double Sch_CN_iteratif::last_facsec = - 100.
niter_avg (protected)
int Sch_CN_iteratif::niter_avg = 3
niter_max (protected)
int Sch_CN_iteratif::niter_max = 6
niter_min (protected)
int Sch_CN_iteratif::niter_min = 2
seuil (protected)
double Sch_CN_iteratif::seuil = 1.e-3

Enums#

Sch_CN_iteratif::type_convergence#

Location: trust-code/src/ThHyd/Schemas_Temps/Sch_CN_iteratif.h:81

How to cite in this doc: Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Sch\_CN\_iteratif::type\_convergence <enum-none-sch-cn-iteratif-type-convergence>`
[Sch\_CN\_iteratif::type\_convergence](#enum-none-sch-cn-iteratif-type-convergence)
  • DIVERGENCE

  • NON_CONVERGENCE

  • CONVERGENCE_LENTE

  • CONVERGENCE_RAPIDE

  • CONVERGENCE_OK