From: Wolfgang Bangerth Date: Mon, 17 Apr 2017 01:54:16 +0000 (-0600) Subject: Convert two tests to a new interface. X-Git-Tag: v9.0.0-rc1~1680^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95ab3078d7ca661006db7fb19301c66f415a2664;p=dealii.git Convert two tests to a new interface. --- diff --git a/tests/numerics/point_value_history_02.cc b/tests/numerics/point_value_history_02.cc index a1640518ea..1ab27f3b07 100644 --- a/tests/numerics/point_value_history_02.cc +++ b/tests/numerics/point_value_history_02.cc @@ -58,23 +58,12 @@ template class Postprocess : public DataPostprocessor { public: - - void compute_derived_quantities_vector ( - const std::vector< Vector< double > > &, - const std::vector< std::vector< Tensor< 1, dim > > > &, - const std::vector< std::vector< Tensor< 2, dim > > > &, - const std::vector< Point< dim > > &, - const std::vector< Point< dim > > &, - std::vector< Vector< double > > & - ) const; + void evaluate_vector_field (const DataPostprocessorInputs::Vector &inputs, + std::vector > &computed_quantities) const; std::vector get_names () const; UpdateFlags get_needed_update_flags () const; unsigned int n_output_variables () const; - // The following function is not required - // by the point_value_history class. - //std::vector - // get_data_component_interpretation () const; }; template @@ -106,28 +95,23 @@ Postprocess::n_output_variables () const template void -Postprocess::compute_derived_quantities_vector ( - const std::vector< Vector< double > > &solution_values, - const std::vector< std::vector< Tensor< 1, dim > > > &solution_gradients, - const std::vector< std::vector< Tensor< 2, dim > > > &solution_hessians, - const std::vector< Point< dim > > & /* normals */, - const std::vector< Point< dim > > & /* locations */, - std::vector< Vector< double > > &computed_quantities -) const +Postprocess::evaluate_vector_field (const DataPostprocessorInputs::Vector &inputs, + std::vector > &computed_quantities) const { - Assert(computed_quantities.size() == solution_values.size(), - ExcDimensionMismatch (computed_quantities.size(), solution_values.size())); + Assert(computed_quantities.size() == inputs.solution_values.size(), + ExcDimensionMismatch (computed_quantities.size(), inputs.solution_values.size())); for (unsigned int i=0; i class Postprocess : public DataPostprocessor { public: - - void compute_derived_quantities_scalar ( - const std::vector< double > &, - const std::vector< Tensor< 1, dim > > &, - const std::vector< Tensor< 2, dim > > &, - const std::vector< Point< dim > > &, - const std::vector< Point< dim > > &, - std::vector< Vector< double > > & - ) const; + void evaluate_scalar_field (const DataPostprocessorInputs::Scalar &inputs, + std::vector > &computed_quantities) const; std::vector get_names () const; UpdateFlags get_needed_update_flags () const; unsigned int n_output_variables () const; - // The following function is not required - // by the point_value_history class. - //std::vector - // get_data_component_interpretation () const; }; template @@ -104,25 +93,19 @@ Postprocess::n_output_variables () const template void -Postprocess::compute_derived_quantities_scalar ( - const std::vector< double > &solution_values, - const std::vector< Tensor< 1, dim > > &solution_gradients, - const std::vector< Tensor< 2, dim > > &solution_hessians, - const std::vector< Point< dim > > & /* normals */, - const std::vector< Point< dim > > & /* locations */, - std::vector< Vector< double > > &computed_quantities -) const +Postprocess::evaluate_scalar_field (const DataPostprocessorInputs::Scalar &inputs, + std::vector > &computed_quantities) const { - Assert(computed_quantities.size() == solution_values.size(), - ExcDimensionMismatch (computed_quantities.size(), solution_values.size())); + Assert(computed_quantities.size() == inputs.solution_values.size(), + ExcDimensionMismatch (computed_quantities.size(), inputs.solution_values.size())); for (unsigned int i=0; i