TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Adhoc_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 Adhoc_JFNK_included
17#define Adhoc_JFNK_included
18
19#include <Solveur_non_lineaire.h>
20#include <Equation_base.h>
21#include <Cahn_Hilliard.h>
22#include <Matrix_tools.h>
23#include <Matrice_Morse.h>
24#include <Champ_Uniforme.h>
25#include <Champ_Fonc_Tabule.h>
26#include <TRUST_Ref.h>
27#include <TRUSTTab_parts.h>
28#include <EChaine.h>
29#include <Table.h>
30#include <Dimension.h>
31#include <Param.h>
32#include <SFichier.h>
33#include <Perf_counters.h>
34
35#include <math.h>
36
37/*! @brief classe Adhoc_JFNK
38 *
39 * Classe solveur adhoc de l'ancienne version de TrioCFD.
40 * Plus vraiment utilisée, mais on garde au cas où.
41 *
42 * @sa Solveur_non_lineaire
43 */
45{
46 Declare_instanciable(Adhoc_JFNK);
47
48public :
49
50 const Nom& le_nom() const override { return nom_; }
51 void nommer(const Nom& name) override { nom_ = name ; }
52
53 // Méthode iterer_eqn de la classe de base surchargée
54 bool iterer_eqn(Equation_base& equation, const DoubleTab& inconnue, DoubleTab& result, double dt, int numero_iteration, int& ok) override;
55
56protected :
57
58 DoubleTab jacobian_vect(const DoubleTab&, DoubleTab&, Cahn_Hilliard&); // Non généralisé (s'applique uniquement à Cahn-Hilliard)
59
61 double tol_ = -123.;
62 double tol_min_ = -123.;
63 double tol_max_ = -123.;
64 int maxit_= -123;
65 int nkr_= -123;
66
67};
68
69#endif /* Adhoc_JFNK_included */
classe Adhoc_JFNK
Definition Adhoc_JFNK.h:45
double tol_
Definition Adhoc_JFNK.h:61
double tol_max_
Definition Adhoc_JFNK.h:63
bool iterer_eqn(Equation_base &equation, const DoubleTab &inconnue, DoubleTab &result, double dt, int numero_iteration, int &ok) override
Permet de résoudre l'équation non linéaire H(c) = c_theta - c_n - theta * dt * M^-1 * D * mu_theta = ...
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
Definition Adhoc_JFNK.h:50
DoubleTab jacobian_vect(const DoubleTab &, DoubleTab &, Cahn_Hilliard &)
Construire le jacobien.
double tol_min_
Definition Adhoc_JFNK.h:62
void nommer(const Nom &name) override
Donne un nom a l'Objet_U Methode virtuelle a surcharger.
Definition Adhoc_JFNK.h:51
classe Cahn_Hilliard
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
class Solveur_non_lineaire