namespace MeshWorker
{
+ template <int dim, class DOFINFO> class DoFInfoBox;
+
/**
* The class providing the scrapbook to fill with local integration
* results. These can be values, local contributions to forms or cell
std::vector<std::vector<number> > quadrature_values;
};
- template <int dim, int spacedim> class DoFInfoBox;
+ template <int dim, class DOFINFO> class DoFInfoBox;
/**
* A class containing information on geometry and degrees of freedom
{
public:
/// The current cell
- typename Triangulation<dim>::cell_iterator cell;
+ typename Triangulation<dim, spacedim>::cell_iterator cell;
/// The current face
- typename Triangulation<dim>::face_iterator face;
+ typename Triangulation<dim, spacedim>::face_iterator face;
/**
* The number of the current
*/
BlockIndices aux_local_indices;
- friend class DoFInfoBox<dim, spacedim>;
+ friend class DoFInfoBox<dim, DoFInfo<dim, spacedim, number> >;
};
* itself in one object, saving a bit of memory and a few operations,
* but sacrificing some cleanliness.
*
+ * @ingroup MeshWorker
* @author Guido Kanschat, 2010
*/
- template <int dim, int spacedim=dim>
+ template <int dim, class DOFINFO>
class DoFInfoBox
{
public:
* Constructor copying the seed
* into all other objects.
*/
- DoFInfoBox(const DoFInfo<dim, spacedim>& seed);
+ DoFInfoBox(const DOFINFO& seed);
/**
* Copy constructor, taking
* #cell and using it as a seed
* in the other constructor.
*/
- DoFInfoBox(const DoFInfoBox<dim, spacedim>&);
+ DoFInfoBox(const DoFInfoBox<dim, DOFINFO>&);
/**
* Reset all the availability flags.
/**
* The data for the cell.
*/
- DoFInfo<dim> cell;
+ DOFINFO cell;
/**
* The data for the faces from inside.
*/
- DoFInfo<dim> interior[GeometryInfo<dim>::faces_per_cell];
+ DOFINFO interior[GeometryInfo<dim>::faces_per_cell];
/**
* The data for the faces from outside.
*/
- DoFInfo<dim> exterior[GeometryInfo<dim>::faces_per_cell];
+ DOFINFO exterior[GeometryInfo<dim>::faces_per_cell];
/**
* A set of flags, indicating
//----------------------------------------------------------------------//
- template < int dim, int spacedim>
+ template <int dim, class DOFINFO>
inline
- DoFInfoBox<dim, spacedim>::DoFInfoBox(const DoFInfo<dim, spacedim>& seed)
+ DoFInfoBox<dim, DOFINFO>::DoFInfoBox(const DOFINFO& seed)
:
cell(seed)
{
}
- template < int dim, int spacedim>
+ template <int dim, class DOFINFO>
inline
- DoFInfoBox<dim, spacedim>::DoFInfoBox(const DoFInfoBox<dim, spacedim>& other)
+ DoFInfoBox<dim, DOFINFO>::DoFInfoBox(const DoFInfoBox<dim, DOFINFO>& other)
:
cell(other.cell)
{
}
- template < int dim, int spacedim>
+ template <int dim, class DOFINFO>
inline void
- DoFInfoBox<dim, spacedim>::reset ()
+ DoFInfoBox<dim, DOFINFO>::reset ()
{
for (unsigned int i=0;i<GeometryInfo<dim>::faces_per_cell;++i)
{
}
- template < int dim, int spacedim>
+ template <int dim, class DOFINFO>
template <class ASSEMBLER>
inline void
- DoFInfoBox<dim, spacedim>::assemble (ASSEMBLER& assembler) const
+ DoFInfoBox<dim, DOFINFO>::assemble (ASSEMBLER& assembler) const
{
assembler.assemble(cell);
for (unsigned int i=0;i<GeometryInfo<dim>::faces_per_cell;++i)
return true;
}
- template<int dim, int sdim, class A>
- void assemble(const MeshWorker::DoFInfoBox<dim, sdim>& dinfo, A& assembler)
+ template<int dim, class DOFINFO, class A>
+ void assemble(const MeshWorker::DoFInfoBox<dim, DOFINFO>& dinfo, A& assembler)
{
dinfo.assemble(assembler);
}
*
* @author Guido Kanschat, 2010
*/
- template<class INFOBOX, int dim, int spacedim, class ITERATOR>
+ template<class INFOBOX, class DOFINFO, int dim, int spacedim, class ITERATOR>
void cell_action(
ITERATOR cell,
- DoFInfoBox<dim, spacedim>& dof_info,
+ DoFInfoBox<dim, DOFINFO>& dof_info,
INFOBOX& info,
const std_cxx1x::function<void (DoFInfo<dim, spacedim>&, typename INFOBOX::CellInfo &)> &cell_worker,
const std_cxx1x::function<void (DoFInfo<dim, spacedim>&, typename INFOBOX::FaceInfo &)> &boundary_worker,
* @ingroup MeshWorker
* @author Guido Kanschat, 2009
*/
- template<class INFOBOX, int dim, int spacedim, typename ASSEMBLER, class ITERATOR>
+ template<class DOFINFO, class INFOBOX, int dim, int spacedim, typename ASSEMBLER, class ITERATOR>
void loop(ITERATOR begin,
typename identity<ITERATOR>::type end,
- DoFInfo<dim, spacedim> dinfo,
+ DOFINFO& dinfo,
INFOBOX& info,
const std_cxx1x::function<void (DoFInfo<dim, spacedim>&, typename INFOBOX::CellInfo &)> &cell_worker,
const std_cxx1x::function<void (DoFInfo<dim, spacedim>&, typename INFOBOX::FaceInfo &)> &boundary_worker,
ASSEMBLER &assembler,
bool cells_first = true)
{
- DoFInfoBox<dim, spacedim> dof_info(dinfo);
+ DoFInfoBox<dim, DOFINFO> dof_info(dinfo);
assembler.initialize_info(dof_info.cell, false);
for (unsigned int i=0;i<GeometryInfo<dim>::faces_per_cell;++i)
* @ingroup MeshWorker
* @author Guido Kanschat, 2009
*/
- template<class CELLINFO, class FACEINFO, int dim, class ITERATOR, typename ASSEMBLER>
+ template<class CELLINFO, class FACEINFO, class DOFINFO, int dim, class ITERATOR, typename ASSEMBLER>
void integration_loop(ITERATOR begin,
typename identity<ITERATOR>::type end,
- DoFInfo<dim>& dof_info,
+ DOFINFO& dof_info,
IntegrationInfoBox<dim, dim>& box,
const std_cxx1x::function<void (DoFInfo<dim>&, CELLINFO &)> &cell_worker,
const std_cxx1x::function<void (DoFInfo<dim>&, FACEINFO &)> &boundary_worker,
ASSEMBLER &assembler,
bool cells_first = true)
{
- loop<DoFInfo<dim>,IntegrationInfoBox<dim, dim> >
+ loop<DoFInfo<dim>, IntegrationInfoBox<dim, dim> >
(begin, end,
dof_info,
box,
template class LocalResults<float>;
template class DoFInfo<deal_II_dimension,deal_II_dimension,float>;
+ template class DoFInfoBox<deal_II_dimension,
+ DoFInfo<deal_II_dimension,deal_II_dimension,float> >;
+
template void IntegrationInfo<deal_II_dimension>::fill_local_data(
const DoFInfo<deal_II_dimension, deal_II_dimension, float>&, bool);
template class LocalResults<double>;
template class DoFInfo<deal_II_dimension,deal_II_dimension,double>;
+ template class DoFInfoBox<deal_II_dimension,
+ DoFInfo<deal_II_dimension,deal_II_dimension,double> >;
+
template void IntegrationInfo<deal_II_dimension>::fill_local_data(
const DoFInfo<deal_II_dimension, deal_II_dimension, double>&, bool);