]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Update the way we use DataPostprocessor in the two-phase-flow code gallery. 38/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 11 Mar 2018 06:40:43 +0000 (23:40 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 11 Mar 2018 06:40:43 +0000 (23:40 -0700)
two_phase_flow/utilities.cc

index ea100b8e0ff9ef1f7c5bf250c76871ad9274ea3a..fc27763ddbf1ffc6d55369a3a567d351beada5de 100644 (file)
@@ -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<dim> &input_data,
+                         std::vector<Vector<double> >               &computed_quantities) const;
+
   double eps;
   double rho_air;
   double rho_fluid;
 };
+
+
 template <int dim>
-void Postprocessor<dim>::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<dim>::
+evaluate_scalar_field (const DataPostprocessorInputs::Scalar<dim> &input_data,
+                       std::vector<Vector<double> >               &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<n_quadrature_points; ++q)
     {
       double H;
       double rho_value;
-      double phi_value=uh[q];
+      double phi_value=input_data.solution_values[q];
       if(phi_value > eps) 
        H=1;
       else if (phi_value < -eps) 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.