15#ifndef Corrige_flux_FT_temperature_subresolution_included
16#define Corrige_flux_FT_temperature_subresolution_included
18#include <Corrige_flux_FT_base.h>
19#include <IJK_Field_vector.h>
20#include <IJK_One_Dimensional_Subproblems.h>
21#include <IJK_subres_constants.h>
23#define FLUXES_OUT {-1, 1, -1, 1, -1, 1}
24#define FACES_DIR {0, 0, 1, 1, 2, 2}
26#define FLUX_SIGN_DIFF {-1, -1, -1, -1, -1, -1}
27#define FLUX_SIGN_CONV {1, 1, 1, 1, 1, 1}
28#define FLUX_SIGN {FLUX_SIGN_CONV, FLUX_SIGN_DIFF}
29#define MAX_FLUX_VAL 1e16
30#define MAX_FLUX_DIFF 1e10
41 const IJK_Field_double& field,
59 const int& neighbours_colinearity_weighting,
60 const int& keep_max_flux_correction,
61 const int& smooth_temperature_field)
override
80 const int& use_cell_neighbours_for_fluxes_spherical_correction,
81 const int& find_reachable_fluxes,
82 const int& use_reachable_fluxes,
83 const int& keep_first_reachable_fluxes,
84 const int& store_flux_operators_for_energy_balance)
override
95 const int& copy_temperature_on_every_procs)
override
108 FixedVector<std::vector<ArrOfDouble>,3>& subgrid_fluxes_xyz,
113 const int k_layer,
const int dir)
override;
119 const int k_layer,
const int dir)
override;
126 const int dir)
override;
129 const double dist,
const DoubleTab& positions,
const DoubleTab& normale,
130 ArrOfDouble& temperature_interp, ArrOfDouble& flux_normal_interp,
131 ArrOfDouble& temp_liqu, ArrOfDouble& temp_vap, DoubleTab& coo_liqu,
132 DoubleTab& coo_vap)
const override { ; };
140 IJK_Field_int& neighbours_weighting,
141 IJK_Field_double& neighbours_weighting_colinearity)
override;
143 const double& neighbours_weighting_colinearity,
144 const int& index_i_neighbour_global,
145 const int& index_j_neighbour_global,
146 const int& index_k_neighbour_global);
149 IJK_Field_int& neighbours_weighting,
150 IJK_Field_double& neighbours_weighting_colinearity,
156 const int& offset_k);
158 IJK_Field_double& temperature_neighbours,
159 IJK_Field_int& neighbours_weighting,
160 IJK_Field_double& neighbours_weighting_colinearity)
const override;
162 ArrOfInt& corrected_values,
163 ArrOfInt& out_of_bounds_corrected_values,
164 ArrOfDouble& out_of_bounds_values,
165 IJK_Field_double& distance)
const;
168 const int nb_k_layer);
170 const int nb_k_layer);
172 const int nb_k_layer);
174 const int global_indices = 0);
177 FixedVector<std::vector<ArrOfInt>,3>& weighting_flux_xyz_faces_sorted,
178 FixedVector<std::vector<ArrOfDouble>,3>& colinearity_flux_xyz_faces_sorted,
179 FixedVector<std::vector<ArrOfDouble>,3>& temperature_flux_xyz_faces_sorted,
180 const bool& ini_index,
181 const int global_indices=0,
182 const int weighting_colinearity=0);
185 IJK_Field_vector3_double& cell_faces_neighbours_corrected_velocity_temperature,
186 IJK_Field_vector3_double& cell_faces_neighbours_corrected_convective_mixed_cell,
187 IJK_Field_vector3_double& cell_faces_neighbours_corrected_diffusive_mixed_cell,
188 IJK_Field_vector3_double& neighbours_weighting_colinearity_mixed_cell);
190 IJK_Field_local_double& cell_faces_neighbours_corrected_field,
191 IJK_Field_vector3_double& cell_faces_neighbours_corrected_field_mixed_cell);
193 IJK_Field_vector3_double& cell_faces_neighbours_corrected_velocity_temperature,
194 IJK_Field_vector3_double& cell_faces_neighbours_corrected_convective,
195 IJK_Field_vector3_double& cell_faces_neighbours_corrected_diffusive,
196 IJK_Field_vector3_double& neighbours_weighting_colinearity)
override;
198 const int& index_j_neighbour_global,
199 const int& index_k_neighbour_global,
200 const int& subproblem_index,
203 const double& colinearity,
207 const double& convective_flux_computed=0,
208 const double& diffusive_flux_computed=0);
211 IJK_Field_vector3_double& cell_faces_neighbours_corrected_velocity_temperature,
212 IJK_Field_vector3_double& cell_faces_neighbours_corrected_convective,
213 IJK_Field_vector3_double& cell_faces_neighbours_corrected_diffusive,
214 IJK_Field_vector3_double& neighbours_weighting_colinearity);
217 IJK_Field_vector3_double& cell_faces_neighbours_corrected_convective_diffusive_flux,
222 double& convective_diffusive_flux);
228 double& convective_diffusive_flux,
229 const double& replace_weighting_values);
232 IJK_Field_vector3_double& cell_faces_neighbours_corrected_velocity_temperature,
233 IJK_Field_vector3_double& cell_faces_neighbours_corrected_convective,
234 IJK_Field_vector3_double& cell_faces_neighbours_corrected_diffusive,
235 IJK_Field_vector3_double& neighbours_weighting_colinearity,
236 const int& compute_fluxes_values);
238 IJK_Field_vector3_double& neighbours_weighting_colinearity,
239 IJK_Field_vector3_double& cell_faces_neighbours_corrected_convective,
240 IJK_Field_vector3_double& cell_faces_neighbours_corrected_diffusive,
241 IJK_Field_vector3_double& cell_faces_neighbours_corrected_velocity_temperature,
242 const int& subproblem_index,
243 const int& index_i,
const int& index_j,
const int& index_k,
246 const double& colinearity,
247 const int& compute_fluxes_values,
248 double& convective_flux,
249 double& diffusive_flux);
251 const int& subproblem_index,
254 const double& colinearity,
258 const int& temperature=0);
260 const int& subproblem_index,
263 const double& colinearity,
267 const int& temperature=0);
269 const int& subproblem_index,
272 const double& colinearity,
277 const int& subproblem_index,
280 const double& colinearity,
285 const int& subproblem_index,
288 const double& colinearity,
293 const int& subproblem_index,
296 const double& colinearity,
301 const int fluxes_type,
302 const int& subproblem_index,
305 const double& colinearity,
309 const int& temperature=0);
311 const int fluxes_type,
312 const int& subproblem_index,
315 const double& colinearity,
320 const IJK_Field_vector3_int& cell_faces_neighbours_corrected_all_bool,
321 const IJK_Field_vector3_double& cell_faces_neighbours_fluxes_corrected,
322 const int& fluxes_type)
override;
324 const IJK_Field_vector3_int& cell_faces_neighbours_corrected_all_bool,
325 const IJK_Field_vector3_double& cell_faces_neighbours_fluxes_corrected,
338 const int& fluxes_correction_conservations);
341 const int& index_subproblem,
346 const int& index_i=INVALID_INDEX,
347 const int& index_j=INVALID_INDEX,
348 const int& index_k=INVALID_INDEX,
349 const int& temperature=0);
354 const int& index_subproblem,
359 void clean()
override;
364 FixedVector<std::vector<ArrOfDouble>, 3>& flux_xyz,
365 FixedVector<std::vector<ArrOfDouble>, 3>& flux_xyz_remaining_global,
366 FixedVector<std::map<int, int>, 3>& flux_frontier_map,
367 const DoubleVect& fluxes_subgrid,
368 const int ini_index);
372 FixedVector<std::vector<ArrOfDouble>,3>& flux_xyz_remaining_global,
373 const int ini_index);
377 FixedVector<std::vector<ArrOfDouble>,3>& flux_xyz_remaining_global,
378 FixedVector<std::map<int, int>, 3>& flux_frontier_map,
379 const int ini_index);
382 FixedVector<std::vector<std::vector<ArrOfDouble>>,3>& flux_xyz,
383 const int ini_index);
387 FixedVector<std::vector<ArrOfDouble>,3>& flux_xyz_remaining_global,
388 const int ini_index);
391 IJK_Field_vector3_double& cell_faces_corrected_convective,
392 IJK_Field_vector3_double& cell_faces_corrected_diffusive)
override;
395 IJK_Field_vector3_double& cell_faces_corrected,
396 const DoubleVect& fluxes,
399 void check_pure_fluxes_duplicates(
const DoubleVect& fluxes, DoubleVect& fluxes_unique, IntVect& pure_face_unique,
const int known_unique);
404 const IJK_Field_int& neighbours_temperature_to_correct,
405 IJK_Field_vector3_int& cell_faces_neighbours_corrected_min_max_bool,
406 const int& max_flux_per_dir,
407 const int& check_cell_center_neighbour,
408 const int& remove_external_neighbour_values,
409 IJK_Field_int& neighbours_temperature_to_correct_trimmed)
override;
412 const IJK_Field_int& neighbours_temperature_to_correct,
413 IJK_Field_vector3_int& cell_faces_neighbours_corrected_min_max_bool,
414 const int& max_flux_per_dir,
415 const int& check_cell_center_neighbour,
416 const int& remove_external_neighbour_values,
417 IJK_Field_int& neighbours_temperature_to_correct_trimmed)
override;
419 ArrOfInt& indices_found_transition_end,
420 ArrOfInt& indices_found_ini,
421 ArrOfInt& indices_found_end,
423 const int& max_n_layer);
425 ArrOfInt& indices_found_end,
427 const int& max_n_layer);
430 ArrOfInt& indices_to_remove,
431 ArrOfInt& indices_fluxes_to_remove,
: class Corrige_flux_FT API pour modifier un champ de flux à partir de donnees à l'interface....
void initialize_with_subproblems(const Domaine_IJK &splitting, const IJK_Field_double &field, const IJK_Interfaces &interfaces, const Probleme_FTD_IJK_base &ijk_ft, Intersection_Interface_ijk_face &intersection_ijk_face, Intersection_Interface_ijk_cell &intersection_ijk_cell, IJK_One_Dimensional_Subproblems &thermal_subproblems) override
void get_add_replace_flux_value(IJK_Field_vector3_double &cell_faces_neighbours_corrected_convective_diffusive_flux, const int &dir, const int &i, const int &j, const int &k, double &convective_diffusive_flux, const double &replace_weighting_values)
void set_correction_cell_neighbours(const int &correct_temperature_cell_neighbours, const int &neighbours_colinearity_weighting, const int &keep_max_flux_correction, const int &smooth_temperature_field) override
void store_any_cell_faces_corrected(IJK_Field_vector3_int &cell_faces_corrected_bool, FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz_sorted, IJK_Field_vector3_double &cell_faces_corrected, const DoubleVect &fluxes, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz, const int counter)
void compute_cell_neighbours_faces_indices_to_correct(IJK_Field_vector3_int &cell_faces_neighbours_corrected_bool, IJK_Field_vector3_double &cell_faces_neighbours_corrected_velocity_temperature, IJK_Field_vector3_double &cell_faces_neighbours_corrected_convective, IJK_Field_vector3_double &cell_faces_neighbours_corrected_diffusive, IJK_Field_vector3_double &neighbours_weighting_colinearity) override
bool compute_cell_neighbours_thermal_convective_fluxes_face_centre(double &convective_flux, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k, const int &temperature=0)
void sort_ijk_intersections_subproblems_indices_by_k_layers() override
void compute_cell_neighbours_thermal_fluxes_face_centre_discrete_integral(double &flux, const int fluxes_type, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k)
int diffusion_negligible_
void combine_all_fluxes_from_outisde_frontier_on_procs(IJK_Field_vector3_int &cell_faces_neighbours_corrected_bool, IJK_Field_vector3_double &cell_faces_neighbours_corrected_velocity_temperature, IJK_Field_vector3_double &cell_faces_neighbours_corrected_convective, IJK_Field_vector3_double &cell_faces_neighbours_corrected_diffusive, IJK_Field_vector3_double &neighbours_weighting_colinearity)
void clear_vectors() override
void redistribute_indices_fluxes_by_k_layers(FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_i_flux_x, FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_i_flux_x_remaining_global, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz_remaining_global, const int ini_index)
void receive_temperature_cell_centre_neighbours_from_procs()
int keep_first_reachable_fluxes_
void corrige_flux_diff_faceIJ(IJK_Field_local_double *const flux, const int k_layer, const int dir) override
void compute_cell_neighbours_faces_indices_for_spherical_correction(const int &n_iter_distance) override
FixedVector< ArrOfInt, 3 > indices_temperature_neighbours_on_procs_
ArrOfDouble temperature_neighbours_on_procs_
void replace_cell_neighbours_thermal_convective_diffusive_fluxes_faces(const IJK_Field_vector3_int &cell_faces_neighbours_corrected_min_max_bool, const IJK_Field_vector3_int &cell_faces_neighbours_corrected_all_bool, const IJK_Field_vector3_double &cell_faces_neighbours_fluxes_corrected, const int &fluxes_type) override
FixedVector< std::map< int, int >, 3 > flux_frontier_map_
bool has_checked_consistency_
FixedVector< FixedVector< std::vector< ArrOfDouble >, 3 >, 2 > convective_diffusive_flux_xyz_sorted_
void sort_ijk_intersections_subproblems_indices_fluxes_by_k_layers(FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz, FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz_remaining_global, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz_remaining_global, FixedVector< std::map< int, int >, 3 > &flux_frontier_map, const DoubleVect &fluxes_subgrid, const int ini_index)
void set_convection_diffusion_correction(const int &convective_flux_correction, const int &diffusive_flux_correction) override
void combine_fluxes_from_frontier_on_procs(FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz, FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz_remaining_global, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz_remaining_global, FixedVector< std::map< int, int >, 3 > &flux_frontier_map, const int ini_index)
void initialise_any_cell_neighbours_indices_to_correct(FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz_faces_sorted, const int global_indices=0)
void clear_std_vectors_array_of_double(std::vector< ArrOfDouble > &values_to_clear)
int get_linear_index_local(const int &i, const int &j, const int &k, const int &dir)
void remove_min_max_ijk_reachable_fluxes_discontinuous(const IJK_Field_vector3_int &cell_faces_neighbours_corrected_all_bool, FixedVector< IJK_Field_local_int, 3 > &cell_faces_neighbours_corrected_min_max_bool)
void associate_indices_and_check_subproblems_consistency()
void check_pure_fluxes_duplicates(const DoubleVect &fluxes, DoubleVect &fluxes_unique, IntVect &pure_face_unique, const int known_unique)
void receive_fluxes_from_frontier_on_procs(FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz_remaining_global, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz_remaining_global, const int ini_index)
int copy_temperature_on_every_procs_
int find_reachable_fluxes_
int get_linear_index_global(const int &i, const int &j, const int &k, const int &dir)
FixedVector< FixedVector< std::vector< ArrOfDouble >, 3 >, 2 > convective_diffusive_flux_xyz_remaining_global_sorted_
DoubleVect diffusive_fluxes_unique_
ArrOfDouble neighbours_weighting_colinearity_on_procs_
DoubleVect convective_fluxes_
void replace_temperature_cell_centre_neighbours(IJK_Field_double &temperature, IJK_Field_double &temperature_neighbours, IJK_Field_int &neighbours_weighting, IJK_Field_double &neighbours_weighting_colinearity) const override
void store_cell_faces_corrected(IJK_Field_vector3_int &cell_faces_corrected_bool, IJK_Field_vector3_double &cell_faces_corrected_convective, IJK_Field_vector3_double &cell_faces_corrected_diffusive) override
void compute_thermal_fluxes_face_centre(DoubleVect &fluxes, const int fluxes_type, const int &last_flux)
bool compute_cell_neighbours_diffusive_fluxes_to_correct(double &diffusive_flux, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k)
FixedVector< std::map< int, int >, 3 > flux_frontier_all_map_
FixedVector< std::vector< ArrOfDouble >, 3 > colinearity_flux_xyz_neighbours_all_faces_remaining_global_sorted_
IJK_One_Dimensional_Subproblems * thermal_subproblems_
void initialise_fixed_vectors(FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &fixed_vectors, const int nb_k_layer)
DoubleVect convective_fluxes_unique_
void compute_thermal_diffusive_fluxes(const int &last_flux) override
void set_correction_cell_faces_neighbours(const int &find_cell_neighbours_for_fluxes_spherical_correction, const int &use_cell_neighbours_for_fluxes_spherical_correction, const int &find_reachable_fluxes, const int &use_reachable_fluxes, const int &keep_first_reachable_fluxes, const int &store_flux_operators_for_energy_balance) override
FixedVector< std::vector< ArrOfDouble >, 3 > temperature_flux_all_faces_remaining_global_sorted_
void corrige_flux_conv_faceIJ(IJK_Field_local_double *const flux, const int k_layer, const int dir)
FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > index_face_ij_flux_xyz_remaining_global_sorted_
void compute_cell_neighbours_thermal_convective_fluxes_face_centre_discrete_integral(double &convective_flux, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k)
void set_distance_cell_faces_from_lrs(const int &distance_cell_faces_from_lrs) override
void set_debug(const int &debug) override
void corrige_flux_faceIJ(IJK_Field_local_double *const flux, const int k_layer, const int dir) override
void compute_flux_neighbours_on_procs(const int &index_i_neighbour_global, const int &index_j_neighbour_global, const int &index_k_neighbour_global, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k, const double &convective_flux_computed=0, const double &diffusive_flux_computed=0)
FixedVector< std::vector< ArrOfInt >, 3 > weighting_flux_xyz_neighbours_all_faces_remaining_global_sorted_
void clear_std_vectors_array_of_int(std::vector< ArrOfInt > &indices_to_clear)
DoubleVect compute_thermal_flux_face_centre_discrete_integral(const int fluxes_type, const int &index_subproblem, const double &dist, const int &dir, const int &l=-1)
void update_intersections() override
void set_fluxes_feedback_params(const int discrete_integral, const int levels) override
const IJK_Field_vector3_double * eulerian_normal_vectors_ns_normed_
bool compute_cell_neighbours_thermal_fluxes_face_centre(double &flux, const int fluxes_type, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k, const int &temperature=0)
void compute_ijk_pure_faces_indices() override
void receive_all_fluxes_from_outisde_frontier_on_procs()
void smooth_temperature_cell_centre_neighbours(IJK_Field_double &temperature, ArrOfInt &corrected_values, ArrOfInt &out_of_bounds_corrected_values, ArrOfDouble &out_of_bounds_values, IJK_Field_double &distance) const
void initialise_any_cell_neighbours_indices_to_correct_with_flux(FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz_faces_sorted, FixedVector< std::vector< ArrOfDouble >, 3 > &fluxes, FixedVector< std::vector< ArrOfInt >, 3 > &weighting_flux_xyz_faces_sorted, FixedVector< std::vector< ArrOfDouble >, 3 > &colinearity_flux_xyz_faces_sorted, FixedVector< std::vector< ArrOfDouble >, 3 > &temperature_flux_xyz_faces_sorted, const bool &ini_index, const int global_indices=0, const int weighting_colinearity=0)
double compute_thermal_flux_face_centre(const int fluxes_type, const int &index_subproblem, const double &dist, const int &dir, bool &valid_val, const int &l=-1, const int &index_i=INVALID_INDEX, const int &index_j=INVALID_INDEX, const int &index_k=INVALID_INDEX, const int &temperature=0)
void set_zero_temperature_increment(IJK_Field_double &d_temperature) const override
int use_reachable_fluxes_
int convection_negligible_
void compute_min_max_ijk_any_reachable_fluxes(const IJK_Field_vector3_int &cell_faces_neighbours_corrected_all_bool, const IJK_Field_int &neighbours_temperature_to_correct, IJK_Field_vector3_int &cell_faces_neighbours_corrected_min_max_bool, const int &max_flux_per_dir, const int &check_cell_center_neighbour, const int &remove_external_neighbour_values, IJK_Field_int &neighbours_temperature_to_correct_trimmed) override
void replace_cell_neighbours_thermal_fluxes_faces(const IJK_Field_vector3_int &cell_faces_neighbours_corrected_min_max_bool, const IJK_Field_vector3_int &cell_faces_neighbours_corrected_all_bool, const IJK_Field_vector3_double &cell_faces_neighbours_fluxes_corrected, FixedVector< std::vector< ArrOfDouble >, 3 > &flux_xyz, const int counter)
void compute_temperature_cell_centre_neighbours(IJK_Field_double &temperature_neighbours, IJK_Field_int &neighbours_weighting, IJK_Field_double &neighbours_weighting_colinearity) override
void compute_cell_neighbours_mixed_cell_faces_any_field(IJK_Field_vector3_int &cell_faces_neighbours_corrected_bool, IJK_Field_local_double &cell_faces_neighbours_corrected_field, IJK_Field_vector3_double &cell_faces_neighbours_corrected_field_mixed_cell)
FixedVector< FixedVector< std::vector< ArrOfDouble >, 3 >, 2 > convective_diffusive_flux_all_faces_remaining_global_sorted_
int convective_flux_correction_
int keep_max_flux_correction_
void corrige_flux_faceIJ_any_flux(IJK_Field_local_double *const flux, FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > &index_face_ij_flux_xyz_sorted, FixedVector< std::vector< ArrOfDouble >, 3 > &subgrid_fluxes_xyz, const int k_layer, const int dir)
void complete_neighbours_and_weighting_colinearity(IJK_Field_vector3_int &cell_faces_neighbours_corrected_bool, IJK_Field_vector3_double &cell_faces_neighbours_corrected_velocity_temperature, IJK_Field_vector3_double &cell_faces_neighbours_corrected_convective, IJK_Field_vector3_double &cell_faces_neighbours_corrected_diffusive, IJK_Field_vector3_double &neighbours_weighting_colinearity, const int &compute_fluxes_values)
void sort_ini_end_arrays(ArrOfInt &indices_found_transition_ini, ArrOfInt &indices_found_transition_end, ArrOfInt &indices_found_ini, ArrOfInt &indices_found_end, FixedVector< ArrOfInt, 2 > &indices_sorted, const int &max_n_layer)
bool compute_cell_neighbours_convective_fluxes_to_correct(double &convective_flux, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k, const int &temperature=0)
IJK_Field_vector3_int * cell_faces_neighbours_corrected_bool_
void compute_thermal_diffusive_fluxes_face_centre_discrete_integral()
int use_cell_neighbours_for_fluxes_spherical_correction_
void compute_cell_neighbours_fluxes_to_correct(IJK_Field_vector3_int &cell_faces_neighbours_corrected_bool, IJK_Field_vector3_double &neighbours_weighting_colinearity, IJK_Field_vector3_double &cell_faces_neighbours_corrected_convective, IJK_Field_vector3_double &cell_faces_neighbours_corrected_diffusive, IJK_Field_vector3_double &cell_faces_neighbours_corrected_velocity_temperature, const int &subproblem_index, const int &index_i, const int &index_j, const int &index_k, const double &dist, const int &dir, const double &colinearity, const int &compute_fluxes_values, double &convective_flux, double &diffusive_flux)
void set_temperature_fluxes_periodic_sharing_strategy_on_processors(const int ©_fluxes_on_every_procs, const int ©_temperature_on_every_procs) override
void set_cell_faces_neighbours_corrected_bool(IJK_Field_vector3_int &cell_faces_neighbours_corrected_bool) override
int diffusive_flux_correction_
void compute_min_max_ijk_reachable_fluxes(const IJK_Field_vector3_int &cell_faces_neighbours_corrected_all_bool, const IJK_Field_int &neighbours_temperature_to_correct, IJK_Field_vector3_int &cell_faces_neighbours_corrected_min_max_bool, const int &max_flux_per_dir, const int &check_cell_center_neighbour, const int &remove_external_neighbour_values, IJK_Field_int &neighbours_temperature_to_correct_trimmed) override
DoubleVect diffusive_fluxes_
void associate_thermal_problems(IJK_One_Dimensional_Subproblems &thermal_subproblems)
int smooth_temperature_field_
ArrOfInt ijk_intersections_subproblems_indices_
FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > index_face_ij_flux_xyz_sorted_
bool compute_cell_neighbours_thermal_diffusive_fluxes_face_centre(double &diffusive_flux, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k)
void compute_thermal_convective_fluxes_face_centre_discrete_integral()
int find_cell_neighbours_for_fluxes_spherical_correction_
FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > index_face_ij_flux_xyz_neighbours_min_max_faces_sorted_
bool identify_wrong_predicted_values(IJK_Field_vector3_int &cell_faces_neighbours_corrected_bool, IJK_Field_vector3_double &cell_faces_neighbours_corrected_convective_diffusive_flux, const int &dir, const int &index_i, const int &index_j, const int &index_k, double &convective_diffusive_flux)
IntVect pure_face_unique_
void compute_thermal_convective_fluxes_face_centre(const int &last_flux)
void initialise_fixed_vector(FixedVector< std::vector< ArrOfInt >, 3 > &fixed_vector, const int nb_k_layer)
void complete_thermal_fluxes_face_centre(const int &fluxes_correction_conservations) override
void compute_thermal_diffusive_fluxes_face_centre(const int &last_flux)
void initialise_cell_neighbours_indices_to_correct() override
FixedVector< IntVect, 4 > ijk_faces_to_correct_
FixedVector< std::map< int, int >, 3 > flux_outside_frontier_all_map_
void set_eulerian_normal_vectors_ns_normed(const IJK_Field_vector3_double *eulerian_normal_vectors_ns_normed) override
int store_flux_operators_for_energy_balance_
int distance_cell_faces_from_lrs_
void combine_temperature_cell_centre_neighbours_from_procs(IJK_Field_double &temperature_neighbours, IJK_Field_int &neighbours_weighting, IJK_Field_double &neighbours_weighting_colinearity, const int &ni, const int &nj, const int &nk, const int &offset_i, const int &offset_j, const int &offset_k)
void set_diffusion_negligible(const int &diffusion_negligible) override
FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > index_face_ij_flux_xyz_neighbours_all_faces_sorted_
void initialise_any_cell_neighbours_indices_to_correct_on_processors(FixedVector< FixedVector< std::vector< std::vector< ArrOfInt > >, 3 >, 2 > &index_face_ij_flux_xyz, FixedVector< std::vector< std::vector< ArrOfDouble > >, 3 > &flux_xyz, const int ini_index)
int find_temperature_cell_neighbours_
void compute_cell_neighbours_thermal_diffusive_fluxes_face_centre_discrete_integral(double &diffusive_flux, const int &subproblem_index, const double &dist, const int &dir, const double &colinearity, const int &index_i, const int &index_j, const int &index_k)
void correct_flux_spherical(Simd_double &a, Simd_double &b, const int &i, const int &j, const int &k_layer, const int dir) override
int neighbours_colinearity_weighting_
FixedVector< FixedVector< std::vector< ArrOfDouble >, 3 >, 2 > convective_diffusive_flux_xyz_min_max_faces_sorted_
void calcul_temperature_flux_interface(const IJK_Field_double &temperature, const double ldal, const double ldav, const double dist, const DoubleTab &positions, const DoubleTab &normale, ArrOfDouble &temperature_interp, ArrOfDouble &flux_normal_interp, ArrOfDouble &temp_liqu, ArrOfDouble &temp_vap, DoubleTab &coo_liqu, DoubleTab &coo_vap) const override
void set_convection_negligible(const int &convection_negligible) override
void remove_non_overlapping_fluxes_values(const FixedVector< ArrOfInt, 2 > &indices_sorted, const FixedVector< ArrOfInt, 2 > &indices_fluxes_sorted, ArrOfInt &indices_to_remove, ArrOfInt &indices_fluxes_to_remove, int &index_bis, int &index_ter, const int &dir)
void compute_temperature_cell_centre_neighbours_on_procs(const double &temperature_neighbours, const double &neighbours_weighting_colinearity, const int &index_i_neighbour_global, const int &index_j_neighbour_global, const int &index_k_neighbour_global)
FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > index_face_ij_flux_xyz_neighbours_diag_faces_sorted_
void initialise_fixed_vector_values(FixedVector< std::vector< ArrOfDouble >, 3 > &fixed_vector_values, const int nb_k_layer)
FixedVector< FixedVector< std::vector< ArrOfInt >, 3 >, 2 > index_face_ij_flux_xyz_neighbours_all_faces_remaining_global_sorted_
void compute_thermal_convective_fluxes(const int &last_flux) override
void compute_temperature_cell_centre(IJK_Field_double &temperature) const override
void compute_thermal_fluxes_face_centre_discrete_integral(DoubleVect &fluxes, const int fluxes_type)
int copy_fluxes_on_every_procs_
void compute_cell_neighbours_mixed_cell_faces_indices_to_correct(IJK_Field_vector3_int &cell_faces_neighbours_corrected_bool_mixed_cell, IJK_Field_vector3_double &cell_faces_neighbours_corrected_velocity_temperature, IJK_Field_vector3_double &cell_faces_neighbours_corrected_convective_mixed_cell, IJK_Field_vector3_double &cell_faces_neighbours_corrected_diffusive_mixed_cell, IJK_Field_vector3_double &neighbours_weighting_colinearity_mixed_cell)
void get_discrete_surface_at_level(const int &dir, const int &level)
This class encapsulates all the information related to the eulerian mesh for TrioIJK.