From: guido Date: Tue, 28 Jun 2005 22:41:26 +0000 (+0000) Subject: preparing for restriction_is_additive vectors of length 1 to simplify constructor... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f788d7493aadf8e58fa6d38b647c26d41d412dee;p=dealii-svn.git preparing for restriction_is_additive vectors of length 1 to simplify constructor calls git-svn-id: https://svn.dealii.org/trunk@10961 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index f478635ef1..7b973f5dfe 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -128,6 +128,20 @@ FiniteElementBase (const FiniteElementData &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& riaf = const_cast&>(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));