TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Facettes_Interp_FT.h
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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 Facettes_Interp_FT_included
17#define Facettes_Interp_FT_included
18
19#include <FixedVector.h>
20#include <Maillage_FT_IJK.h>
21#include <TRUSTTabFT.h>
22#include <Cut_cell_FT_Disc.h>
23#include <Objet_U.h>
24
25class IJK_Interfaces;
27class Domaine_IJK;
28
30{
31 Declare_instanciable(Facettes_Interp_FT);
32
33public:
34 void associer(const IJK_Interfaces& interfaces, const Cut_cell_FT_Disc& cut_cell_disc, const Domaine_IJK& splitting_ft, const Maillage_FT_IJK& maillage_ft_ijk, const Maillage_FT_IJK& old_maillage_ft_ijk);
35 void set_param(Param& param) const override;
36
37 void cut_cell_perform_interpolation_facettes_next(int old_en_premier /* next() */);
38
39 void cut_cell_perform_interpolation_facettes_old(bool not_old_en_premier /* old() */);
40
45
46 int old() const { return 1 - old_en_premier_; }
47 int next() const { return old_en_premier_; }
48
52
53 const Maillage_FT_IJK& maillage_ft_ijk() const { return ref_maillage_ft_ijk_; }
54 const Maillage_FT_IJK& old_maillage_ft_ijk() const { return ref_old_maillage_ft_ijk_; }
55
56 double get_distance_interpolation_1() const;
57 double get_distance_interpolation_2() const;
58
59protected:
60
62 const Cut_cell_FT_Disc& cut_cell_disc,
63 const Domaine_IJK& geom,
64 const Maillage_FT_IJK& maillage,
65 FixedVector<DoubleTabFT, 4>& interpolation_coord,
66 FixedVector<IntTabFT, 4>& interpolation_signed_independent_index,
67 FixedVector<DoubleTabFT, 4>& interpolation_coefficient);
68
70 const double dist,
71 const Cut_cell_FT_Disc& cut_cell_disc,
72 const Maillage_FT_IJK& maillage,
73 FixedVector<DoubleTabFT, 4>& interpolation_coord,
74 const DoubleTab& normal_on_interf,
75 FixedVector<IntTabFT, 4>& cut_cell_facettes_interpolation_signed_independent_index,
76 FixedVector<DoubleTabFT, 4>& cut_cell_facettes_interpolation_coefficient);
77
79 const double dist_1,
80 const double dist_2,
81 const Cut_cell_FT_Disc& cut_cell_disc,
82 const Maillage_FT_IJK& maillage,
83 FixedVector<DoubleTabFT, 4>& interpolation_coord,
84 const DoubleTab& normal_on_interf,
85 FixedVector<IntTabFT, 4>& cut_cell_facettes_interpolation_signed_independent_index,
86 FixedVector<DoubleTabFT, 4>& cut_cell_facettes_interpolation_coefficient);
87
88 // Stockage des indices et coefficients des points d'interpolation a une certaine distance des facettes de l'interface
89 // Chaque tableau FixedVector<___, 4> est compose de la facon suivante :
90 // [0] Premier point d'interpolation dans la phase 0
91 // [1] Premier point d'interpolation dans la phase 1
92 // [2] Second point d'interpolation dans la phase 0
93 // [3] Second point d'interpolation dans la phase 1
94 // Les tableaux IntTabFT/DoubleTabFT ont la dimension (nombre_de_facettes, nombre_de_points_utilises_par_l_interpolation_pour_chaque_facette).
97
98 // Intermediate variables
100
101 bool old_en_premier_ = true; // Doit etre synchronise avec old_en_premier_ dans IJK_Interfaces
102 OBS_PTR(IJK_Interfaces) ref_interfaces_;
103 OBS_PTR(Cut_cell_FT_Disc) ref_cut_cell_disc_;
104 OBS_PTR(Domaine_IJK) ref_domaine_;
105 OBS_PTR(Maillage_FT_IJK) ref_maillage_ft_ijk_;
106 OBS_PTR(Maillage_FT_IJK) ref_old_maillage_ft_ijk_;
107
109 double scaled_distance_interpolation_1_ = 1.0; // Distance a l'interface du premier point d'interpolation
110 double scaled_distance_interpolation_2_ = 2.0; // Distance a l'interface du second point d'interpolation
111};
112
113#endif /* Facettes_Interp_FT_included */
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
void set_param(Param &param) const override
int get_number_of_interpolation_points() const
double get_scaled_distance_interpolation_1() const
const Maillage_FT_IJK & maillage_ft_ijk() const
double get_distance_interpolation_1() const
OBS_PTR(Maillage_FT_IJK) ref_maillage_ft_ijk_
OBS_PTR(IJK_Interfaces) ref_interfaces_
FixedVector< FixedVector< IntTabFT, 4 >, 2 > signed_independent_index_
const FixedVector< IntTabFT, 4 > & get_signed_independent_index_next() const
OBS_PTR(Cut_cell_FT_Disc) ref_cut_cell_disc_
void associer(const IJK_Interfaces &interfaces, const Cut_cell_FT_Disc &cut_cell_disc, const Domaine_IJK &splitting_ft, const Maillage_FT_IJK &maillage_ft_ijk, const Maillage_FT_IJK &old_maillage_ft_ijk)
void calcul_coefficient_interpolation_facette_cut_cell_second_order(bool next_time, const double dist_1, const double dist_2, const Cut_cell_FT_Disc &cut_cell_disc, const Maillage_FT_IJK &maillage, FixedVector< DoubleTabFT, 4 > &interpolation_coord, const DoubleTab &normal_on_interf, FixedVector< IntTabFT, 4 > &cut_cell_facettes_interpolation_signed_independent_index, FixedVector< DoubleTabFT, 4 > &cut_cell_facettes_interpolation_coefficient)
const Maillage_FT_IJK & old_maillage_ft_ijk() const
void cut_cell_perform_interpolation_facettes_old(bool not_old_en_premier)
double get_distance_interpolation_2() const
OBS_PTR(Domaine_IJK) ref_domaine_
void cut_cell_perform_interpolation_facettes(bool next_time, const Cut_cell_FT_Disc &cut_cell_disc, const Domaine_IJK &geom, const Maillage_FT_IJK &maillage, FixedVector< DoubleTabFT, 4 > &interpolation_coord, FixedVector< IntTabFT, 4 > &interpolation_signed_independent_index, FixedVector< DoubleTabFT, 4 > &interpolation_coefficient)
void cut_cell_perform_interpolation_facettes_next(int old_en_premier)
FixedVector< FixedVector< DoubleTabFT, 4 >, 2 > interpolation_coord_
FixedVector< FixedVector< DoubleTabFT, 4 >, 2 > coefficient_
const FixedVector< DoubleTabFT, 4 > & get_coefficient_next() const
OBS_PTR(Maillage_FT_IJK) ref_old_maillage_ft_ijk_
void calcul_coefficient_interpolation_facette_cut_cell(bool next_time, const double dist, const Cut_cell_FT_Disc &cut_cell_disc, const Maillage_FT_IJK &maillage, FixedVector< DoubleTabFT, 4 > &interpolation_coord, const DoubleTab &normal_on_interf, FixedVector< IntTabFT, 4 > &cut_cell_facettes_interpolation_signed_independent_index, FixedVector< DoubleTabFT, 4 > &cut_cell_facettes_interpolation_coefficient)
const FixedVector< DoubleTabFT, 4 > & get_coefficient_old() const
double get_scaled_distance_interpolation_2() const
const FixedVector< IntTabFT, 4 > & get_signed_independent_index_old() const
: class IJK_Interfaces
: class Maillage_FT_IJK
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112