165 std::vector<double> &values,
166 const unsigned int component)
const
168 const unsigned int n = points.size();
169 const bool variable_direction = (
incr.size() == 1) ? false :
true;
170 if (variable_direction)
175 std::vector<double> aux(n);
177 std::vector<Point<dim>> paux(n);
184 for (
unsigned int i = 0; i < n; ++i)
185 paux[i] = points[i] +
incr[(variable_direction) ? i : 0U];
186 f.value_list(paux, values, component);
187 for (
unsigned int i = 0; i < n; ++i)
188 paux[i] = points[i] -
incr[(variable_direction) ? i : 0U];
189 f.value_list(paux, aux, component);
190 for (
unsigned int i = 0; i < n; ++i)
191 values[i] = (values[i] - aux[i]) / (2 *
h);
194 f.value_list(points, values, component);
195 for (
unsigned int i = 0; i < n; ++i)
196 paux[i] = points[i] -
incr[(variable_direction) ? i : 0U];
197 f.value_list(paux, aux, component);
198 for (
unsigned int i = 0; i < n; ++i)
199 values[i] = (values[i] - aux[i]) /
h;
202 for (
unsigned int i = 0; i < n; ++i)
203 paux[i] = points[i] - 2 *
incr[(variable_direction) ? i : 0U];
204 f.value_list(paux, values, component);
205 for (
unsigned int i = 0; i < n; ++i)
206 paux[i] = points[i] + 2 *
incr[(variable_direction) ? i : 0U];
207 f.value_list(paux, aux, component);
208 for (
unsigned int i = 0; i < n; ++i)
210 for (
unsigned int i = 0; i < n; ++i)
211 paux[i] = points[i] +
incr[(variable_direction) ? i : 0U];
212 f.value_list(paux, aux, component);
213 for (
unsigned int i = 0; i < n; ++i)
214 values[i] += 8. * aux[i];
215 for (
unsigned int i = 0; i < n; ++i)
216 paux[i] = points[i] -
incr[(variable_direction) ? i : 0U];
217 f.value_list(paux, aux, component);
218 for (
unsigned int i = 0; i < n; ++i)
219 values[i] = (values[i] - 8. * aux[i]) / (12 *
h);