From: bangerth Date: Thu, 13 Sep 2007 23:40:09 +0000 (+0000) Subject: Adjust order of parameters such that the output parameter comes last. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9faa5dc83004dadcbe239ef1a86b8f2d16ad5658;p=dealii-svn.git Adjust order of parameters such that the output parameter comes last. git-svn-id: https://svn.dealii.org/trunk@15210 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/data_postprocessor.h b/deal.II/deal.II/include/numerics/data_postprocessor.h index 2f9e3c804e..27639bb569 100644 --- a/deal.II/deal.II/include/numerics/data_postprocessor.h +++ b/deal.II/deal.II/include/numerics/data_postprocessor.h @@ -28,11 +28,14 @@ DEAL_II_NAMESPACE_OPEN /** * For the (graphical) output of a FE solution one frequently wants to include - * derived quantities, which are calculated from the values of the solution and - * possibly the first and second derivates of the solution. This class offers - * the interface to perform such a postprocessing. Given the values and - * derivatives of provided dataon given points of a cell, new quantities can be - * calculated. + * derived quantities, which are calculated from the values of the solution + * and possibly the first and second derivates of the solution. Examples are + * the calculation Mach numbers from velocity and density in supersonic flow + * computations, or the computation of the magnitude of a complex-valued + * solution as demonstrated in @ref step_29 "step-29". This class offers the + * interface to perform such postprocessing. Given the values and derivatives + * of the solution at those points where we want to generated output, the + * functions of this class can be overloaded to compute new quantities. * * A data vector and an object of a derived class can be given to the * DataOut::add_data_vector function, which will write the derived @@ -77,7 +80,7 @@ class DataPostprocessor: public Subscriptor /** * This is the main function which actually - * performs the postprocessing. The first + * performs the postprocessing. The last * argument is a reference to the * postprocessed data which has correct * size already and must be filled by this @@ -104,11 +107,11 @@ class DataPostprocessor: public Subscriptor */ virtual void - compute_derived_quantities_scalar (std::vector > &computed_quantities, - const std::vector &uh, + compute_derived_quantities_scalar (const std::vector &uh, const std::vector > &duh, const std::vector > &dduh, - const std::vector > &normals) const; + const std::vector > &normals, + std::vector > &computed_quantities) const; /** * Same as above function, but @@ -121,11 +124,11 @@ class DataPostprocessor: public Subscriptor */ virtual void - compute_derived_quantities_vector (std::vector > &computed_quantities, - const std::vector > &uh, + compute_derived_quantities_vector (const std::vector > &uh, const std::vector > > &duh, const std::vector > > &dduh, - const std::vector > &normals) const; + const std::vector > &normals, + std::vector > &computed_quantities) const; /** * Return the vector of strings describing diff --git a/deal.II/deal.II/source/numerics/data_out.cc b/deal.II/deal.II/source/numerics/data_out.cc index 06af410fd3..2d6622b26c 100644 --- a/deal.II/deal.II/source/numerics/data_out.cc +++ b/deal.II/deal.II/source/numerics/data_out.cc @@ -617,11 +617,11 @@ void DataOut::build_some_patches (Data &data) this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, data.patch_second_derivatives); postprocessor-> - compute_derived_quantities_scalar(data.postprocessed_values[dataset], - data.patch_values, + compute_derived_quantities_scalar(data.patch_values, data.patch_gradients, data.patch_second_derivatives, - data.dummy_normals); + data.dummy_normals, + data.postprocessed_values[dataset]); } else { @@ -639,11 +639,11 @@ void DataOut::build_some_patches (Data &data) this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, data.patch_second_derivatives_system); postprocessor-> - compute_derived_quantities_vector(data.postprocessed_values[dataset], - data.patch_values_system, + compute_derived_quantities_vector(data.patch_values_system, data.patch_gradients_system, data.patch_second_derivatives_system, - data.dummy_normals); + data.dummy_normals, + data.postprocessed_values[dataset]); } for (unsigned int q=0; q::build_some_patches (Data &data) this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, data.patch_second_derivatives); postprocessor-> - compute_derived_quantities_scalar(data.postprocessed_values[dataset], - data.patch_values, + compute_derived_quantities_scalar(data.patch_values, data.patch_gradients, data.patch_second_derivatives, - data.patch_normals); + data.patch_normals, + data.postprocessed_values[dataset]); } else { @@ -154,11 +154,11 @@ void DataOutFaces::build_some_patches (Data &data) this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, data.patch_second_derivatives_system); postprocessor-> - compute_derived_quantities_vector(data.postprocessed_values[dataset], - data.patch_values_system, + compute_derived_quantities_vector(data.patch_values_system, data.patch_gradients_system, data.patch_second_derivatives_system, - data.patch_normals); + data.patch_normals, + data.postprocessed_values[dataset]); } for (unsigned int q=0; q::build_some_patches (Data &data) this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, data.patch_second_derivatives); postprocessor-> - compute_derived_quantities_scalar(data.postprocessed_values[dataset], - data.patch_values, + compute_derived_quantities_scalar(data.patch_values, data.patch_gradients, data.patch_second_derivatives, - data.dummy_normals); + data.dummy_normals, + data.postprocessed_values[dataset]); } else { @@ -238,11 +238,11 @@ void DataOutRotation::build_some_patches (Data &data) this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, data.patch_second_derivatives_system); postprocessor-> - compute_derived_quantities_vector(data.postprocessed_values[dataset], - data.patch_values_system, + compute_derived_quantities_vector(data.patch_values_system, data.patch_gradients_system, data.patch_second_derivatives_system, - data.dummy_normals); + data.dummy_normals, + data.postprocessed_values[dataset]); } for (unsigned int component=0; diff --git a/deal.II/deal.II/source/numerics/data_postprocessor.cc b/deal.II/deal.II/source/numerics/data_postprocessor.cc index d3e1190d99..61ea0bd6bb 100644 --- a/deal.II/deal.II/source/numerics/data_postprocessor.cc +++ b/deal.II/deal.II/source/numerics/data_postprocessor.cc @@ -24,11 +24,11 @@ DataPostprocessor::~DataPostprocessor() template void DataPostprocessor:: -compute_derived_quantities_scalar (std::vector > &computed_quantities, - const std::vector &/*uh*/, +compute_derived_quantities_scalar (const std::vector &/*uh*/, const std::vector > &/*duh*/, const std::vector > &/*dduh*/, - const std::vector > &/*normals*/) const + const std::vector > &/*normals*/, + std::vector > &computed_quantities) const { computed_quantities.clear(); AssertThrow(false,ExcPureFunctionCalled()); @@ -39,11 +39,11 @@ compute_derived_quantities_scalar (std::vector > &computed_q template void DataPostprocessor:: -compute_derived_quantities_vector (std::vector > &computed_quantities, - const std::vector > &/*uh*/, +compute_derived_quantities_vector (const std::vector > &/*uh*/, const std::vector > > &/*duh*/, const std::vector > > &/*dduh*/, - const std::vector > &/*normals*/) const + const std::vector > &/*normals*/, + std::vector > &computed_quantities) const { computed_quantities.clear(); AssertThrow(false,ExcPureFunctionCalled()); diff --git a/deal.II/examples/step-29/step-29.cc b/deal.II/examples/step-29/step-29.cc index 86ad0c2d76..7b9547486e 100644 --- a/deal.II/examples/step-29/step-29.cc +++ b/deal.II/examples/step-29/step-29.cc @@ -155,11 +155,11 @@ class Postprocessor : public DataPostprocessor public: void compute_derived_quantities_vector ( - std::vector< Vector< double > > &, 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; std::vector get_names () const; @@ -201,11 +201,11 @@ Postprocessor::n_output_variables () const template void Postprocessor::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 std::vector< Point< dim > > &/*normals*/, + std::vector< Vector< double > > &computed_quantities ) const { Assert(computed_quantities.size() == uh.size(),