]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Expand on certain FIXMEs.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 9 May 2015 03:44:57 +0000 (22:44 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 9 May 2015 03:44:57 +0000 (22:44 -0500)
source/numerics/data_out_dof_data.cc

index dfdb6cf8cfc0d00c3a94c7467c7684b1fcf5256c..bb5bb5c8c9f0a6ad2ff3f5efd348ff8d4c46dcf9 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1999 - 2014 by the deal.II authors
+// Copyright (C) 1999 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -545,11 +545,21 @@ namespace internal
     get_function_values (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
                          std::vector<dealii::Vector<double> >    &patch_values_system) const
     {
-      //FIXME
+      // FIXME: FEValuesBase gives us data in types that match that of
+      // the solution vector. but this function needs to pass it back
+      // up as 'double' vectors. this requires the use of a temporary
+      // variable here
+      //
+      // the correct thing would be to also use the correct data type
+      // upstream somewhere, but this is complicated because we hide
+      // the actual data type from upstream. rather, we should at
+      // least make sure we can deal with complex numbers
       std::vector<dealii::Vector<typename VectorType::value_type> > tmp(patch_values_system.size());
       for (unsigned int i = 0; i < patch_values_system.size(); i++)
         tmp[i].reinit(patch_values_system[i]);
+
       fe_patch_values.get_function_values (*vector, tmp);
+
       for (unsigned int i = 0; i < patch_values_system.size(); i++)
         patch_values_system[i] = tmp[i];
     }
@@ -562,9 +572,19 @@ namespace internal
     get_function_values (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
                          std::vector<double>             &patch_values) const
     {
-      //FIXME
+      // FIXME: FEValuesBase gives us data in types that match that of
+      // the solution vector. but this function needs to pass it back
+      // up as 'double' vectors. this requires the use of a temporary
+      // variable here
+      //
+      // the correct thing would be to also use the correct data type
+      // upstream somewhere, but this is complicated because we hide
+      // the actual data type from upstream. rather, we should at
+      // least make sure we can deal with complex numbers
       std::vector<typename VectorType::value_type> tmp (patch_values.size());
+
       fe_patch_values.get_function_values (*vector, tmp);
+
       for (unsigned int i = 0; i < tmp.size(); i++)
         patch_values[i] = tmp[i];
     }
@@ -577,11 +597,21 @@ namespace internal
     get_function_gradients (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
                             std::vector<std::vector<Tensor<1,DH::space_dimension> > >   &patch_gradients_system) const
     {
-      //FIXME
+      // FIXME: FEValuesBase gives us data in types that match that of
+      // the solution vector. but this function needs to pass it back
+      // up as 'double' vectors. this requires the use of a temporary
+      // variable here
+      //
+      // the correct thing would be to also use the correct data type
+      // upstream somewhere, but this is complicated because we hide
+      // the actual data type from upstream. rather, we should at
+      // least make sure we can deal with complex numbers
       std::vector<std::vector<Tensor<1,DH::space_dimension,typename VectorType::value_type> > > tmp(patch_gradients_system.size());
       for (unsigned int i = 0; i < tmp.size(); i++)
         tmp[i].resize(patch_gradients_system.size());
+
       fe_patch_values.get_function_gradients (*vector, tmp);
+
       for (unsigned int i = 0; i < tmp.size(); i++)
         for (unsigned int j = 0; j < tmp[i].size(); j++)
           patch_gradients_system[i][j] = tmp[i][j];
@@ -595,10 +625,20 @@ namespace internal
     get_function_gradients (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
                             std::vector<Tensor<1,DH::space_dimension> >       &patch_gradients) const
     {
-      //FIXME
+      // FIXME: FEValuesBase gives us data in types that match that of
+      // the solution vector. but this function needs to pass it back
+      // up as 'double' vectors. this requires the use of a temporary
+      // variable here
+      //
+      // the correct thing would be to also use the correct data type
+      // upstream somewhere, but this is complicated because we hide
+      // the actual data type from upstream. rather, we should at
+      // least make sure we can deal with complex numbers
       std::vector<Tensor<1,DH::space_dimension,typename VectorType::value_type> >  tmp;
       tmp.resize(patch_gradients.size());
+
       fe_patch_values.get_function_gradients (*vector, tmp);
+
       for (unsigned int i = 0; i < tmp.size(); i++)
         patch_gradients[i] = tmp[i];
     }
@@ -611,11 +651,21 @@ namespace internal
     get_function_hessians (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
                            std::vector<std::vector<Tensor<2,DH::space_dimension> > >   &patch_hessians_system) const
     {
-      // FIXME
+      // FIXME: FEValuesBase gives us data in types that match that of
+      // the solution vector. but this function needs to pass it back
+      // up as 'double' vectors. this requires the use of a temporary
+      // variable here
+      //
+      // the correct thing would be to also use the correct data type
+      // upstream somewhere, but this is complicated because we hide
+      // the actual data type from upstream. rather, we should at
+      // least make sure we can deal with complex numbers
       std::vector<std::vector<Tensor<2,DH::space_dimension,typename VectorType::value_type> > > tmp(patch_hessians_system.size());
       for (unsigned int i = 0; i < tmp.size(); i++)
         tmp[i].resize(patch_hessians_system[i].size());
+
       fe_patch_values.get_function_hessians (*vector, tmp);
+
       for (unsigned int i = 0; i < tmp.size(); i++)
         for (unsigned int j = 0; j < tmp[i].size(); j++)
           patch_hessians_system[i][j] = tmp[i][j];
@@ -629,9 +679,19 @@ namespace internal
     get_function_hessians (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
                            std::vector<Tensor<2,DH::space_dimension> >       &patch_hessians) const
     {
-      // FIXME
+      // FIXME: FEValuesBase gives us data in types that match that of
+      // the solution vector. but this function needs to pass it back
+      // up as 'double' vectors. this requires the use of a temporary
+      // variable here
+      //
+      // the correct thing would be to also use the correct data type
+      // upstream somewhere, but this is complicated because we hide
+      // the actual data type from upstream. rather, we should at
+      // least make sure we can deal with complex numbers
       std::vector<Tensor<2,DH::space_dimension,typename VectorType::value_type> > tmp(patch_hessians.size());
+
       fe_patch_values.get_function_hessians (*vector, tmp);
+
       for (unsigned int i = 0; i < tmp.size(); i++)
         patch_hessians[i] = tmp[i];
     }

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.