167 std::vector<double> &values,
168 const unsigned int component)
const
170 const unsigned int n = points.size();
171 const bool variable_direction = (
incr.size() == 1) ? false :
true;
172 if (variable_direction)
177 std::vector<double> aux(n);
179 std::vector<Point<dim>> paux(n);
186 for (
unsigned int i = 0; i < n; ++i)
187 paux[i] = points[i] +
incr[(variable_direction) ? i : 0U];
188 f.value_list(paux, values, component);
189 for (
unsigned int i = 0; i < n; ++i)
190 paux[i] = points[i] -
incr[(variable_direction) ? i : 0U];
191 f.value_list(paux, aux, component);
192 for (
unsigned int i = 0; i < n; ++i)
193 values[i] = (values[i] - aux[i]) / (2 *
h);
196 f.value_list(points, values, component);
197 for (
unsigned int i = 0; i < n; ++i)
198 paux[i] = points[i] -
incr[(variable_direction) ? i : 0U];
199 f.value_list(paux, aux, component);
200 for (
unsigned int i = 0; i < n; ++i)
201 values[i] = (values[i] - aux[i]) /
h;
204 for (
unsigned int i = 0; i < n; ++i)
205 paux[i] = points[i] - 2 *
incr[(variable_direction) ? i : 0U];
206 f.value_list(paux, values, component);
207 for (
unsigned int i = 0; i < n; ++i)
208 paux[i] = points[i] + 2 *
incr[(variable_direction) ? i : 0U];
209 f.value_list(paux, aux, component);
210 for (
unsigned int i = 0; i < n; ++i)
212 for (
unsigned int i = 0; i < n; ++i)
213 paux[i] = points[i] +
incr[(variable_direction) ? i : 0U];
214 f.value_list(paux, aux, component);
215 for (
unsigned int i = 0; i < n; ++i)
216 values[i] += 8. * aux[i];
217 for (
unsigned int i = 0; i < n; ++i)
218 paux[i] = points[i] -
incr[(variable_direction) ? i : 0U];
219 f.value_list(paux, aux, component);
220 for (
unsigned int i = 0; i < n; ++i)
221 values[i] = (values[i] - 8. * aux[i]) / (12 *
h);