]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
preparing for restriction_is_additive vectors of length 1 to simplify constructor...
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 Jun 2005 22:41:26 +0000 (22:41 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 Jun 2005 22:41:26 +0000 (22:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@10961 0785d39b-7218-0410-832d-ea1e28bc413d

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

index f478635ef1668620374ff31e207df8c4dec2cdbb..7b973f5dfe3ea884ffcbce315060f5196625d74d 100644 (file)
@@ -128,6 +128,20 @@ FiniteElementBase (const FiniteElementData<dim> &fe_data,
                                     ==
                                     n_nonzero_components_table.end())
 {
+                                  // Special handling of vectors of
+                                  // length one: in this case, we
+                                  // assume that all entries were
+                                  // supposed to be equal.
+   unsigned int ndofs = this->dofs_per_cell;
+   if (restriction_is_additive_flags.size() == 1 && this->dofs_per_cell > 1)
+     {
+       std::vector<bool>& riaf = const_cast<std::vector<bool>&>(restriction_is_additive_flags);
+       riaf.resize(ndofs, restriction_is_additive_flags[0]);
+     }
+   
+//   if (nonzero_components.size() == 1 && this->dofs_per_cell > 1)
+//     nonzero_components.resize(ndofs, nonzero_components[0]);
+  
   Assert (restriction_is_additive_flags.size() == this->dofs_per_cell,
          ExcDimensionMismatch(restriction_is_additive_flags.size(),
                               this->dofs_per_cell));

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.