TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Assembleur_P_VEF.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_VEF_included
17#define Assembleur_P_VEF_included
18
19#include <Matrice_Morse_Sym.h>
20#include <Assembleur_base.h>
21#include <TRUST_Ref.h>
22
23class Domaine_Cl_VEF;
24class Equation_base;
25class Domaine_VEF;
26
28{
29 Declare_instanciable(Assembleur_P_VEF);
30
31public:
32 void associer_domaine_dis_base(const Domaine_dis_base&) override;
34 const Domaine_dis_base& domaine_dis_base() const override;
35 const Domaine_Cl_dis_base& domaine_Cl_dis_base() const override;
36 int assembler(Matrice&) override;
37 int assembler_mat(Matrice&, const DoubleVect&, int, int) override;
38 int remplir(Matrice&, const DoubleTab&);
39 inline int remplir(Matrice&, const DoubleVect&)
40 {
42 return 1;
43 }
44
45 int assembler_QC(const DoubleTab&, Matrice&) override;
46 int modifier_secmem(DoubleTab&) override;
47 int modifier_solution(DoubleTab&) override;
48 virtual int modifier_matrice(Matrice&);
49 void completer(const Equation_base&) override;
50 inline const Equation_base& equation() const;
51
52protected:
53 OBS_PTR(Equation_base) mon_equation;
54 OBS_PTR(Domaine_VEF) le_dom_VEF;
55 OBS_PTR(Domaine_Cl_VEF) le_dom_Cl_VEF;
57 int has_P_ref = 0;
58 void calculer_inv_volume(DoubleTab& inv_volumes_entrelaces, const Domaine_Cl_VEF& domaine_Cl_VEF, const DoubleVect& volumes_entrelaces);
59
60};
61
63{
64 if (!mon_equation)
65 {
66 Cerr << "\nError in Assembleur_P_VEF::equation() : The equation is unknown !" << finl;
68 }
69 return mon_equation.valeur();
70}
71
72#endif
OBS_PTR(Equation_base) mon_equation
int assembler_mat(Matrice &, const DoubleVect &, int, int) override
const Domaine_dis_base & domaine_dis_base() const override
virtual int modifier_matrice(Matrice &)
Optionally modifies the matrix to make it definite if it is not.
int assembler_QC(const DoubleTab &, Matrice &) override
Assembles the pressure matrix for a quasi-compressible fluid: laplacian(P) is replaced by div(grad(P)...
int remplir(Matrice &, const DoubleVect &)
void calculer_inv_volume(DoubleTab &inv_volumes_entrelaces, const Domaine_Cl_VEF &domaine_Cl_VEF, const DoubleVect &volumes_entrelaces)
int modifier_solution(DoubleTab &) override
int assembler(Matrice &) override
DoubleTab les_coeff_pression
OBS_PTR(Domaine_VEF) le_dom_VEF
void completer(const Equation_base &) override
const Equation_base & equation() const
OBS_PTR(Domaine_Cl_VEF) le_dom_Cl_VEF
const Domaine_Cl_dis_base & domaine_Cl_dis_base() const override
int remplir(Matrice &, const DoubleTab &)
void associer_domaine_cl_dis_base(const Domaine_Cl_dis_base &) override
int modifier_secmem(DoubleTab &) override
void associer_domaine_dis_base(const Domaine_dis_base &) override
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_VEF
Definition Domaine_VEF.h:53
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
class Equation_base The role of an equation is the calculation of one or more fields....
Matrice class - Generic class in the matrix hierarchy.
Definition Matrice.h:34
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466