* DataPostprocessor has to live until @p build_patches has been
* called. DataOutFaces and DataOutRotation can be used as well.
*
- * In order not to perform needless calculations, DataPostprocessor has to
- * provide the information, which input data is needed for the calculation of
- * the derived quantities, i.e. whether it needs the values, the first
- * derivative and/or the second derivative of the provided
- * data. DataPostprocessor objects which are used in combination with a
- * DataOutFaces object can also ask for the normal vectors at each point. The
- * information, which data is needed has to be provided via the UpdateFlags
- * returned by the virtual function @p get_needed_update_flags. It is your
- * responsibility to use only those values which were updated in the calculation
- * of derived quantities. The DataOut object will provide references to the
- * requested data in the call to @p compute_derived_quantities.
+ * In order not to perform needless calculations, DataPostprocessor
+ * has to provide the information, which input data is needed for the
+ * calculation of the derived quantities, i.e. whether it needs the
+ * values, the first derivative and/or the second derivative of the
+ * provided data. DataPostprocessor objects which are used in
+ * combination with a DataOutFaces object can also ask for the normal
+ * vectors at each point. The information, which data is needed has to
+ * be provided via the UpdateFlags returned by the virtual function @p
+ * get_needed_update_flags. It is your responsibility to use only
+ * those values which were updated in the calculation of derived
+ * quantities. The DataOut object will provide references to the
+ * requested data in the call to compute_derived_quantities_scalar()
+ * or compute_derived_quantities_vector() (DataOut decides which of
+ * the two functions to call depending on whether the finite element
+ * in use has only a single, or multiple vector components).
*
* Furthermore, derived classes have to implement the @p get_names and @p
* n_output_variables functions, where the number of output variables returned
* empty vector when working on cells, not
* on faces.
*
- * This function is called, when the
- * original data vector is scalar valued.
+ * This function is called when
+ * the original data vector
+ * represents scalar data,
+ * i.e. the finite element in use
+ * has only a single vector
+ * component.
*/
- virtual void compute_derived_quantities (std::vector<Vector<double> > &computed_quantities,
- 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;
+ virtual
+ void
+ compute_derived_quantities_scalar (std::vector<Vector<double> > &computed_quantities,
+ 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;
+
/**
- * Same as above function, but this one is
- * called in case of vector-valued original
- * data.
+ * Same as above function, but
+ * this function is called when
+ * the original data vector
+ * represents vector data,
+ * i.e. the finite element in use
+ * has multiple vector
+ * components.
*/
- virtual void compute_derived_quantities (std::vector<Vector<double> > &computed_quantities,
- const std::vector<Vector<double> > &uh,
- const std::vector<std::vector<Tensor<1,dim> > > &duh,
- const std::vector<std::vector<Tensor<2,dim> > > &dduh,
- const std::vector<Point<dim> > &normals) const;
+ virtual
+ void
+ compute_derived_quantities_vector (std::vector<Vector<double> > &computed_quantities,
+ const std::vector<Vector<double> > &uh,
+ const std::vector<std::vector<Tensor<1,dim> > > &duh,
+ const std::vector<std::vector<Tensor<2,dim> > > &dduh,
+ const std::vector<Point<dim> > &normals) const;
/**
* Return the vector of strings describing
virtual UpdateFlags get_needed_update_flags () const=0;
/**
- * Number of postprocessed variables. Has
- * to match the number of entries filled by
- * @p compute_derived_quantities as well as
- * the size of the vector of names returned
- * by @p get_names.
+ * Number of postprocessed
+ * variables. Has to match the
+ * number of entries filled by
+ * compute_derived_quantities_scalar()
+ * or
+ * compute_derived_quantities_vector()
+ * as well as the size of the
+ * vector of names returned by
+ * get_names().
*/
virtual unsigned int n_output_variables() const=0;
{
const DataPostprocessor<dim> *postprocessor=this->dof_data[dataset]->postprocessor;
- if (postprocessor)
+ if (postprocessor != 0)
{
// we have to postprocess the
// data, so determine, which
if (update_flags & update_hessians)
this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
data.patch_second_derivatives);
- postprocessor->compute_derived_quantities(data.postprocessed_values[dataset],
- data.patch_values,
- data.patch_gradients,
- data.patch_second_derivatives,
- data.dummy_normals);
+ postprocessor->
+ compute_derived_quantities_scalar(data.postprocessed_values[dataset],
+ data.patch_values,
+ data.patch_gradients,
+ data.patch_second_derivatives,
+ data.dummy_normals);
}
else
{
if (update_flags & update_hessians)
this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
data.patch_second_derivatives_system);
- postprocessor->compute_derived_quantities(data.postprocessed_values[dataset],
- data.patch_values_system,
- data.patch_gradients_system,
- data.patch_second_derivatives_system,
- data.dummy_normals);
+ postprocessor->
+ compute_derived_quantities_vector(data.postprocessed_values[dataset],
+ data.patch_values_system,
+ data.patch_gradients_system,
+ data.patch_second_derivatives_system,
+ data.dummy_normals);
}
for (unsigned int q=0; q<n_q_points; ++q)
for (unsigned int dataset=0; dataset<this->dof_data.size(); ++dataset)
{
const DataPostprocessor<dim> *postprocessor=this->dof_data[dataset]->postprocessor;
- if (postprocessor)
+ if (postprocessor != 0)
{
// we have to postprocess the
// data, so determine, which
if (update_flags & update_hessians)
this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
data.patch_second_derivatives);
- postprocessor->compute_derived_quantities(data.postprocessed_values[dataset],
- data.patch_values,
- data.patch_gradients,
- data.patch_second_derivatives,
- data.patch_normals);
+ postprocessor->
+ compute_derived_quantities_scalar(data.postprocessed_values[dataset],
+ data.patch_values,
+ data.patch_gradients,
+ data.patch_second_derivatives,
+ data.patch_normals);
}
else
{
if (update_flags & update_hessians)
this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
data.patch_second_derivatives_system);
- postprocessor->compute_derived_quantities(data.postprocessed_values[dataset],
- data.patch_values_system,
- data.patch_gradients_system,
- data.patch_second_derivatives_system,
- data.patch_normals);
+ postprocessor->
+ compute_derived_quantities_vector(data.postprocessed_values[dataset],
+ data.patch_values_system,
+ data.patch_gradients_system,
+ data.patch_second_derivatives_system,
+ data.patch_normals);
}
for (unsigned int q=0; q<n_q_points; ++q)
for (unsigned int dataset=0; dataset<this->dof_data.size(); ++dataset)
{
const DataPostprocessor<dim> *postprocessor=this->dof_data[dataset]->postprocessor;
- if (postprocessor)
+ if (postprocessor != 0)
{
// we have to postprocess the
// data, so determine, which
if (update_flags & update_hessians)
this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
data.patch_second_derivatives);
- postprocessor->compute_derived_quantities(data.postprocessed_values[dataset],
- data.patch_values,
- data.patch_gradients,
- data.patch_second_derivatives,
- data.dummy_normals);
+ postprocessor->
+ compute_derived_quantities_scalar(data.postprocessed_values[dataset],
+ data.patch_values,
+ data.patch_gradients,
+ data.patch_second_derivatives,
+ data.dummy_normals);
}
else
{
if (update_flags & update_hessians)
this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
data.patch_second_derivatives_system);
- postprocessor->compute_derived_quantities(data.postprocessed_values[dataset],
- data.patch_values_system,
- data.patch_gradients_system,
- data.patch_second_derivatives_system,
- data.dummy_normals);
+ postprocessor->
+ compute_derived_quantities_vector(data.postprocessed_values[dataset],
+ data.patch_values_system,
+ data.patch_gradients_system,
+ data.patch_second_derivatives_system,
+ data.dummy_normals);
}
for (unsigned int component=0;
template <int dim>
void
-DataPostprocessor<dim>::compute_derived_quantities (std::vector<Vector<double> > &computed_quantities,
- 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
+DataPostprocessor<dim>::
+compute_derived_quantities_scalar (std::vector<Vector<double> > &computed_quantities,
+ 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
{
computed_quantities.clear();
AssertThrow(false,ExcPureFunctionCalled());
template <int dim>
void
-DataPostprocessor<dim>::compute_derived_quantities (std::vector<Vector<double> > &computed_quantities,
- const std::vector<Vector<double> > &/*uh*/,
- const std::vector<std::vector<Tensor<1,dim> > > &/*duh*/,
- const std::vector<std::vector<Tensor<2,dim> > > &/*dduh*/,
- const std::vector<Point<dim> > &/*normals*/) const
+DataPostprocessor<dim>::
+compute_derived_quantities_vector (std::vector<Vector<double> > &computed_quantities,
+ const std::vector<Vector<double> > &/*uh*/,
+ const std::vector<std::vector<Tensor<1,dim> > > &/*duh*/,
+ const std::vector<std::vector<Tensor<2,dim> > > &/*dduh*/,
+ const std::vector<Point<dim> > &/*normals*/) const
{
computed_quantities.clear();
AssertThrow(false,ExcPureFunctionCalled());
{
public:
- using DataPostprocessor<dim>::compute_derived_quantities;
-
- void compute_derived_quantities (
+ void compute_derived_quantities_vector (
std::vector< Vector< double > > &,
const std::vector< Vector< double > > &,
const std::vector< std::vector< Tensor< 1, dim > > > &,
template <int dim>
void
-Postprocessor<dim>::compute_derived_quantities (
+Postprocessor<dim>::compute_derived_quantities_vector (
std::vector< Vector< double > > &computed_quantities,
const std::vector< Vector< double > > &uh,
const std::vector< std::vector< Tensor< 1, dim > > > &/*duh*/,