TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Op_Grad_PolyMAC_MPFA_Face.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 Op_Grad_PolyMAC_MPFA_Face_included
17#define Op_Grad_PolyMAC_MPFA_Face_included
18
19#include <Op_Grad_PolyMAC_HFV_Face.h>
20#include <cfloat>
21
22/*! @brief class Op_Grad_PolyMAC_MPFA_Face
23 *
24 * Cette classe represente l'operateur de gradient La discretisation est PolyMAC_MPFA
25 * On calcule le gradient d'un champ_Elem_PolyMAC_MPFA (la pression)
26 *
27 * @sa Operateur_Grad_base
28 */
30{
31 Declare_instanciable(Op_Grad_PolyMAC_MPFA_Face);
32public:
33 void completer() override;
34
35 /* interface {dimensionner,ajouter}_blocs -> cf Equation_base.h */
36 void dimensionner_blocs(matrices_t matrices, const tabs_t& semi_impl = { }) const override;
37 void ajouter_blocs(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = { }) const override;
38
39 void update_grad(int full_stencil = 0) const;
40
41 /* public pour utilisation par Assembleur_P_PolyMAC_MPFA : [grad p]_f */
42 mutable IntTab fgrad_d, fgrad_e;
43 mutable DoubleTab fgrad_c;
44
45protected:
46 mutable double last_gradp_ = -DBL_MAX; //dernier temps utilise pour interpoler grad p (mis a DBL_MAX si grad p non reinterpole)
47 mutable std::map<int, std::map<int, double>> dgp_gb_;
48 mutable std::map<int, std::map<int, double>> dgb_v_;
49 mutable std::vector<std::vector<std::pair<int, double>>> dgf_pe_;
50 mutable std::vector<std::vector<std::pair<int, double>>> dgf_gb_;
51};
52
53#endif /* Op_Grad_PolyMAC_MPFA_Face_included */
class Op_Grad_PolyMAC_HFV_Face
class Op_Grad_PolyMAC_MPFA_Face
void update_grad(int full_stencil=0) const
std::map< int, std::map< int, double > > dgb_v_
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={ }) const override
void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl={ }) const override
std::map< int, std::map< int, double > > dgp_gb_
std::vector< std::vector< std::pair< int, double > > > dgf_pe_
std::vector< std::vector< std::pair< int, double > > > dgf_gb_