From: Denis Davydov Date: Tue, 3 Feb 2015 10:44:49 +0000 (+0100) Subject: fixing derivative approximation X-Git-Tag: v8.3.0-rc1~184^2~22 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c31a922b02f2bb972e4f0d2a1cadcf513b07b4e;p=dealii.git fixing derivative approximation --- diff --git a/source/numerics/derivative_approximation.cc b/source/numerics/derivative_approximation.cc index 231f5d0ab6..05c97a418a 100644 --- a/source/numerics/derivative_approximation.cc +++ b/source/numerics/derivative_approximation.cc @@ -133,14 +133,14 @@ namespace DerivativeApproximation { if (fe_values.get_fe().n_components() == 1) { - std::vector values (1); + std::vector values (1); fe_values.get_function_values (solution, values); return values[0]; } else { - std::vector > values - (1, Vector(fe_values.get_fe().n_components())); + std::vector > values + (1, Vector(fe_values.get_fe().n_components())); fe_values.get_function_values (solution, values); return values[0](component); } @@ -249,16 +249,16 @@ namespace DerivativeApproximation { if (fe_values.get_fe().n_components() == 1) { - std::vector values (1); + std::vector> values (1); fe_values.get_function_gradients (solution, values); - return values[0]; + return ProjectedDerivative(values[0]); } else { - std::vector > values - (1, std::vector(fe_values.get_fe().n_components())); + std::vector> > values + (1, std::vector>(fe_values.get_fe().n_components())); fe_values.get_function_gradients (solution, values); - return values[0][component]; + return ProjectedDerivative(values[0][component]); }; } @@ -592,16 +592,16 @@ namespace DerivativeApproximation { if (fe_values.get_fe().n_components() == 1) { - std::vector values (1); + std::vector> values (1); fe_values.get_function_hessians (solution, values); - return values[0]; + return ProjectedDerivative(values[0]); } else { - std::vector > values - (1, std::vector(fe_values.get_fe().n_components())); + std::vector> > values + (1, std::vector>(fe_values.get_fe().n_components())); fe_values.get_function_hessians (solution, values); - return values[0][component]; + return ProjectedDerivative(values[0][component]); }; }