TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Couplage_Parietal_PolyMAC_MPFA_helper.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 Couplage_Parietal_PolyMAC_MPFA_helper_included
17#define Couplage_Parietal_PolyMAC_MPFA_helper_included
18
19#include <Operateur_Diff_base.h>
20#include <TRUST_Ref.h>
21
23
25{
26public:
27 void associer(const Op_Diff_PolyMAC_MPFA_Elem& op);
28 void completer_d_nuc();
29 inline int& d_nuc_a_jour() { return d_nuc_a_jour_; }
30 inline const int& d_nuc_a_jour() const { return d_nuc_a_jour_; }
31
32 void init_op_ext() const;
33 void dimensionner_blocs(matrices_t matrices, const tabs_t& semi_impl = {}) const;
34 void ajouter_blocs(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = {}) const;
35 const DoubleTab& d_nuc() const { return d_nuc_; }
36
37private:
38 OBS_PTR(Op_Diff_PolyMAC_MPFA_Elem) op_elem_;
39
40 /* sommets connectes a un autre probleme par un Echange_contact */
41 void init_s_dist() const;
42 mutable std::map<int, std::map<const Operateur_Diff_base *, int>> s_dist; //s_dist[som] = { { pb1, som1 }, { pb2, som2 }, ... }
43 mutable int s_dist_init_ = 0;
44
45 /* tableaux op_ext et pe_ext */
46 mutable IntTab som_mix, som_ext_d, som_ext_pe, som_ext_pf; //sommet s = som_ext(i) : melange-t-il les composantes, couple (probleme, elem) dans som_ext_e([som_ext_d(i, 0), som_ext_d(i + 1, 0)[, 0/1)
47 //faces Echange_contact (pb1, face1, pb2, face2) dans som_ext_f([som_ext_d(i, 1), som_ext_d(i + 1, 1)[, 0/1/2/3)
48 mutable int som_ext_init_ = 0;
49
50 /* tableau renvoye par d_nucleation(), rempli lors de ajouter_blocs() */
51 mutable int d_nuc_a_jour_ = 0; //d_nucleation() est utilisable ("a jour") entre le moment ou on a appelle ajouter_blocs() et le mettre_a_jour() suivant
52 mutable DoubleTab d_nuc_;
53};
54
55#endif /* Couplage_Parietal_PolyMAC_MPFA_helper_included */
void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={}) const
void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl={}) const
void associer(const Op_Diff_PolyMAC_MPFA_Elem &op)