TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Assembleur_P_VEFPreP1B.h
1/****************************************************************************
2* Copyright (c) 2026, 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 Assembleur_P_VEFPreP1B_included
17#define Assembleur_P_VEFPreP1B_included
18
19#include <Assembleur_P_VEF.h>
20#include <Matrice.h>
21class Domaine_VEF;
23enum class vecteur { second_membre , pression_inverse , pression };
24
26{
27
28 Declare_instanciable(Assembleur_P_VEFPreP1B);
29
30public :
31 const Domaine_VEF& domaine_Vef() const;
32 int assembler(Matrice&) override;
33 int assembler_rho_variable(Matrice&, const Champ_Don_base&) override;
34 int assembler_mat(Matrice&,const DoubleVect&,int incr_pression,int resoudre_en_u) override;
35 int modifier_secmem(DoubleTab&) override;
36 int preparer_solution(DoubleTab&);
37 int modifier_solution(DoubleTab&) override;
38 int modifier_matrice(Matrice&) override;
39 void verifier_dirichlet();
40 void completer(const Equation_base& ) override;
41 inline const Equation_base& equation() const
42 {
43 if (!mon_equation)
44 {
45 Cerr << "\nError in Assembleur_P_VEFPreP1B::equation() : The equation is unknown !" << finl;
47 }
48 return mon_equation.valeur();
49 };
50
51 int modifier_secmem_elem(const DoubleTab&, DoubleTab&);
52 int modifier_secmem_som(const DoubleTab&, DoubleTab&);
53 int modifier_secmem_aretes(const DoubleTab&, DoubleTab&);
54
55 // Methodes du changement de base P0+P1<->P1Bulle
56 int changement_base() const
57 {
58 return (beta_!=0);
59 };
60 void changer_base_matrice(Matrice&); // A->A~ (P0+P1->P1Bulle)
61 void changer_base_second_membre(DoubleVect&); // y->y~ (P0+P1->P1Bulle)
62 void changer_base_pression_inverse(DoubleVect&); // x~->x (P1Bulle->P0+P1)
63 void changer_base_pression(DoubleVect&); // x->x~ (P0+P1->P1Bulle) Ne sert que pour les tests
64 template <vecteur _v_>
65 void changer_base(DoubleVect& v);
66
67protected:
68
69 int init = -1;
70 OBS_PTR(Equation_base) mon_equation;
71 void projete_L2(DoubleTab&);
72 double alpha_=0., beta_=0.; // Coefficients du changement de base P0+P1<->P1Bulle
73};
74
75#endif
76
77
78
OBS_PTR(Equation_base) mon_equation
const Equation_base & equation() const
int modifier_solution(DoubleTab &) override
void changer_base_second_membre(DoubleVect &)
void changer_base_pression_inverse(DoubleVect &)
int assembler_mat(Matrice &, const DoubleVect &, int incr_pression, int resoudre_en_u) override
void changer_base_pression(DoubleVect &)
int modifier_secmem_aretes(const DoubleTab &, DoubleTab &)
int modifier_secmem_elem(const DoubleTab &, DoubleTab &)
int modifier_secmem_som(const DoubleTab &, DoubleTab &)
int assembler_rho_variable(Matrice &, const Champ_Don_base &) override
Assemblage de la matrice div( porosite/rho * grad P ) Le type du champ "rho" a fournir depend de la d...
int preparer_solution(DoubleTab &)
const Domaine_VEF & domaine_Vef() const
int modifier_secmem(DoubleTab &) override
int assembler(Matrice &) override
int modifier_matrice(Matrice &) override
Modifier eventuellement la matrice pour la rendre definie si elle ne l'est pas Valeurs par defaut:
void completer(const Equation_base &) override
classe Champ_Don_base classe de base des Champs donnes (non calcules)
class Domaine_VEF
Definition Domaine_VEF.h:54
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
Classe Matrice Classe generique de la hierarchie des matrices.
Definition Matrice.h:34
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455