]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove the last hold-outs of the term second_derivatives
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Sep 2007 23:52:22 +0000 (23:52 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Sep 2007 23:52:22 +0000 (23:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@15212 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/data_out.h
deal.II/deal.II/source/numerics/data_out.cc
deal.II/deal.II/source/numerics/data_out_faces.cc
deal.II/deal.II/source/numerics/data_out_rotation.cc

index c7a9d4515e2392d51036859f5a4606c4910234a9..9a9cf15b412f47e760351867c9aac885ddcb3223 100644 (file)
@@ -636,8 +636,8 @@ class DataOut_DoFData : public DataOutInterface<patch_dim,patch_space_dim>
                                           */
         virtual
         void
-        get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
-                                        std::vector<Tensor<2,DH::dimension> >       &patch_hessians) const = 0;
+        get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+                              std::vector<Tensor<2,DH::dimension> >       &patch_hessians) const = 0;
         
                                          /**
                                           * Given a FEValuesBase object, extract
@@ -649,8 +649,8 @@ class DataOut_DoFData : public DataOutInterface<patch_dim,patch_space_dim>
                                           */
         virtual
         void
-        get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
-                                        std::vector<std::vector< Tensor<2,DH::dimension> > > &patch_hessians_system) const = 0;
+        get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+                              std::vector<std::vector< Tensor<2,DH::dimension> > > &patch_hessians_system) const = 0;
 
                                          /**
                                           * Clear all references to the
@@ -778,8 +778,8 @@ class DataOut_DoFData : public DataOutInterface<patch_dim,patch_space_dim>
                                           */
         virtual
         void
-        get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
-                                        std::vector<Tensor<2,DH::dimension> >       &patch_hessians) const;
+        get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+                              std::vector<Tensor<2,DH::dimension> >       &patch_hessians) const;
         
                                          /**
                                           * Given a FEValuesBase object, extract
@@ -791,8 +791,8 @@ class DataOut_DoFData : public DataOutInterface<patch_dim,patch_space_dim>
                                           */
         virtual
         void
-        get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
-                                        std::vector<std::vector< Tensor<2,DH::dimension> > > &patch_hessians_system) const;
+        get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+                              std::vector<std::vector< Tensor<2,DH::dimension> > > &patch_hessians_system) const;
 
                                          /**
                                           * Clear all references to the
index d51968fadbca730cfcd796d42ae397f32a7589b8..5291a4263060652baedc9075717e6549f33c1cc6 100644 (file)
@@ -142,8 +142,8 @@ template <typename VectorType>
 void
 DataOut_DoFData<DH,patch_dim,patch_space_dim>::
 DataEntry<VectorType>::
-get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
-                                std::vector<std::vector<Tensor<2,DH::dimension> > >   &patch_hessians_system) const
+get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+                      std::vector<std::vector<Tensor<2,DH::dimension> > >   &patch_hessians_system) const
 {
   fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians_system);
 }
@@ -156,8 +156,8 @@ template <typename VectorType>
 void
 DataOut_DoFData<DH,patch_dim,patch_space_dim>::
 DataEntry<VectorType>::
-get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
-                                std::vector<Tensor<2,DH::dimension> >       &patch_hessians) const
+get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+                      std::vector<Tensor<2,DH::dimension> >       &patch_hessians) const
 {
   fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians);
 }
@@ -614,8 +614,8 @@ void DataOut<dim,DH>::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<dim,DH>::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<dim,DH>::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; q<n_q_points; ++q)
+                     patch->data(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; component<data.n_components;
+                        ++component)
                      for (unsigned int q=0; q<n_q_points; ++q)
-                       patch->data(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; component<data.n_components;
-                          ++component)
-                       for (unsigned int q=0; q<n_q_points; ++q)
-                         patch->data(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<dim,DH>::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
index 5d132298007a676a2ba23ad188c643fc8251f3c2..759f623e014568744aae2496dd34ad415cc6e977 100644 (file)
@@ -129,8 +129,8 @@ void DataOutFaces<dim,DH>::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<dim,DH>::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<dim,DH>::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; q<n_q_points; ++q)
+                     patch->data(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; component<data.n_components;
+                        ++component)
                      for (unsigned int q=0; q<n_q_points; ++q)
-                       patch->data(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; component<data.n_components;
-                          ++component)
-                       for (unsigned int q=0; q<n_q_points; ++q)
-                         patch->data(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<dim,DH>::build_patches (const unsigned int nnnn_subdivisions,
       threads.join_all();
     }
   else
-                                  // just one thread
+                                    // just one thread
     build_some_patches(thread_data[0]);
 }
 
index 1a488bae324e91302ea284bf4a79199a0d4d34a4..8522216cfaa3e3d5c2bfd8b8c70ee4c924df11b5 100644 (file)
@@ -75,7 +75,7 @@ void DataOutRotation<dim,DH>::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<DH::dimension> 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<dim,DH>::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<dim,DH>::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<dim,DH>::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<dim,DH>::build_some_patches (Data &data)
                      for (unsigned int component=0;
                           component<this->dof_data[dataset]->n_output_variables;
                           ++component)
-                         {
-                           switch (DH::dimension)
-                             {
-                               case 1:
-                                     for (unsigned int x=0; x<n_points; ++x)
-                                       for (unsigned int y=0; y<n_points; ++y)
-                                         patch->data(offset+component,
-                                                     x*n_points + y)
-                                           = data.postprocessed_values[dataset][x](component);
-                                     break;
+                       {
+                         switch (DH::dimension)
+                           {
+                             case 1:
+                                   for (unsigned int x=0; x<n_points; ++x)
+                                     for (unsigned int y=0; y<n_points; ++y)
+                                       patch->data(offset+component,
+                                                   x*n_points + y)
+                                         = data.postprocessed_values[dataset][x](component);
+                                   break;
                                      
-                               case 2:
-                                     for (unsigned int x=0; x<n_points; ++x)
-                                       for (unsigned int y=0; y<n_points; ++y)
-                                         for (unsigned int z=0; z<n_points; ++z)
-                                           patch->data(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; x<n_points; ++x)
+                                     for (unsigned int y=0; y<n_points; ++y)
+                                       for (unsigned int z=0; z<n_points; ++z)
+                                         patch->data(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)

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.