]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Indent a block properly. 8694/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 4 Sep 2019 00:11:03 +0000 (18:11 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 4 Sep 2019 00:11:03 +0000 (18:11 -0600)
source/numerics/data_out.cc

index 4b3857f942f77117eae425891eff5b0e57908503..ac12a40afdb8a38204bfd9a854f52b56128e58c1 100644 (file)
@@ -254,65 +254,69 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                     scratch_data.postprocessed_values[dataset][q](component);
             }
           else
-            // use the given data vector directly, without a postprocessor.
-            // again, we treat single component functions separately for
-            // efficiency reasons.
-            if (n_components == 1)
             {
-              // first output the real part of the solution vector
-              this->dof_data[dataset]->get_function_values(
-                this_fe_patch_values,
-                internal::DataOutImplementation::ComponentExtractor::real_part,
-                scratch_data.patch_values_scalar.solution_values);
-              for (unsigned int q = 0; q < n_q_points; ++q)
-                patch.data(offset, q) =
-                  scratch_data.patch_values_scalar.solution_values[q];
-
-              // and if there is one, also output the imaginary part
-              if (this->dof_data[dataset]->is_complex_valued() == true)
+              // use the given data vector directly, without a postprocessor.
+              // again, we treat single component functions separately for
+              // efficiency reasons.
+              if (n_components == 1)
                 {
+                  // first output the real part of the solution vector
                   this->dof_data[dataset]->get_function_values(
                     this_fe_patch_values,
                     internal::DataOutImplementation::ComponentExtractor::
-                      imaginary_part,
+                      real_part,
                     scratch_data.patch_values_scalar.solution_values);
                   for (unsigned int q = 0; q < n_q_points; ++q)
-                    patch.data(offset + 1, q) =
+                    patch.data(offset, q) =
                       scratch_data.patch_values_scalar.solution_values[q];
-                }
-            }
-          else
-            {
-              scratch_data.resize_system_vectors(n_components);
-
-              // same as above: first the real part
-              const unsigned int stride =
-                (this->dof_data[dataset]->is_complex_valued() ? 2 : 1);
-              this->dof_data[dataset]->get_function_values(
-                this_fe_patch_values,
-                internal::DataOutImplementation::ComponentExtractor::real_part,
-                scratch_data.patch_values_system.solution_values);
-              for (unsigned int component = 0; component < n_components;
-                   ++component)
-                for (unsigned int q = 0; q < n_q_points; ++q)
-                  patch.data(offset + component * stride, q) =
-                    scratch_data.patch_values_system.solution_values[q](
-                      component);
 
-              // and if there is one, also output the imaginary part
-              if (this->dof_data[dataset]->is_complex_valued() == true)
+                  // and if there is one, also output the imaginary part
+                  if (this->dof_data[dataset]->is_complex_valued() == true)
+                    {
+                      this->dof_data[dataset]->get_function_values(
+                        this_fe_patch_values,
+                        internal::DataOutImplementation::ComponentExtractor::
+                          imaginary_part,
+                        scratch_data.patch_values_scalar.solution_values);
+                      for (unsigned int q = 0; q < n_q_points; ++q)
+                        patch.data(offset + 1, q) =
+                          scratch_data.patch_values_scalar.solution_values[q];
+                    }
+                }
+              else
                 {
+                  scratch_data.resize_system_vectors(n_components);
+
+                  // same as above: first the real part
+                  const unsigned int stride =
+                    (this->dof_data[dataset]->is_complex_valued() ? 2 : 1);
                   this->dof_data[dataset]->get_function_values(
                     this_fe_patch_values,
                     internal::DataOutImplementation::ComponentExtractor::
-                      imaginary_part,
+                      real_part,
                     scratch_data.patch_values_system.solution_values);
                   for (unsigned int component = 0; component < n_components;
                        ++component)
                     for (unsigned int q = 0; q < n_q_points; ++q)
-                      patch.data(offset + component * stride + 1, q) =
+                      patch.data(offset + component * stride, q) =
                         scratch_data.patch_values_system.solution_values[q](
                           component);
+
+                  // and if there is one, also output the imaginary part
+                  if (this->dof_data[dataset]->is_complex_valued() == true)
+                    {
+                      this->dof_data[dataset]->get_function_values(
+                        this_fe_patch_values,
+                        internal::DataOutImplementation::ComponentExtractor::
+                          imaginary_part,
+                        scratch_data.patch_values_system.solution_values);
+                      for (unsigned int component = 0; component < n_components;
+                           ++component)
+                        for (unsigned int q = 0; q < n_q_points; ++q)
+                          patch.data(offset + component * stride + 1, q) =
+                            scratch_data.patch_values_system.solution_values[q](
+                              component);
+                    }
                 }
             }
 

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.