16#ifndef OpConvQuickIJKScalar_TPP_included
17#define OpConvQuickIJKScalar_TPP_included
19#include <OpConvQuickIJKScalar.h>
21#ifndef OpConvQuickIJKScalar_included
22#error __FILE__ should only be included from corresponding header
27template <DIRECTION _DIR_>
29void OpConvQuickIJKScalar_double::compute_flux_(IJK_Field_local_double& resu,
const int k_layer)
31 if(_DIR_==DIRECTION::Z)
50 ConstIJK_double_ptr input_field(*
input_field_, 0, 0, k_layer);
53 IJK_double_ptr resu_ptr(resu, 0, 0, 0);
76 if(_DIR_==DIRECTION::Z)
79 const int global_k_layer = k_layer +
channel_data_.offset_to_global_k_layer();
82 const int first_global_k_layer = 0;
83 const int last_global_k_layer =
channel_data_.nb_elem_k_tot();
89 if (!
perio_k_ && (global_k_layer <= first_global_k_layer || global_k_layer >= last_global_k_layer))
99 const double delta_xyz_squared_over_8 = delta_xyz * delta_xyz * 0.125;
103 for (
int j = 0; ; j++)
105 for (
int i = 0; i < imax; i += vsize)
107 Simd_double velocity;
109 velocity_dir.get_center(i, velocity);
111 Simd_double fram0, fram1;
112 Simd_double curv0, curv1;
113 input_field.get_left_center(_DIR_, i, T0, T1);
114 fram_values.get_left_center(_DIR_, i, fram0, fram1);
115 curv_values.get_left_center(_DIR_, i, curv0, curv1);
116 Simd_double fram = SimdMax(fram0, fram1);
117 Simd_double curv = SimdSelect<double>(velocity, 0., curv1, curv0);
118 Simd_double T_amont = SimdSelect<double>(velocity, 0., T1 , T0 );
119 Simd_double flux = (T0 + T1) * 0.5 - delta_xyz_squared_over_8 * curv;
120 flux = ((1. - fram) * flux + fram * T_amont) * (velocity - velocity_frame) * surface;
121 resu_ptr.put_val(i, flux);
126 input_field.next_j();
127 velocity_dir.next_j();
128 fram_values.next_j();
129 curv_values.next_j();
133 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_
void compute_curv_fram(DIRECTION _DIR_, int k_layer)
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_