]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Need to collect flags twice, see example in doc.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 26 Mar 2001 16:03:17 +0000 (16:03 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 26 Mar 2001 16:03:17 +0000 (16:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@4293 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_values.cc

index 091f6ff4cd11a9fba4314c42c7bbaa6a8ce7c3ac..5dc087bc7cc3c61cc401404746144e5be9c82201 100644 (file)
@@ -635,6 +635,29 @@ FEFaceValues<dim>::FEFaceValues (const Mapping<dim>       &mapping,
   mapping_data = mapping.get_face_data(flags, quadrature);
   fe_data      = fe.get_face_data(flags, mapping, quadrature);
 
+                                  // The get_face_data functions
+                                  // might have added an update flag.
+                                  // Therefore collect all flags
+                                  // again.
+                                  //
+                                  // E.g. if update_JxW_values is set
+                                  // the update_boundary_forms flag
+                                  // is added within the
+                                  // Mapping::get_face_data function.
+                                  // If also update_normal_vectors is
+                                  // set this update_boundary_forms
+                                  // flag was already set by the
+                                  // update_once or update_each
+                                  // function resulting in no change
+                                  // in flags below, but if
+                                  // update_normal_vectors is not set
+                                  // this actually makes a
+                                  // difference.
+  flags |= mapping_data->update_once
+          | mapping_data->update_each
+          | fe_data->update_once
+          | fe_data->update_each;
+  
                                   // set up objects within this class
   FEValuesData<dim>::initialize(n_quadrature_points,
                                dofs_per_cell,
@@ -673,7 +696,30 @@ FEFaceValues<dim>::FEFaceValues (const FiniteElement<dim> &fe,
                                   // calls to reinit
   mapping_data = mapping->get_face_data(flags, quadrature);
   fe_data      = fe.get_face_data(flags, *mapping, quadrature);
-
+  
+                                  // The get_face_data functions
+                                  // might have added an update flag.
+                                  // Therefore collect all flags
+                                  // again.
+                                  //
+                                  // E.g. if update_JxW_values is set
+                                  // the update_boundary_forms flag
+                                  // is added within the
+                                  // Mapping::get_face_data function.
+                                  // If also update_normal_vectors is
+                                  // set this update_boundary_forms
+                                  // flag was already set by the
+                                  // update_once or update_each
+                                  // function resulting in no change
+                                  // in flags below, but if
+                                  // update_normal_vectors is not set
+                                  // this actually makes a
+                                  // difference.
+  flags |= mapping_data->update_once
+          | mapping_data->update_each
+          | fe_data->update_once
+          | fe_data->update_each;
+  
                                   // set up objects within this class
   FEValuesData<dim>::initialize(n_quadrature_points,
                                dofs_per_cell,
@@ -752,6 +798,30 @@ FESubfaceValues<dim>::FESubfaceValues (const Mapping<dim>       &mapping,
   mapping_data = mapping.get_subface_data(flags, quadrature);
   fe_data      = fe.get_subface_data(flags, mapping, quadrature);
 
+  
+                                  // The get_face_data functions
+                                  // might have added an update flag.
+                                  // Therefore collect all flags
+                                  // again.
+                                  //
+                                  // E.g. if update_JxW_values is set
+                                  // the update_boundary_forms flag
+                                  // is added within the
+                                  // Mapping::get_face_data function.
+                                  // If also update_normal_vectors is
+                                  // set this update_boundary_forms
+                                  // flag was already set by the
+                                  // update_once or update_each
+                                  // function resulting in no change
+                                  // in flags below, but if
+                                  // update_normal_vectors is not set
+                                  // this actually makes a
+                                  // difference.
+  flags |= mapping_data->update_once
+          | mapping_data->update_each
+          | fe_data->update_once
+          | fe_data->update_each;
+
                                   // set up objects within this class
   FEValuesData<dim>::initialize(n_quadrature_points,
                                dofs_per_cell,
@@ -791,6 +861,29 @@ FESubfaceValues<dim>::FESubfaceValues (const FiniteElement<dim> &fe,
                                   // calls to reinit
   mapping_data = mapping->get_subface_data(flags, quadrature);
   fe_data      = fe.get_subface_data(flags, *mapping, quadrature);
+  
+                                  // The get_face_data functions
+                                  // might have added an update flag.
+                                  // Therefore collect all flags
+                                  // again.
+                                  //
+                                  // E.g. if update_JxW_values is set
+                                  // the update_boundary_forms flag
+                                  // is added within the
+                                  // Mapping::get_face_data function.
+                                  // If also update_normal_vectors is
+                                  // set this update_boundary_forms
+                                  // flag was already set by the
+                                  // update_once or update_each
+                                  // function resulting in no change
+                                  // in flags below, but if
+                                  // update_normal_vectors is not set
+                                  // this actually makes a
+                                  // difference.
+  flags |= mapping_data->update_once
+          | mapping_data->update_each
+          | fe_data->update_once
+          | fe_data->update_each;
 
                                   // set up objects within this class
   FEValuesData<dim>::initialize(n_quadrature_points,

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.