From: bangerth Date: Tue, 9 Apr 2013 19:09:20 +0000 (+0000) Subject: Make sure it is possible to create default-constructed objects of type Triangulation... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be4a583d9d279c044c128bafd7520c5f4a4c311f;p=dealii-svn.git Make sure it is possible to create default-constructed objects of type Triangulation<1>::face_iterator. git-svn-id: https://svn.dealii.org/trunk@29226 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index b89c937287..7f1b4ccf16 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -88,7 +88,13 @@ this function.

Specific improvements

    -
  1. Fixed: VectorTools::subtract_mean_value can now be called without a +
  2. Fixed: It was not possible to create a default-constructed object of +type Triangulation<1>::face_iterator. This is now fixed. +
    +(Wolfgang Bangerth, Scott Miller, 2013/04/09) +
  3. + +
  4. New: VectorTools::subtract_mean_value can now be called without a boolean mask. The vector type is templatified and instantiated for all non distributed vectors.
    @@ -108,7 +114,7 @@ implementation also had the problem that it did not move vertices if the cell they were on was at the boundary, even if the vertex itself was not. All of these problems are now fixed.
    -(Wolfgang Bangerth, 2013/4/5) +(Wolfgang Bangerth, 2013/04/05)
  5. New: There is a class VectorFunctionFromTensorFunction that converts diff --git a/deal.II/include/deal.II/meshworker/integration_info.h b/deal.II/include/deal.II/meshworker/integration_info.h index 13218abd5a..aa220d1f6b 100644 --- a/deal.II/include/deal.II/meshworker/integration_info.h +++ b/deal.II/include/deal.II/meshworker/integration_info.h @@ -755,90 +755,6 @@ namespace MeshWorker } - template <> - inline - IntegrationInfo<1,1>::IntegrationInfo(const IntegrationInfo<1,1> &other) - : - multigrid(other.multigrid), - values(other.values), - gradients(other.gradients), - hessians(other.hessians), - global_data(other.global_data), - n_components(other.n_components) - { - const int dim = 1; - const int sdim = 1; - - fevalv.resize(other.fevalv.size()); - for (unsigned int i=0; i &p = *other.fevalv[i]; - const FEValues *pc = dynamic_cast*>(&p); - const FEFaceValues *pf = dynamic_cast*>(&p); - const FESubfaceValues *ps = dynamic_cast*>(&p); - - if (pc != 0) - fevalv[i] = std_cxx1x::shared_ptr > ( - new FEValues (pc->get_mapping(), pc->get_fe(), - pc->get_quadrature(), pc->get_update_flags())); - else if (pf != 0) - { - Assert (false, ExcImpossibleInDim(1)); - fevalv[i].reset (); - } - else if (ps != 0) - { - Assert (false, ExcImpossibleInDim(1)); - fevalv[i].reset(); - } - else - Assert(false, ExcInternalError()); - } - } - - - template <> - inline - IntegrationInfo<1,2>::IntegrationInfo(const IntegrationInfo<1,2> &other) - : - multigrid(other.multigrid), - values(other.values), - gradients(other.gradients), - hessians(other.hessians), - global_data(other.global_data), - n_components(other.n_components) - { - const int dim = 1; - const int sdim = 2; - - fevalv.resize(other.fevalv.size()); - for (unsigned int i=0; i &p = *other.fevalv[i]; - const FEValues *pc = dynamic_cast*>(&p); - const FEFaceValues *pf = dynamic_cast*>(&p); - const FESubfaceValues *ps = dynamic_cast*>(&p); - - if (pc != 0) - fevalv[i] = std_cxx1x::shared_ptr > ( - new FEValues (pc->get_mapping(), pc->get_fe(), - pc->get_quadrature(), pc->get_update_flags())); - else if (pf != 0) - { - Assert (false, ExcImpossibleInDim(1)); - fevalv[i].reset(); - } - else if (ps != 0) - { - Assert (false, ExcImpossibleInDim(1)); - fevalv[i].reset(); - } - else - Assert(false, ExcInternalError()); - } - } - - template template @@ -921,106 +837,10 @@ namespace MeshWorker } - template <> - template - inline void - IntegrationInfo<1,1>::reinit(const DoFInfo<1,1,number> &info) - { - const int dim = 1; - const int spacedim = 1; - - for (unsigned int i=0; i &febase = *fevalv[i]; - if (info.sub_number != deal_II_numbers::invalid_unsigned_int) - { - // This is a subface - Assert (false, ExcImpossibleInDim(1)); - } - else if (info.face_number != deal_II_numbers::invalid_unsigned_int) - { - // This is a face - Assert (false, ExcImpossibleInDim(1)); - } - else - { - // This is a cell - FEValues &fe = dynamic_cast&> (febase); - fe.reinit(info.cell); - } - } - - const bool split_fevalues = info.block_info != 0; - if (!global_data->empty()) - fill_local_data(info, split_fevalues); - } - - - template <> - template - inline void - IntegrationInfo<1,2>::reinit(const DoFInfo<1,2,number> &info) - { - const int dim = 1; - const int spacedim = 2; - - for (unsigned int i=0; i &febase = *fevalv[i]; - if (info.sub_number != deal_II_numbers::invalid_unsigned_int) - { - // This is a subface - Assert (false, ExcImpossibleInDim(1)); - } - else if (info.face_number != deal_II_numbers::invalid_unsigned_int) - { - // This is a face - Assert (false, ExcImpossibleInDim(1)); - } - else - { - // This is a cell - FEValues &fe = dynamic_cast&> (febase); - fe.reinit(info.cell); - } - } - - const bool split_fevalues = info.block_info != 0; - if (!global_data->empty()) - fill_local_data(info, split_fevalues); - } //----------------------------------------------------------------------// - template <> - inline - void - IntegrationInfoBox<1,1>::initialize_gauss_quadrature( - const unsigned int cp, - const unsigned int, - const unsigned int, - bool force) - { - if (force || cell_quadrature.size() == 0) - cell_quadrature = QGauss<1>(cp); - } - - - template <> - inline - void - IntegrationInfoBox<1,2>::initialize_gauss_quadrature( - const unsigned int cp, - const unsigned int, - const unsigned int, - bool force) - { - if (force || cell_quadrature.size() == 0) - cell_quadrature = QGauss<1>(cp); - } - - template inline void @@ -1075,47 +895,6 @@ namespace MeshWorker } - template <> - inline - void - IntegrationInfoBox<1,1>::initialize( - const FiniteElement<1,1> &el, - const Mapping<1,1> &mapping, - const BlockInfo *block_info) - { - initialize_update_flags(); - initialize_gauss_quadrature( - (cell_flags & update_values) ? (el.tensor_degree()+1) : el.tensor_degree(), 1, 1, false); - - const int dim = 1; - const int sdim = 1; - - cell.initialize >(el, mapping, cell_quadrature, - cell_flags, block_info); - } - - - - template <> - inline - void - IntegrationInfoBox<1,2>::initialize( - const FiniteElement<1,2> &el, - const Mapping<1,2> &mapping, - const BlockInfo *block_info) - { - initialize_update_flags(); - initialize_gauss_quadrature( - (cell_flags & update_values) ? (el.tensor_degree()+1) : el.tensor_degree(), 1, 1, false); - - const int dim = 1; - const int sdim = 2; - - cell.initialize >(el, mapping, cell_quadrature, - cell_flags, block_info); - } - - template inline void