TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
SNES_JFNK.h
1/****************************************************************************
2* Copyright (c) 2025, 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 SNES_JFNK_included
17#define SNES_JFNK_included
18
19#include <Solveur_non_lineaire.h>
20#include <Equation_base.h>
21#include <Matrix_tools.h>
22#include <Matrice_Morse.h>
23#include <Champ_Uniforme.h>
24#include <Champ_Fonc_Tabule.h>
25#include <TRUST_Ref.h>
26#include <TRUSTTab_parts.h>
27#include <EChaine.h>
28#include <Table.h>
29#include <Dimension.h>
30#include <Param.h>
31#include <SFichier.h>
32#include <Perf_counters.h>
33#include <Solv_tools.h>
34#include <math.h>
35
36
37/*! @brief classe SNES_JFNK
38 *
39 * Classe solveur JFNK liée à la librairie SNES de PETSC.
40 * @sa Solveur_non_lineaire
41 */
43{
44 Declare_instanciable(SNES_JFNK);
45
46public :
47
48 const Nom& le_nom() const override { return nom_; }
49 void nommer(const Nom& name) override { nom_ = name ; }
50
51 // Méthode iterer_eqn de la classe de base surchargée
52 bool iterer_eqn(Equation_base& equation, const DoubleTab& inconnue, DoubleTab& result, double dt, int numero_iteration, int& ok) override;
53
54protected :
55
57 double atol_ = -123.;
58 double rtol_ = -123.;
59 double stol_ = -123.;
60 int maxit_newton_= -123;
61 int maxit_gmres_ = -123;
62 int nkr_= -123;
63 double erel_ = -123.;
64 double umin_ = -123.;
65};
66
67#endif /* SNES_JFNK_included */
class Equation_base The role of an equation is the calculation of one or more fields....
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
classe SNES_JFNK
Definition SNES_JFNK.h:43
void nommer(const Nom &name) override
Assigns a name to the Objet_U. Virtual method to override.
Definition SNES_JFNK.h:49
double umin_
Definition SNES_JFNK.h:64
double atol_
Definition SNES_JFNK.h:57
double erel_
Definition SNES_JFNK.h:63
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Definition SNES_JFNK.h:48
double stol_
Definition SNES_JFNK.h:59
bool iterer_eqn(Equation_base &equation, const DoubleTab &inconnue, DoubleTab &result, double dt, int numero_iteration, int &ok) override
FormFunction de PETSc : calcule le résidu du JFNK.
int maxit_gmres_
Definition SNES_JFNK.h:61
double rtol_
Definition SNES_JFNK.h:58
int maxit_newton_
Definition SNES_JFNK.h:60
class Solveur_non_lineaire