16#ifndef OpConvCentre2IJKScalar_TPP_included
17#define OpConvCentre2IJKScalar_TPP_included
19#include <OpConvCentre2IJKScalar.h>
21#ifndef OpConvCentre2IJKScalar_included
22#error __FILE__ should only be included from corresponding header
25#include <ConstIJK_ptr.h>
26#include <IJK_Field_local_template.h>
28#include <Operateur_IJK_base.h>
29#include <Simd_template.h>
31template <DIRECTION _DIR_>
32void OpConvCentre2IJKScalar_double::compute_flux_(IJK_Field_local_double& resu,
const int k_layer)
34 Simd_double velocity(1.);
47 ConstIJK_double_ptr input_field(*
input_field_, 0, 0, k_layer);
48 IJK_double_ptr resu_ptr(resu, 0, 0, 0);
69 if(_DIR_ == DIRECTION::Z)
72 const int global_k_layer = k_layer +
channel_data_.offset_to_global_k_layer();
75 const int first_global_k_layer = 0;
76 const int last_global_k_layer =
channel_data_.nb_elem_k_tot();
82 if (!
perio_k_ && (global_k_layer <= first_global_k_layer || global_k_layer >= last_global_k_layer))
95 for (
int j = 0; ; j++)
97 for (
int i = 0; i < imax; i += vsize)
100 velocity_dir.get_center(i, velocity);
102 input_field.get_left_center(_DIR_, i, T0, T1);
103 Simd_double flux = (T0 + T1) * 0.5;
104 flux = flux * (velocity - velocity_frame) * surface;
105 resu_ptr.put_val(i, flux);
110 input_field.next_j();
112 velocity_dir.next_j();
116 if(_DIR_ == DIRECTION::Z)
const IJK_Field_double & get_input_velocity(DIRECTION _DIR_)
Operateur_IJK_data_channel channel_data_
const IJK_Field_double * input_velocity_y_
const IJK_Field_double * input_field_
Vecteur3 velocity_frame_of_reference_
const IJK_Field_double * input_velocity_z_
void shift_curv_fram(IJK_Field_local_double &tmp_curv_fram)
const IJK_Field_double * input_velocity_x_
IJK_Field_local_double tmp_curv_fram_
int stored_curv_fram_layer_z_