From: Wolfgang Bangerth Date: Thu, 13 Sep 2007 23:52:22 +0000 (+0000) Subject: Remove the last hold-outs of the term second_derivatives X-Git-Tag: v8.0.0~9846 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61a938a854d4347230855160c7dc112fd4008c51;p=dealii.git Remove the last hold-outs of the term second_derivatives git-svn-id: https://svn.dealii.org/trunk@15212 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/data_out.h b/deal.II/deal.II/include/numerics/data_out.h index c7a9d4515e..9a9cf15b41 100644 --- a/deal.II/deal.II/include/numerics/data_out.h +++ b/deal.II/deal.II/include/numerics/data_out.h @@ -636,8 +636,8 @@ class DataOut_DoFData : public DataOutInterface */ virtual void - get_function_second_derivatives (const FEValuesBase &fe_patch_values, - std::vector > &patch_hessians) const = 0; + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > &patch_hessians) const = 0; /** * Given a FEValuesBase object, extract @@ -649,8 +649,8 @@ class DataOut_DoFData : public DataOutInterface */ virtual void - get_function_second_derivatives (const FEValuesBase &fe_patch_values, - std::vector > > &patch_hessians_system) const = 0; + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > > &patch_hessians_system) const = 0; /** * Clear all references to the @@ -778,8 +778,8 @@ class DataOut_DoFData : public DataOutInterface */ virtual void - get_function_second_derivatives (const FEValuesBase &fe_patch_values, - std::vector > &patch_hessians) const; + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > &patch_hessians) const; /** * Given a FEValuesBase object, extract @@ -791,8 +791,8 @@ class DataOut_DoFData : public DataOutInterface */ virtual void - get_function_second_derivatives (const FEValuesBase &fe_patch_values, - std::vector > > &patch_hessians_system) const; + get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > > &patch_hessians_system) const; /** * Clear all references to the diff --git a/deal.II/deal.II/source/numerics/data_out.cc b/deal.II/deal.II/source/numerics/data_out.cc index d51968fadb..5291a42630 100644 --- a/deal.II/deal.II/source/numerics/data_out.cc +++ b/deal.II/deal.II/source/numerics/data_out.cc @@ -142,8 +142,8 @@ template void DataOut_DoFData:: DataEntry:: -get_function_second_derivatives (const FEValuesBase &fe_patch_values, - std::vector > > &patch_hessians_system) const +get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > > &patch_hessians_system) const { fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians_system); } @@ -156,8 +156,8 @@ template void DataOut_DoFData:: DataEntry:: -get_function_second_derivatives (const FEValuesBase &fe_patch_values, - std::vector > &patch_hessians) const +get_function_hessians (const FEValuesBase &fe_patch_values, + std::vector > &patch_hessians) const { fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians); } @@ -614,8 +614,8 @@ void DataOut::build_some_patches (Data &data) this->dof_data[dataset]->get_function_gradients (fe_patch_values, data.patch_gradients); if (update_flags & update_hessians) - this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, - data.patch_hessians); + this->dof_data[dataset]->get_function_hessians (fe_patch_values, + data.patch_hessians); postprocessor-> compute_derived_quantities_scalar(data.patch_values, data.patch_gradients, @@ -636,8 +636,8 @@ void DataOut::build_some_patches (Data &data) this->dof_data[dataset]->get_function_gradients (fe_patch_values, data.patch_gradients_system); if (update_flags & update_hessians) - this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, - data.patch_hessians_system); + this->dof_data[dataset]->get_function_hessians (fe_patch_values, + data.patch_hessians_system); postprocessor-> compute_derived_quantities_vector(data.patch_values_system, data.patch_gradients_system, @@ -657,23 +657,23 @@ void DataOut::build_some_patches (Data &data) // treat single component // functions separately for // efficiency reasons. - if (data.n_components == 1) - { - this->dof_data[dataset]->get_function_values (fe_patch_values, - data.patch_values); + if (data.n_components == 1) + { + this->dof_data[dataset]->get_function_values (fe_patch_values, + data.patch_values); + for (unsigned int q=0; qdata(offset,q) = data.patch_values[q]; + } + else + { + this->dof_data[dataset]->get_function_values (fe_patch_values, + data.patch_values_system); + for (unsigned int component=0; componentdata(offset,q) = data.patch_values[q]; - } - else - { - this->dof_data[dataset]->get_function_values (fe_patch_values, - data.patch_values_system); - for (unsigned int component=0; componentdata(offset+component,q) = - data.patch_values_system[q](component); - } + patch->data(offset+component,q) = + data.patch_values_system[q](component); + } // increment the counter for the // actual data record offset+=this->dof_data[dataset]->n_output_variables; @@ -752,7 +752,7 @@ void DataOut::build_some_patches (Data &data) // patch number and set it // for the neighbor index patch->neighbors[f] = this->patches[(*data.cell_to_patch_index_map) - [neighbor->level()][neighbor->index()]].patch_index; + [neighbor->level()][neighbor->index()]].patch_index; } // next cell (patch) in this diff --git a/deal.II/deal.II/source/numerics/data_out_faces.cc b/deal.II/deal.II/source/numerics/data_out_faces.cc index 5d13229800..759f623e01 100644 --- a/deal.II/deal.II/source/numerics/data_out_faces.cc +++ b/deal.II/deal.II/source/numerics/data_out_faces.cc @@ -129,8 +129,8 @@ void DataOutFaces::build_some_patches (Data &data) this->dof_data[dataset]->get_function_gradients (fe_patch_values, data.patch_gradients); if (update_flags & update_hessians) - this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, - data.patch_hessians); + this->dof_data[dataset]->get_function_hessians (fe_patch_values, + data.patch_hessians); postprocessor-> compute_derived_quantities_scalar(data.patch_values, data.patch_gradients, @@ -151,8 +151,8 @@ void DataOutFaces::build_some_patches (Data &data) this->dof_data[dataset]->get_function_gradients (fe_patch_values, data.patch_gradients_system); if (update_flags & update_hessians) - this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, - data.patch_hessians_system); + this->dof_data[dataset]->get_function_hessians (fe_patch_values, + data.patch_hessians_system); postprocessor-> compute_derived_quantities_vector(data.patch_values_system, data.patch_gradients_system, @@ -172,23 +172,23 @@ void DataOutFaces::build_some_patches (Data &data) // treat single component // functions separately for // efficiency reasons. - if (data.n_components == 1) - { - this->dof_data[dataset]->get_function_values (fe_patch_values, - data.patch_values); + if (data.n_components == 1) + { + this->dof_data[dataset]->get_function_values (fe_patch_values, + data.patch_values); + for (unsigned int q=0; qdata(offset,q) = data.patch_values[q]; + } + else + { + this->dof_data[dataset]->get_function_values (fe_patch_values, + data.patch_values_system); + for (unsigned int component=0; componentdata(offset,q) = data.patch_values[q]; - } - else - { - this->dof_data[dataset]->get_function_values (fe_patch_values, - data.patch_values_system); - for (unsigned int component=0; componentdata(offset+component,q) = - data.patch_values_system[q](component); - } + patch->data(offset+component,q) = + data.patch_values_system[q](component); + } // increment the counter for the // actual data record offset+=this->dof_data[dataset]->n_output_variables; @@ -327,7 +327,7 @@ void DataOutFaces::build_patches (const unsigned int nnnn_subdivisions, threads.join_all(); } else - // just one thread + // just one thread build_some_patches(thread_data[0]); } diff --git a/deal.II/deal.II/source/numerics/data_out_rotation.cc b/deal.II/deal.II/source/numerics/data_out_rotation.cc index 1a488bae32..8522216cfa 100644 --- a/deal.II/deal.II/source/numerics/data_out_rotation.cc +++ b/deal.II/deal.II/source/numerics/data_out_rotation.cc @@ -75,7 +75,7 @@ void DataOutRotation::build_some_patches (Data &data) ExcMessage("The update of normal vectors may not be requested for evaluation of data on cells via DataPostprocessor.")); hp::FEValues x_fe_patch_values (fe_collection, q_collection, - update_flags); + update_flags); const unsigned int n_patches_per_circle = data.n_patches_per_circle; @@ -97,9 +97,9 @@ void DataOutRotation::build_some_patches (Data &data) for (unsigned int i=0; i<=n_patches_per_circle; ++i) { angle_directions[i][DH::dimension-1] = std::cos(2*deal_II_numbers::PI * - i/n_patches_per_circle); + i/n_patches_per_circle); angle_directions[i][DH::dimension] = std::sin(2*deal_II_numbers::PI * - i/n_patches_per_circle); + i/n_patches_per_circle); }; @@ -213,8 +213,8 @@ void DataOutRotation::build_some_patches (Data &data) this->dof_data[dataset]->get_function_gradients (fe_patch_values, data.patch_gradients); if (update_flags & update_hessians) - this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, - data.patch_hessians); + this->dof_data[dataset]->get_function_hessians (fe_patch_values, + data.patch_hessians); postprocessor-> compute_derived_quantities_scalar(data.patch_values, data.patch_gradients, @@ -235,8 +235,8 @@ void DataOutRotation::build_some_patches (Data &data) this->dof_data[dataset]->get_function_gradients (fe_patch_values, data.patch_gradients_system); if (update_flags & update_hessians) - this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values, - data.patch_hessians_system); + this->dof_data[dataset]->get_function_hessians (fe_patch_values, + data.patch_hessians_system); postprocessor-> compute_derived_quantities_vector(data.patch_values_system, data.patch_gradients_system, @@ -248,32 +248,32 @@ void DataOutRotation::build_some_patches (Data &data) for (unsigned int component=0; componentdof_data[dataset]->n_output_variables; ++component) - { - switch (DH::dimension) - { - case 1: - for (unsigned int x=0; xdata(offset+component, - x*n_points + y) - = data.postprocessed_values[dataset][x](component); - break; + { + switch (DH::dimension) + { + case 1: + for (unsigned int x=0; xdata(offset+component, + x*n_points + y) + = data.postprocessed_values[dataset][x](component); + break; - case 2: - for (unsigned int x=0; xdata(offset+component, - x*n_points*n_points + - y*n_points + - z) - = data.postprocessed_values[dataset][x*n_points+z](component); - break; + case 2: + for (unsigned int x=0; xdata(offset+component, + x*n_points*n_points + + y*n_points + + z) + = data.postprocessed_values[dataset][x*n_points+z](component); + break; - default: - Assert (false, ExcNotImplemented()); - } - } + default: + Assert (false, ExcNotImplemented()); + } + } } else if (data.n_components == 1)