From fb6b651ca3c80f98e43dd268d6a890fbd18e494b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 10 Mar 2018 23:40:43 -0700 Subject: [PATCH] Update the way we use DataPostprocessor in the two-phase-flow code gallery. --- two_phase_flow/utilities.cc | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/two_phase_flow/utilities.cc b/two_phase_flow/utilities.cc index ea100b8..fc27763 100644 --- a/two_phase_flow/utilities.cc +++ b/two_phase_flow/utilities.cc @@ -136,31 +136,30 @@ public: this->rho_air=rho_air; this->rho_fluid=rho_fluid; } - virtual void compute_derived_quantities_scalar (const std::vector< double > &uh, - const std::vector< Tensor< 1, dim > > &duh, - const std::vector< Tensor< 2, dim > > &dduh, - const std::vector< Point< dim > > &normals, - const std::vector< Point< dim > > &evaluation_points, - std::vector< Vector< double > > &computed_quantities - ) const; + + virtual + void + evaluate_scalar_field (const DataPostprocessorInputs::Scalar &input_data, + std::vector > &computed_quantities) const; + double eps; double rho_air; double rho_fluid; }; + + template -void Postprocessor::compute_derived_quantities_scalar(const std::vector< double > &uh, - const std::vector< Tensor< 1, dim > > & /*duh*/, - const std::vector< Tensor< 2, dim > > & /*dduh*/, - const std::vector< Point< dim > > & /*normals*/, - const std::vector< Point< dim > > & /*evaluation_points*/, - std::vector< Vector< double > > &computed_quantities) const +void +Postprocessor:: +evaluate_scalar_field (const DataPostprocessorInputs::Scalar &input_data, + std::vector > &computed_quantities) const { - const unsigned int n_quadrature_points = uh.size(); + const unsigned int n_quadrature_points = input_data.solution_values.size(); for (unsigned int q=0; q eps) H=1; else if (phi_value < -eps) -- 2.39.5