}
- 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<other.fevalv.size(); ++i)
- {
- const FEValuesBase<dim,sdim> &p = *other.fevalv[i];
- const FEValues<dim,sdim> *pc = dynamic_cast<const FEValues<dim,sdim>*>(&p);
- const FEFaceValues<dim,sdim> *pf = dynamic_cast<const FEFaceValues<dim,sdim>*>(&p);
- const FESubfaceValues<dim,sdim> *ps = dynamic_cast<const FESubfaceValues<dim,sdim>*>(&p);
-
- if (pc != 0)
- fevalv[i] = std_cxx1x::shared_ptr<FEValuesBase<dim,sdim> > (
- new FEValues<dim,sdim> (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<other.fevalv.size(); ++i)
- {
- const FEValuesBase<dim,sdim> &p = *other.fevalv[i];
- const FEValues<dim,sdim> *pc = dynamic_cast<const FEValues<dim,sdim>*>(&p);
- const FEFaceValues<dim,sdim> *pf = dynamic_cast<const FEFaceValues<dim,sdim>*>(&p);
- const FESubfaceValues<dim,sdim> *ps = dynamic_cast<const FESubfaceValues<dim,sdim>*>(&p);
-
- if (pc != 0)
- fevalv[i] = std_cxx1x::shared_ptr<FEValuesBase<dim,sdim> > (
- new FEValues<dim,sdim> (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<int dim, int sdim>
template <class FEVALUES>
}
- template <>
- template <typename number>
- 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<fevalv.size(); ++i)
- {
- FEValuesBase<dim, spacedim> &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<dim,spacedim> &fe = dynamic_cast<FEValues<dim,spacedim>&> (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 <typename number>
- 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<fevalv.size(); ++i)
- {
- FEValuesBase<dim, spacedim> &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<dim,spacedim> &fe = dynamic_cast<FEValues<dim,spacedim>&> (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 <int dim, int sdim>
inline
void
}
- 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<FEValues<dim,sdim> >(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<FEValues<dim,sdim> >(el, mapping, cell_quadrature,
- cell_flags, block_info);
- }
-
-
template <int dim, int sdim>
inline
void