118 const int ni = tmp_curv_fram.
ni();
119 const int nj = tmp_curv_fram.
nj();
122 for (j = 0; j < nj; j++)
123 for (i = 0; i < ni; i++)
124 tmp_curv_fram(i,j,0) = tmp_curv_fram(i,j,1);
126 for (j = 0; j < nj; j++)
127 for (i = 0; i < ni; i++)
128 tmp_curv_fram(i,j,2) = tmp_curv_fram(i,j,3);
137 int index = _DIR_ == DIRECTION::Y ? -1 : 0;
138 ConstIJK_double_ptr input_field(*
input_field_, 0, index, k_layer);
145 if(_DIR_ == DIRECTION::Z)
148 const int global_k_layer = k_layer +
channel_data_.offset_to_global_k_layer();
151 const int first_global_k_layer = 0;
152 const int last_global_k_layer =
channel_data_.nb_elem_k_tot();
154 if (!
perio_k_ && (global_k_layer <= first_global_k_layer || global_k_layer >= last_global_k_layer))
156 for (
int j = 0; j < nj; j++)
157 for (
int i = 0; i < ni; i++)
159 for (
int j = 0; j < nj; j++)
160 for (
int i = 0; i < ni; i++)
167 double factor01 = -1.0;
168 double factor12 = -1.0;
169 if(_DIR_==DIRECTION::X)
173 factor01 = inv_dx * inv_dx;
176 if(_DIR_==DIRECTION::Y)
180 factor01 = inv_dy * inv_dy;
183 if(_DIR_==DIRECTION::Z)
189 factor01 = 1. / (dz1 * (dz0 + dz1) * 0.5);
190 factor12 = 1. / (dz1 * (dz1 + dz2) * 0.5);
194 const int imax = _DIR_==DIRECTION::X ? ni + 1 : ni;
195 const int imax1 = imax - (vsize-1);
196 const int jmax = _DIR_==DIRECTION::Y ? nj + 1 : nj;
197 const int imin = _DIR_ == DIRECTION::X ? -1:0;
198 const int jmin = _DIR_ == DIRECTION::Y ? -1:0;
204 for (
int j = jmin; ; j++)
207 for (i = imin; i < 0; i++)
208 compute_curv_fram_loop_(_DIR_, i, factor12, factor01, input_field, curv_values, fram_values );
210 for (i = 0; i < imax1; i += vsize)
212 Simd_double t0 = 0., t1 = 0., t2 = 0.;
214 Simd_double curv = (t2 - t1) * factor12 - (t1 - t0) * factor01;
216 Simd_double smin = SimdMin(t0, t2);
217 Simd_double smax = SimdMax(t0, t2);
220 Simd_double zeroVec = 0.;
221 Simd_double oneVec = 1.;
222 Simd_double minVec = DMINFLOAT;
223 Simd_double dsabs = SimdSelect(zeroVec, smax - smin, smax - smin, smin - smax);
224 Simd_double ds = SimdSelect(dsabs, minVec, oneVec, smax - smin);
225 Simd_double sr = SimdSelect(dsabs, minVec, zeroVec, ((t1 - smin) / ds - 0.5) * 2.);
228 sr = SimdMin(sr, oneVec);
232 for (; i < imax; i++) compute_curv_fram_loop_(_DIR_, i, factor12, factor01, input_field, curv_values, fram_values );
244void Operateur_IJK_elem_conv_base_double::compute_curv_fram_loop_(DIRECTION _DIR_,
int iter,
double factor12,
double factor01,
const ConstIJK_double_ptr& input_field, IJK_double_ptr& curv_values, IJK_double_ptr& fram_values )
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
bool get_periodic_flag(int direction) const
Method returns true if periodic in this direction.
void put_val(int i_offset, const _TYPE_ &val)
Performs the assignment: field(i+i_offset,j,k) = val.