// ---------------------------------------------------------------------
//
-// Copyright (C) 2013, 2014 by the deal.II authors
+// Copyright (C) 2013, 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
internal::Triangulation::Iterators<3,spacedim> classes for Triangulation
iterators,
-- internal::DoFHandler::Iterators<DH<1,spacedim> >,
- internal::DoFHandler::Iterators<DH<2,spacedim> >, and
- internal::DoFHandler::Iterators<DH<3,spacedim> > classes for DoFHandler
+- internal::DoFHandler::Iterators<DoFHandlerType<1,spacedim> >,
+ internal::DoFHandler::Iterators<DoFHandlerType<2,spacedim> >, and
+ internal::DoFHandler::Iterators<DoFHandlerType<3,spacedim> > classes for DoFHandler
and hp::DoFHandler iterators,
* @ingroup distributed
* @author Timo Heister, 2009-2011
*/
- template<int dim, typename VectorType, class DH=DoFHandler<dim> >
+ template<int dim, typename VectorType, typename DoFHandlerType=DoFHandler<dim> >
class SolutionTransfer
{
public:
/**
* Constructor, takes the current DoFHandler as argument.
*/
- SolutionTransfer(const DH &dof);
+ SolutionTransfer(const DoFHandlerType &dof);
/**
* Destructor.
*/
/**
* Pointer to the degree of freedom handler to work with.
*/
- SmartPointer<const DH,SolutionTransfer<dim,VectorType,DH> > dof_handler;
+ SmartPointer<const DoFHandlerType,SolutionTransfer<dim,VectorType,DoFHandlerType> > dof_handler;
/**
* A vector that stores pointers to all the vectors we are supposed to
* @author Wolfgang Bangerth, 1998, 2006, 2008, Timo Heister, Guido Kanschat,
* 2012, 2013
*/
-template <int structdim, class DH, bool level_dof_access>
-class DoFAccessor : public dealii::internal::DoFAccessor::Inheritance<structdim, DH::dimension, DH::space_dimension>::BaseClass
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
+class DoFAccessor : public dealii::internal::DoFAccessor::Inheritance<structdim, DoFHandlerType::dimension, DoFHandlerType::space_dimension>::BaseClass
{
public:
* A static variable that allows users of this class to discover the value
* of the second template argument.
*/
- static const unsigned int dimension=DH::dimension;
+ static const unsigned int dimension=DoFHandlerType::dimension;
/**
* A static variable that allows users of this class to discover the value
* of the third template argument.
*/
- static const unsigned int space_dimension=DH::space_dimension;
+ static const unsigned int space_dimension=DoFHandlerType::space_dimension;
/**
* Declare a typedef to the base class to make accessing some of the
/**
* Data type passed by the iterator class.
*/
- typedef DH AccessorData;
+ typedef DoFHandlerType AccessorData;
/**
* @name Constructors
/**
* Constructor
*/
- DoFAccessor (const Triangulation<DH::dimension,DH::space_dimension> *tria,
- const int level,
- const int index,
- const DH *local_data);
+ DoFAccessor (const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *tria,
+ const int level,
+ const int index,
+ const DoFHandlerType *local_data);
/**
* Conversion constructor. This constructor exists to make certain
* Another conversion operator between objects that don't make sense, just
* like the previous one.
*/
- template <int dim2, class DH2, bool level_dof_access2>
- DoFAccessor (const DoFAccessor<dim2, DH2, level_dof_access2> &);
+ template <int dim2, class DoFHandlerType2, bool level_dof_access2>
+ DoFAccessor (const DoFAccessor<dim2, DoFHandlerType2, level_dof_access2> &);
/**
* Copy constructor allowing to switch level access and active access.
*/
template <bool level_dof_access2>
- DoFAccessor(const DoFAccessor<structdim, DH, level_dof_access2> &);
+ DoFAccessor(const DoFAccessor<structdim, DoFHandlerType, level_dof_access2> &);
/**
* @}
*/
/**
* Return a handle on the DoFHandler object which we are using.
*/
- const DH &
+ const DoFHandlerType &
get_dof_handler () const;
/**
* Implement the copy operator needed for the iterator classes.
*/
template <bool level_dof_access2>
- void copy_from (const DoFAccessor<structdim, DH, level_dof_access2> &a);
+ void copy_from (const DoFAccessor<structdim, DoFHandlerType, level_dof_access2> &a);
/**
* Copy operator used by the iterator class. Keeps the previously set dof
* handler, but sets the object coordinates of the TriaAccessor.
*/
- void copy_from (const TriaAccessorBase<structdim, DH::dimension, DH::space_dimension> &da);
+ void copy_from (const TriaAccessorBase<structdim, DoFHandlerType::dimension, DoFHandlerType::space_dimension> &da);
/**
* Tell the caller whether get_active_or_mg_dof_indices() accesses active or
/**
* Return an iterator pointing to the @p c-th child.
*/
- TriaIterator<DoFAccessor<structdim,DH, level_dof_access> >
+ TriaIterator<DoFAccessor<structdim,DoFHandlerType, level_dof_access> >
child (const unsigned int c) const;
/**
* a line itself, then the only valid index is @p i equals to zero, and the
* function returns an iterator to itself.
*/
- typename dealii::internal::DoFHandler::Iterators<DH, level_dof_access>::line_iterator
+ typename dealii::internal::DoFHandler::Iterators<DoFHandlerType, level_dof_access>::line_iterator
line (const unsigned int i) const;
/**
* a quad itself, then the only valid index is @p i equals to zero, and the
* function returns an iterator to itself.
*/
- typename dealii::internal::DoFHandler::Iterators<DH, level_dof_access>::quad_iterator
+ typename dealii::internal::DoFHandler::Iterators<DoFHandlerType, level_dof_access>::quad_iterator
quad (const unsigned int i) const;
/**
*
*/
void get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index = DH::default_fe_index) const;
+ const unsigned int fe_index = DoFHandlerType::default_fe_index) const;
/**
* Return the global multilevel indices of the degrees of freedom that live
*/
void get_mg_dof_indices (const int level,
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index = DH::default_fe_index) const;
+ const unsigned int fe_index = DoFHandlerType::default_fe_index) const;
/**
* Sets the level DoF indices that are returned by get_mg_dof_indices.
*/
void set_mg_dof_indices (const int level,
const std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index = DH::default_fe_index);
+ const unsigned int fe_index = DoFHandlerType::default_fe_index);
/**
* Global DoF index of the <i>i</i> degree associated with the @p vertexth
* a cell object, there can only be a single set of degrees of freedom, and
* fe_index has to match the result of active_fe_index().
*/
- types::global_dof_index vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ types::global_dof_index vertex_dof_index
+ (const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int fe_index = DoFHandlerType::default_fe_index) const;
/**
* Returns the global DoF index of the <code>i</code>th degree of freedom
* associated with the <code>vertex</code>th vertex on level @p level. Also
* see vertex_dof_index().
*/
- types::global_dof_index mg_vertex_dof_index (const int level,
- const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ types::global_dof_index mg_vertex_dof_index
+ (const int level,
+ const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int fe_index = DoFHandlerType::default_fe_index) const;
/**
* Index of the <i>i</i>th degree of freedom of this object.
* produce an exception because no degrees are defined in the interior of
* the face.
*/
- types::global_dof_index dof_index (const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ types::global_dof_index dof_index
+ (const unsigned int i,
+ const unsigned int fe_index = DoFHandlerType::default_fe_index) const;
/**
* Returns the dof_index on the given level. Also see dof_index.
* given @p fe_index. @p fe_index must be used on this object, i.e.
* <code>fe_index_is_active(fe_index)</code> must return true.
*/
- const FiniteElement<DH::dimension,DH::space_dimension> &
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &
get_fe (const unsigned int fe_index) const;
/**
/**
* Store the address of the DoFHandler object to be accessed.
*/
- DH *dof_handler;
+ DoFHandlerType *dof_handler;
public:
/**
* Compare for equality. Return <tt>true</tt> if the two accessors refer to
* an iterator with level access can be equal to one with access to the
* active degrees of freedom.
*/
- template <int dim2, class DH2, bool level_dof_access2>
- bool operator == (const DoFAccessor<dim2,DH2,level_dof_access2> &) const;
+ template <int dim2, class DoFHandlerType2, bool level_dof_access2>
+ bool operator == (const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &) const;
/**
* Compare for inequality. The boolean not of operator==().
*/
- template <int dim2, class DH2, bool level_dof_access2>
- bool operator != (const DoFAccessor<dim2,DH2,level_dof_access2> &) const;
+ template <int dim2, class DoFHandlerType2, bool level_dof_access2>
+ bool operator != (const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &) const;
protected:
/**
* Reset the DoF handler pointer.
*/
- void set_dof_handler (DH *dh);
+ void set_dof_handler (DoFHandlerType *dh);
/**
* Set the index of the <i>i</i>th degree of freedom of this object to @p
* a cell object, there can only be a single set of degrees of freedom, and
* fe_index has to match the result of active_fe_index().
*/
- void set_dof_index (const unsigned int i,
- const types::global_dof_index index,
- const unsigned int fe_index = DH::default_fe_index) const;
+ void set_dof_index
+ (const unsigned int i,
+ const types::global_dof_index index,
+ const unsigned int fe_index = DoFHandlerType::default_fe_index) const;
void set_mg_dof_index (const int level, const unsigned int i, const types::global_dof_index index) const;
* a cell object, there can only be a single set of degrees of freedom, and
* fe_index has to match the result of active_fe_index().
*/
- void set_vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const types::global_dof_index index,
- const unsigned int fe_index = DH::default_fe_index) const;
+ void set_vertex_dof_index
+ (const unsigned int vertex,
+ const unsigned int i,
+ const types::global_dof_index index,
+ const unsigned int fe_index = DoFHandlerType::default_fe_index) const;
- void set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const types::global_dof_index index, const unsigned int fe_index = DH::default_fe_index) const;
+ void set_mg_vertex_dof_index
+ (const int level,
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::global_dof_index index,
+ const unsigned int fe_index = DoFHandlerType::default_fe_index) const;
/**
* Iterator classes need to be friends because they need to access
* Furthermore it is not implemented and will give a linker error if used
* anyway.
*/
- DoFAccessor<structdim,DH, level_dof_access> &
- operator = (const DoFAccessor<structdim,DH, level_dof_access> &da);
+ DoFAccessor<structdim,DoFHandlerType, level_dof_access> &
+ operator = (const DoFAccessor<structdim,DoFHandlerType, level_dof_access> &da);
/**
* Make the DoFHandler class a friend so that it can call the set_xxx()
*
* @author Wolfgang Bangerth, 2010
*/
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
-class DoFAccessor<0,DH<1,spacedim>, level_dof_access> : public TriaAccessor<0,1,spacedim>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
+class DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access> : public TriaAccessor<0,1,spacedim>
{
public:
/**
* Data type passed by the iterator class.
*/
- typedef DH<1,spacedim> AccessorData;
+ typedef DoFHandlerType<1,spacedim> AccessorData;
/**
* @name Constructors
*
* This iterator can only be called for one-dimensional triangulations.
*/
- DoFAccessor (const Triangulation<1,spacedim> *tria,
- const typename TriaAccessor<0,1,spacedim>::VertexKind vertex_kind,
- const unsigned int vertex_index,
- const DH<1,spacedim> *dof_handler);
+ DoFAccessor (const Triangulation<1,spacedim> *tria,
+ const typename TriaAccessor<0,1,spacedim>::VertexKind vertex_kind,
+ const unsigned int vertex_index,
+ const DoFHandlerType<1,spacedim> *dof_handler);
/**
* Constructor. This constructor exists in order to maintain interface
* anything useful here and so may not actually be called.
*/
DoFAccessor (const Triangulation<1,spacedim> *,
- const int = 0,
- const int = 0,
- const DH<1,spacedim> *dof_handler = 0);
+ const int = 0,
+ const int = 0,
+ const DoFHandlerType<1,spacedim> *dof_handler = 0);
/**
* Conversion constructor. This constructor exists to make certain
* Another conversion operator between objects that don't make sense, just
* like the previous one.
*/
- template <int dim2, class DH2, bool level_dof_access2>
- DoFAccessor (const DoFAccessor<dim2, DH2, level_dof_access2> &);
+ template <int dim2, class DoFHandlerType2, bool level_dof_access2>
+ DoFAccessor (const DoFAccessor<dim2, DoFHandlerType2, level_dof_access2> &);
/**
* @}
/**
* Return a handle on the DoFHandler object which we are using.
*/
- const DH<1,spacedim> &
+ const DoFHandlerType<1,spacedim> &
get_dof_handler () const;
/**
* Copy operator.
*/
- DoFAccessor<0,DH<1,spacedim>, level_dof_access> &
- operator = (const DoFAccessor<0,DH<1,spacedim>, level_dof_access> &da);
+ DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access> &
+ operator = (const DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access> &da);
/**
* Implement the copy operator needed for the iterator classes.
*/
template <bool level_dof_access2>
- void copy_from (const DoFAccessor<0, DH<1,spacedim>, level_dof_access2> &a);
+ void copy_from (const DoFAccessor<0, DoFHandlerType<1,spacedim>, level_dof_access2> &a);
/**
* Copy operator used by the iterator class. Keeps the previously set dof
* of the current object. The object is invalid because points (as
* represented by the current class) do not have children.
*/
- TriaIterator<DoFAccessor<0,DH<1,spacedim>, level_dof_access > >
+ TriaIterator<DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access > >
child (const unsigned int c) const;
/**
* a line itself, then the only valid index is @p i equals to zero, and the
* function returns an iterator to itself.
*/
- typename dealii::internal::DoFHandler::Iterators<DH<1,spacedim>, level_dof_access>::line_iterator
+ typename dealii::internal::DoFHandler::Iterators<DoFHandlerType<1,spacedim>, level_dof_access>::line_iterator
line (const unsigned int i) const;
/**
* a quad itself, then the only valid index is @p i equals to zero, and the
* function returns an iterator to itself.
*/
- typename dealii::internal::DoFHandler::Iterators<DH<1,spacedim>, level_dof_access>::quad_iterator
+ typename dealii::internal::DoFHandler::Iterators<DoFHandlerType<1,spacedim>, level_dof_access>::quad_iterator
quad (const unsigned int i) const;
/**
* given @p fe_index. @p fe_index must be used on this object, i.e.
* <code>fe_index_is_active(fe_index)</code> must return true.
*/
- const FiniteElement<DH<1,spacedim>::dimension,DH<1,spacedim>::space_dimension> &
+ const FiniteElement<DoFHandlerType<1,spacedim>::dimension,DoFHandlerType<1,spacedim>::space_dimension> &
get_fe (const unsigned int fe_index) const;
/**
/**
* Store the address of the DoFHandler object to be accessed.
*/
- DH<1,spacedim> *dof_handler;
+ DoFHandlerType<1,spacedim> *dof_handler;
/**
* Compare for equality.
*/
- template <int dim2, class DH2, bool level_dof_access2>
- bool operator == (const DoFAccessor<dim2,DH2,level_dof_access2> &) const;
+ template <int dim2, class DoFHandlerType2, bool level_dof_access2>
+ bool operator == (const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &) const;
/**
* Compare for inequality.
*/
- template <int dim2, class DH2, bool level_dof_access2>
- bool operator != (const DoFAccessor<dim2,DH2,level_dof_access2> &) const;
+ template <int dim2, class DoFHandlerType2, bool level_dof_access2>
+ bool operator != (const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &) const;
/**
* Reset the DoF handler pointer.
*/
- void set_dof_handler (DH<1,spacedim> *dh);
+ void set_dof_handler (DoFHandlerType<1,spacedim> *dh);
/**
* Set the index of the <i>i</i>th degree of freedom of this object to @p
* @ingroup Accessors
* @author Wolfgang Bangerth, 1998, Timo Heister, Guido Kanschat, 2012
*/
-template <class DH, bool level_dof_access>
-class DoFCellAccessor : public DoFAccessor<DH::dimension,DH, level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
+class DoFCellAccessor : public DoFAccessor<DoFHandlerType::dimension,DoFHandlerType, level_dof_access>
{
public:
/**
- * Extract dimension from DH.
+ * Extract dimension from DoFHandlerType.
*/
- static const unsigned int dim = DH::dimension;
+ static const unsigned int dim = DoFHandlerType::dimension;
/**
- * Extract space dimension from DH.
+ * Extract space dimension from DoFHandlerType.
*/
- static const unsigned int spacedim = DH::space_dimension;
+ static const unsigned int spacedim = DoFHandlerType::space_dimension;
/**
* Data type passed by the iterator class.
*/
- typedef DH AccessorData;
+ typedef DoFHandlerType AccessorData;
/**
* Declare a typedef to the base class to make accessing some of the
* exception classes simpler.
*/
- typedef DoFAccessor<DH::dimension,DH, level_dof_access> BaseClass;
+ typedef DoFAccessor<DoFHandlerType::dimension,DoFHandlerType, level_dof_access> BaseClass;
/**
* Define the type of the container this is part of.
*/
- typedef DH Container;
+ typedef DoFHandlerType Container;
/**
* A type for an iterator over the faces of a cell. This is what the face()
* function returns.
*/
typedef
- TriaIterator<DoFAccessor<DH::dimension-1, DH, level_dof_access> >
+ TriaIterator<DoFAccessor<DoFHandlerType::dimension-1, DoFHandlerType, level_dof_access> >
face_iterator;
/**
/**
* Constructor
*/
- DoFCellAccessor (const Triangulation<DH::dimension,DH::space_dimension> *tria,
- const int level,
- const int index,
- const AccessorData *local_data);
+ DoFCellAccessor (const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *tria,
+ const int level,
+ const int index,
+ const AccessorData *local_data);
/**
* Conversion constructor. This constructor exists to make certain
* Another conversion operator between objects that don't make sense, just
* like the previous one.
*/
- template <int dim2, class DH2, bool level_dof_access2>
+ template <int dim2, class DoFHandlerType2, bool level_dof_access2>
explicit
- DoFCellAccessor (const DoFAccessor<dim2, DH2, level_dof_access2> &);
+ DoFCellAccessor (const DoFAccessor<dim2, DoFHandlerType2, level_dof_access2> &);
/**
* @}
* CellAccessor returns a triangulation cell accessor without access to the
* DoF data.
*/
- TriaIterator<DoFCellAccessor<DH, level_dof_access> >
+ TriaIterator<DoFCellAccessor<DoFHandlerType, level_dof_access> >
parent () const;
/**
* needed since the neighbor function of the base class returns a cell
* accessor without access to the DoF data.
*/
- TriaIterator<DoFCellAccessor<DH, level_dof_access> >
+ TriaIterator<DoFCellAccessor<DoFHandlerType, level_dof_access> >
neighbor (const unsigned int) const;
/**
* since the child function of the base class returns a cell accessor
* without access to the DoF data.
*/
- TriaIterator<DoFCellAccessor<DH, level_dof_access> >
+ TriaIterator<DoFCellAccessor<DoFHandlerType, level_dof_access> >
child (const unsigned int) const;
/**
* function in the base class only returns an iterator with access to the
* triangulation data).
*/
- TriaIterator<DoFCellAccessor<DH, level_dof_access> >
+ TriaIterator<DoFCellAccessor<DoFHandlerType, level_dof_access> >
neighbor_child_on_subface (const unsigned int face_no,
const unsigned int subface_no) const;
template <class InputVector, typename number>
void get_interpolated_dof_values (const InputVector &values,
Vector<number> &interpolated_values,
- const unsigned int fe_index = DH::default_fe_index) const;
+ const unsigned int fe_index
+ = DoFHandlerType::default_fe_index) const;
/**
* This function is the counterpart to get_interpolated_dof_values(): you
template <class OutputVector, typename number>
void set_dof_values_by_interpolation (const Vector<number> &local_values,
OutputVector &values,
- const unsigned int fe_index = DH::default_fe_index) const;
+ const unsigned int fe_index
+ = DoFHandlerType::default_fe_index) const;
/**
* Distribute a local (cell based) vector to a global one by mapping the
* associated with them without having any degrees of freedom. Consequently,
* this function will produce an exception when called on non-active cells.
*/
- const FiniteElement<DH::dimension,DH::space_dimension> &
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &
get_fe () const;
/**
* Furthermore it is not implemented and will give a linker error if used
* anyway.
*/
- DoFCellAccessor<DH, level_dof_access> &
- operator = (const DoFCellAccessor<DH, level_dof_access> &da);
+ DoFCellAccessor<DoFHandlerType, level_dof_access> &
+ operator = (const DoFCellAccessor<DoFHandlerType, level_dof_access> &da);
/**
* Make the DoFHandler class a friend so that it can call the
};
-template <int sd, class DH, bool level_dof_access>
+template <int sd, typename DoFHandlerType, bool level_dof_access>
inline
bool
-DoFAccessor<sd, DH, level_dof_access>::is_level_cell()
+DoFAccessor<sd, DoFHandlerType, level_dof_access>::is_level_cell()
{
return level_dof_access;
}
/*------------------------- Functions: DoFAccessor ---------------------------*/
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
-DoFAccessor<structdim,DH,level_dof_access>::DoFAccessor ()
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::DoFAccessor ()
{
Assert (false, ExcInvalidObject());
}
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
-DoFAccessor<structdim,DH,level_dof_access>::DoFAccessor (
- const Triangulation<DH::dimension,DH::space_dimension> *tria,
- const int level,
- const int index,
- const DH *dof_handler)
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::DoFAccessor (
+ const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *tria,
+ const int level,
+ const int index,
+ const DoFHandlerType *dof_handler)
:
- dealii::internal::DoFAccessor::Inheritance<structdim,DH::dimension,
- DH::space_dimension>::BaseClass (tria,
- level,
- index),
- dof_handler(const_cast<DH *>(dof_handler))
+ dealii::internal::DoFAccessor::Inheritance<structdim,DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>::BaseClass (tria,
+ level,
+ index),
+ dof_handler(const_cast<DoFHandlerType *>(dof_handler))
{}
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
template <int structdim2, int dim2, int spacedim2>
-DoFAccessor<structdim,DH,level_dof_access>::DoFAccessor (const InvalidAccessor<structdim2,dim2,spacedim2> &)
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::DoFAccessor
+(const InvalidAccessor<structdim2,dim2,spacedim2> &)
{
Assert (false, ExcInvalidObject());
}
-template <int structdim, class DH, bool level_dof_access>
-template <int dim2, class DH2, bool level_dof_access2>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
+template <int dim2, class DoFHandlerType2, bool level_dof_access2>
inline
-DoFAccessor<structdim,DH,level_dof_access>::DoFAccessor (const DoFAccessor<dim2, DH2, level_dof_access2> &other)
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::DoFAccessor
+(const DoFAccessor<dim2, DoFHandlerType2, level_dof_access2> &other)
: BaseClass(other),
dof_handler(0)
{
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
template <bool level_dof_access2>
inline
-DoFAccessor<structdim,DH,level_dof_access>::DoFAccessor (const DoFAccessor<structdim, DH, level_dof_access2> &other)
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::DoFAccessor
+(const DoFAccessor<structdim, DoFHandlerType, level_dof_access2> &other)
: BaseClass(other),
- dof_handler(const_cast<DH *>(other.dof_handler))
+ dof_handler(const_cast<DoFHandlerType *>(other.dof_handler))
{
}
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFAccessor<structdim,DH,level_dof_access>::set_dof_handler (DH *dh)
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::set_dof_handler (DoFHandlerType *dh)
{
Assert (dh != 0, ExcInvalidObject());
this->dof_handler = dh;
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
-const DH &
-DoFAccessor<structdim,DH,level_dof_access>::get_dof_handler () const
+const DoFHandlerType &
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::get_dof_handler () const
{
return *this->dof_handler;
}
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFAccessor<structdim,DH,level_dof_access>::copy_from (
- const TriaAccessorBase<structdim, DH::dimension, DH::space_dimension> &da)
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::copy_from
+(const TriaAccessorBase<structdim, DoFHandlerType::dimension, DoFHandlerType::space_dimension> &da)
{
Assert (this->dof_handler != 0, ExcInvalidObject());
BaseClass::copy_from(da);
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
template <bool level_dof_access2>
inline
void
-DoFAccessor<structdim,DH,level_dof_access>::copy_from (const DoFAccessor<structdim,DH,level_dof_access2> &a)
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::copy_from
+(const DoFAccessor<structdim,DoFHandlerType,level_dof_access2> &a)
{
BaseClass::copy_from (a);
set_dof_handler (a.dof_handler);
-template <int structdim, class DH, bool level_dof_access>
-template <int dim2, class DH2, bool level_dof_access2>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
+template <int dim2, class DoFHandlerType2, bool level_dof_access2>
inline
bool
-DoFAccessor<structdim,DH,level_dof_access>::operator == (const DoFAccessor<dim2,DH2,level_dof_access2> &a) const
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::operator ==
+(const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &a) const
{
Assert (structdim == dim2, ExcCantCompareIterators());
Assert (this->dof_handler == a.dof_handler, ExcCantCompareIterators());
-template <int structdim, class DH, bool level_dof_access>
-template <int dim2, class DH2, bool level_dof_access2>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
+template <int dim2, class DoFHandlerType2, bool level_dof_access2>
inline
bool
-DoFAccessor<structdim,DH,level_dof_access>::operator != (const DoFAccessor<dim2,DH2,level_dof_access2> &a) const
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::operator !=
+(const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &a) const
{
Assert (structdim == dim2, ExcCantCompareIterators());
Assert (this->dof_handler == a.dof_handler, ExcCantCompareIterators());
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
-TriaIterator<DoFAccessor<structdim,DH,level_dof_access> >
-DoFAccessor<structdim,DH,level_dof_access>::child (const unsigned int i) const
+TriaIterator<DoFAccessor<structdim,DoFHandlerType,level_dof_access> >
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::child (const unsigned int i) const
{
Assert (static_cast<unsigned int>(this->level()) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
- TriaIterator<TriaAccessor<structdim,DH::dimension,DH::space_dimension> >
- t = TriaAccessor<structdim,DH::dimension,DH::space_dimension>::child(i);
+ TriaIterator<TriaAccessor<structdim,DoFHandlerType::dimension,DoFHandlerType::space_dimension> >
+ t = TriaAccessor<structdim,DoFHandlerType::dimension,DoFHandlerType::space_dimension>::child(i);
- TriaIterator<DoFAccessor<structdim,DH,level_dof_access> > q (*t, this->dof_handler);
+ TriaIterator<DoFAccessor<structdim,DoFHandlerType,level_dof_access> > q (*t, this->dof_handler);
return q;
}
}
}
- template<class DH, bool level_dof_access>
+ template<typename DoFHandlerType, bool level_dof_access>
static
- void set_mg_dof_indices (const dealii::DoFAccessor<1,DH,level_dof_access> &,
+ void set_mg_dof_indices (const dealii::DoFAccessor<1,DoFHandlerType,level_dof_access> &,
const int,
const std::vector<types::global_dof_index> &,
const unsigned int)
- template<class DH, bool level_dof_access>
+ template<typename DoFHandlerType, bool level_dof_access>
static
- void set_mg_dof_indices (dealii::DoFAccessor<2, DH,level_dof_access> &accessor,
+ void set_mg_dof_indices (dealii::DoFAccessor<2, DoFHandlerType,level_dof_access> &accessor,
const int level,
const std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
- const FiniteElement<DH::dimension, DH::space_dimension> &fe = accessor.get_dof_handler ().get_fe ()[fe_index];
+ const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
+ = accessor.get_dof_handler ().get_fe ()[fe_index];
std::vector<types::global_dof_index>::const_iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<2>::vertices_per_cell; ++vertex)
- template<class DH, bool level_dof_access>
+ template<typename DoFHandlerType, bool level_dof_access>
static
- void set_mg_dof_indices (const dealii::DoFAccessor<3, DH,level_dof_access> &accessor,
- const int level,
- const std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ void set_mg_dof_indices
+ (const dealii::DoFAccessor<3, DoFHandlerType,level_dof_access> &accessor,
+ const int level,
+ const std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index)
{
- const FiniteElement<DH::dimension, DH::space_dimension> &fe = accessor.get_dof_handler ().get_fe ()[fe_index];
+ const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
+ = accessor.get_dof_handler ().get_fe ()[fe_index];
std::vector<types::global_dof_index>::const_iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<3>::vertices_per_cell; ++vertex)
-template <int dim, class DH, bool level_dof_access>
+template <int dim, typename DoFHandlerType, bool level_dof_access>
inline
types::global_dof_index
-DoFAccessor<dim,DH,level_dof_access>::dof_index (const unsigned int i,
- const unsigned int fe_index) const
+DoFAccessor<dim,DoFHandlerType,level_dof_access>::dof_index (const unsigned int i,
+ const unsigned int fe_index) const
{
// access the respective DoF
return dealii::internal::DoFAccessor::Implementation::get_dof_index (*this->dof_handler,
}
-template<int structdim, class DH, bool level_dof_access>
+template<int structdim, typename DoFHandlerType, bool level_dof_access>
inline
types::global_dof_index
-DoFAccessor<structdim, DH,level_dof_access>::mg_dof_index (const int level,
- const unsigned int i) const
+DoFAccessor<structdim, DoFHandlerType,level_dof_access>::mg_dof_index (const int level,
+ const unsigned int i) const
{
return this->dof_handler->template get_dof_index<structdim> (level, this->present_index, 0, i);
}
-template <int dim, class DH, bool level_dof_access>
+template <int dim, typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFAccessor<dim,DH,level_dof_access>::set_dof_index (const unsigned int i,
- const types::global_dof_index index,
- const unsigned int fe_index) const
+DoFAccessor<dim,DoFHandlerType,level_dof_access>::set_dof_index (const unsigned int i,
+ const types::global_dof_index index,
+ const unsigned int fe_index) const
{
// access the respective DoF
dealii::internal::DoFAccessor::Implementation::set_dof_index (*this->dof_handler,
-template <int dim, class DH, bool level_dof_access>
+template <int dim, typename DoFHandlerType, bool level_dof_access>
inline
unsigned int
-DoFAccessor<dim,DH,level_dof_access>::n_active_fe_indices () const
+DoFAccessor<dim,DoFHandlerType,level_dof_access>::n_active_fe_indices () const
{
// access the respective DoF
return
-template <int dim, class DH, bool level_dof_access>
+template <int dim, typename DoFHandlerType, bool level_dof_access>
inline
unsigned int
-DoFAccessor<dim,DH,level_dof_access>::nth_active_fe_index (const unsigned int n) const
+DoFAccessor<dim,DoFHandlerType,level_dof_access>::nth_active_fe_index (const unsigned int n) const
{
// access the respective DoF
return
-template <int dim, class DH, bool level_dof_access>
+template <int dim, typename DoFHandlerType, bool level_dof_access>
inline
bool
-DoFAccessor<dim,DH,level_dof_access>::fe_index_is_active (const unsigned int fe_index) const
+DoFAccessor<dim,DoFHandlerType,level_dof_access>::fe_index_is_active (const unsigned int fe_index) const
{
// access the respective DoF
return
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
types::global_dof_index
-DoFAccessor<structdim, DH,level_dof_access>::vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index) const
+DoFAccessor<structdim, DoFHandlerType,level_dof_access>::vertex_dof_index
+(const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int fe_index) const
{
return
dealii::internal::DoFAccessor::Implementation::get_vertex_dof_index
}
-template<int structdim, class DH, bool level_dof_access>
+template<int structdim, typename DoFHandlerType, bool level_dof_access>
inline
types::global_dof_index
-DoFAccessor<structdim, DH,level_dof_access>::mg_vertex_dof_index (const int level,
+DoFAccessor<structdim, DoFHandlerType,level_dof_access>::mg_vertex_dof_index (const int level,
const unsigned int vertex,
const unsigned int i,
const unsigned int fe_index) const
}
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFAccessor<structdim, DH,level_dof_access>::set_vertex_dof_index (const unsigned int vertex,
+DoFAccessor<structdim, DoFHandlerType,level_dof_access>::set_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const types::global_dof_index index,
const unsigned int fe_index) const
}
-template<int structdim, class DH, bool level_dof_access>
+template<int structdim, typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFAccessor<structdim, DH,level_dof_access>::set_mg_vertex_dof_index (const int level,
- const unsigned int vertex,
- const unsigned int i,
- const types::global_dof_index index,
- const unsigned int fe_index) const
+DoFAccessor<structdim, DoFHandlerType,level_dof_access>::set_mg_vertex_dof_index
+(const int level,
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::global_dof_index index,
+ const unsigned int fe_index) const
{
(void)fe_index;
Assert (this->dof_handler != 0, ExcInvalidObject ());
}
-template<int structdim, class DH, bool level_dof_access>
+template<int structdim, typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFAccessor<structdim, DH,level_dof_access>::set_mg_dof_index (const int level,
- const unsigned int i,
- const types::global_dof_index index) const
+DoFAccessor<structdim, DoFHandlerType,level_dof_access>::set_mg_dof_index
+(const int level,
+ const unsigned int i,
+ const types::global_dof_index index) const
{
this->dof_handler->template set_dof_index<structdim> (level, this->present_index, 0, i, index);
}
}
-template <int dim, class DH, bool level_dof_access>
+template <int dim, typename DoFHandlerType, bool level_dof_access>
inline
-const FiniteElement<DH::dimension,DH::space_dimension> &
-DoFAccessor<dim,DH,level_dof_access>::get_fe (const unsigned int fe_index) const
+const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &
+DoFAccessor<dim,DoFHandlerType,level_dof_access>::get_fe (const unsigned int fe_index) const
{
Assert (fe_index_is_active (fe_index) == true,
ExcMessage ("This function can only be called for active fe indices"));
{
namespace DoFAccessor
{
- template <class DH, bool level_dof_access>
- void get_dof_indices (const dealii::DoFAccessor<1,DH,level_dof_access> &accessor,
- std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ template <typename DoFHandlerType, bool level_dof_access>
+ void get_dof_indices (const dealii::DoFAccessor<1,DoFHandlerType,level_dof_access> &accessor,
+ std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index)
{
const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
dofs_per_line = accessor.get_fe(fe_index).dofs_per_line;
- template <class DH, bool level_dof_access>
- void get_dof_indices (const dealii::DoFAccessor<2,DH,level_dof_access> &accessor,
- std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ template <typename DoFHandlerType, bool level_dof_access>
+ void get_dof_indices (const dealii::DoFAccessor<2,DoFHandlerType,level_dof_access> &accessor,
+ std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index)
{
const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
dofs_per_line = accessor.get_fe(fe_index).dofs_per_line,
- template <class DH, bool level_dof_access>
- void get_dof_indices (const dealii::DoFAccessor<3,DH,level_dof_access> &accessor,
- std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ template <typename DoFHandlerType, bool level_dof_access>
+ void get_dof_indices (const dealii::DoFAccessor<3,DoFHandlerType,level_dof_access> &accessor,
+ std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index)
{
const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
dofs_per_line = accessor.get_fe(fe_index).dofs_per_line,
- template<class DH, bool level_dof_access>
- void get_mg_dof_indices (const dealii::DoFAccessor<1, DH,level_dof_access> &accessor,
- const int level,
- std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ template<typename DoFHandlerType, bool level_dof_access>
+ void get_mg_dof_indices
+ (const dealii::DoFAccessor<1, DoFHandlerType,level_dof_access> &accessor,
+ const int level,
+ std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index)
{
- const DH &handler = accessor.get_dof_handler();
+ const DoFHandlerType &handler = accessor.get_dof_handler();
Assert(handler.n_dofs(level) != numbers::invalid_dof_index,
ExcNotInitialized());
- const FiniteElement<DH::dimension, DH::space_dimension> &fe
+ const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
= handler.get_fe ()[fe_index];
std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
- template<class DH, bool level_dof_access>
- void get_mg_dof_indices (const dealii::DoFAccessor<2, DH,level_dof_access> &accessor,
+ template<typename DoFHandlerType, bool level_dof_access>
+ void get_mg_dof_indices (const dealii::DoFAccessor<2, DoFHandlerType,level_dof_access> &accessor,
const int level,
std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
- const DH &handler = accessor.get_dof_handler();
+ const DoFHandlerType &handler = accessor.get_dof_handler();
Assert(handler.n_dofs(level) != numbers::invalid_dof_index,
ExcNotInitialized());
- const FiniteElement<DH::dimension, DH::space_dimension> &fe = handler.get_fe ()[fe_index];
+ const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
+ = handler.get_fe ()[fe_index];
std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<2>::vertices_per_cell; ++vertex)
- template<class DH, bool level_dof_access>
- void get_mg_dof_indices (const dealii::DoFAccessor<3, DH,level_dof_access> &accessor,
- const int level,
- std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ template<typename DoFHandlerType, bool level_dof_access>
+ void get_mg_dof_indices
+ (const dealii::DoFAccessor<3, DoFHandlerType,level_dof_access> &accessor,
+ const int level,
+ std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index)
{
- const DH &handler = accessor.get_dof_handler();
+ const DoFHandlerType &handler = accessor.get_dof_handler();
Assert(handler.n_dofs(level) != numbers::invalid_dof_index,
ExcNotInitialized());
- const FiniteElement<DH::dimension, DH::space_dimension> &fe = handler.get_fe ()[fe_index];
+ const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
+ = handler.get_fe ()[fe_index];
std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<3>::vertices_per_cell; ++vertex)
}
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFAccessor<structdim,DH,level_dof_access>::get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index) const
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::get_dof_indices
+(std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index) const
{
Assert (this->dof_handler != 0, ExcNotInitialized());
Assert (static_cast<unsigned int>(this->level()) < this->dof_handler->levels.size(),
-template<int structdim, class DH, bool level_dof_access>
+template<int structdim, typename DoFHandlerType, bool level_dof_access>
inline
-void DoFAccessor<structdim, DH,level_dof_access>::get_mg_dof_indices (const int level,
- std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index) const
+void DoFAccessor<structdim, DoFHandlerType,level_dof_access>::get_mg_dof_indices
+(const int level,
+ std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index) const
{
Assert (this->dof_handler != 0, ExcInvalidObject ());
}
-template<int structdim, class DH, bool level_dof_access>
+template<int structdim, typename DoFHandlerType, bool level_dof_access>
inline
-void DoFAccessor<structdim, DH,level_dof_access>::set_mg_dof_indices (const int level,
- const std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+void DoFAccessor<structdim, DoFHandlerType,level_dof_access>::set_mg_dof_indices
+(const int level,
+ const std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index)
{
Assert (this->dof_handler != 0, ExcInvalidObject ());
{
namespace DoFAccessor
{
- template <bool level_dof_access, class DH>
+ template <bool level_dof_access, typename DoFHandlerType>
inline
- typename dealii::internal::DoFHandler::Iterators<DH, level_dof_access>::quad_iterator
- get_quad(const dealii::Triangulation<DH::dimension, DH::space_dimension> *,
+ typename dealii::internal::DoFHandler::Iterators<DoFHandlerType, level_dof_access>::quad_iterator
+ get_quad(const dealii::Triangulation<DoFHandlerType::dimension, DoFHandlerType::space_dimension> *,
unsigned int /*index*/,
- DH *)
+ DoFHandlerType *)
{
}
}
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
-typename dealii::internal::DoFHandler::Iterators<DH,level_dof_access>::line_iterator
-DoFAccessor<structdim,DH,level_dof_access>::line (const unsigned int i) const
+typename dealii::internal::DoFHandler::Iterators<DoFHandlerType,level_dof_access>::line_iterator
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::line (const unsigned int i) const
{
// if we are asking for a particular line and this object refers to
// a line, then the only valid index is i==0 and we should return
Assert (i==0, ExcMessage ("You can only ask for line zero if the "
"current object is a line itself."));
return
- typename dealii::internal::DoFHandler::Iterators<DH,level_dof_access>::cell_iterator
+ typename dealii::internal::DoFHandler::Iterators<DoFHandlerType,level_dof_access>::cell_iterator
(&this->get_triangulation(),
this->level(),
this->index(),
// otherwise we need to be in structdim>=2
Assert (structdim > 1, ExcImpossibleInDim(structdim));
- Assert (DH::dimension > 1, ExcImpossibleInDim(DH::dimension));
+ Assert (DoFHandlerType::dimension > 1, ExcImpossibleInDim(DoFHandlerType::dimension));
// checking of 'i' happens in line_index(i)
- return typename dealii::internal::DoFHandler::Iterators<DH,level_dof_access>::line_iterator
+ return typename dealii::internal::DoFHandler::Iterators<DoFHandlerType,level_dof_access>::line_iterator
(this->tria,
0, // only sub-objects are allowed, which have no level
this->line_index(i),
}
-template <int structdim, class DH, bool level_dof_access>
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
inline
-typename dealii::internal::DoFHandler::Iterators<DH,level_dof_access>::quad_iterator
-DoFAccessor<structdim,DH,level_dof_access>::quad (const unsigned int i) const
+typename dealii::internal::DoFHandler::Iterators<DoFHandlerType,level_dof_access>::quad_iterator
+DoFAccessor<structdim,DoFHandlerType,level_dof_access>::quad (const unsigned int i) const
{
// if we are asking for a
// particular quad and this object
Assert (i==0, ExcMessage ("You can only ask for quad zero if the "
"current object is a quad itself."));
return
- typename dealii::internal::DoFHandler::Iterators<DH>::cell_iterator
+ typename dealii::internal::DoFHandler::Iterators<DoFHandlerType>::cell_iterator
(&this->get_triangulation(),
this->level(),
this->index(),
// otherwise we need to be in structdim>=3
Assert (structdim > 2, ExcImpossibleInDim(structdim));
- Assert (DH::dimension > 2, ExcImpossibleInDim(DH::dimension));
+ Assert (DoFHandlerType::dimension > 2, ExcImpossibleInDim(DoFHandlerType::dimension));
// checking of 'i' happens in quad_index(i)
- return typename dealii::internal::DoFHandler::Iterators<DH,level_dof_access>::quad_iterator
+ return typename dealii::internal::DoFHandler::Iterators<DoFHandlerType,level_dof_access>::quad_iterator
(this->tria,
0, // only sub-objects are allowed, which have no level
this->quad_index(i),
/*------------------------- Functions: DoFAccessor<0,1,spacedim> ---------------------------*/
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::DoFAccessor ()
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::DoFAccessor ()
{
Assert (false, ExcInvalidObject());
}
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::
-DoFAccessor (const Triangulation<1,spacedim> *tria,
- const typename TriaAccessor<0,1,spacedim>::VertexKind vertex_kind,
- const unsigned int vertex_index,
- const DH<1,spacedim> *dof_handler)
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::
+DoFAccessor (const Triangulation<1,spacedim> *tria,
+ const typename TriaAccessor<0,1,spacedim>::VertexKind vertex_kind,
+ const unsigned int vertex_index,
+ const DoFHandlerType<1,spacedim> *dof_handler)
:
BaseClass (tria,
vertex_kind,
vertex_index),
- dof_handler(const_cast<DH<1,spacedim>*>(dof_handler))
+ dof_handler(const_cast<DoFHandlerType<1,spacedim>*>(dof_handler))
{}
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::
DoFAccessor (const Triangulation<1,spacedim> *,
const int ,
const int ,
- const DH<1,spacedim> *)
+ const DoFHandlerType<1,spacedim> *)
:
dof_handler(0)
{
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
template <int structdim2, int dim2, int spacedim2>
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::DoFAccessor (const InvalidAccessor<structdim2,dim2,spacedim2> &)
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::DoFAccessor (const InvalidAccessor<structdim2,dim2,spacedim2> &)
{
Assert (false, ExcInvalidObject());
}
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
-template <int dim2, class DH2, bool level_dof_access2>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
+template <int dim2, class DoFHandlerType2, bool level_dof_access2>
inline
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::DoFAccessor (const DoFAccessor<dim2, DH2, level_dof_access2> &)
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::DoFAccessor
+(const DoFAccessor<dim2, DoFHandlerType2, level_dof_access2> &)
{
Assert (false, ExcInvalidObject());
}
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
void
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::set_dof_handler (DH<1,spacedim> *dh)
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::set_dof_handler
+(DoFHandlerType<1,spacedim> *dh)
{
Assert (dh != 0, ExcInvalidObject());
this->dof_handler = dh;
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
-const DH<1,spacedim> &
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::get_dof_handler () const
+const DoFHandlerType<1,spacedim> &
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::get_dof_handler () const
{
return *this->dof_handler;
}
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
void
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::get_dof_indices (
- std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index) const
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::get_dof_indices
+(std::vector<types::global_dof_index> &dof_indices,
+ const unsigned int fe_index) const
{
for (unsigned int i=0; i<dof_indices.size(); ++i)
dof_indices[i]
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
types::global_dof_index
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::
vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const unsigned int fe_index) const
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
void
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::copy_from (const TriaAccessorBase<0,1,spacedim> &da)
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::copy_from
+(const TriaAccessorBase<0,1,spacedim> &da)
{
Assert (this->dof_handler != 0, ExcInvalidObject());
BaseClass::copy_from(da);
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
template <bool level_dof_access2>
inline
void
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::copy_from (const DoFAccessor<0,DH<1,spacedim>, level_dof_access2> &a)
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::copy_from
+(const DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access2> &a)
{
BaseClass::copy_from (a);
set_dof_handler (a.dof_handler);
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
-template <int dim2, class DH2, bool level_dof_access2>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
+template <int dim2, class DoFHandlerType2, bool level_dof_access2>
inline
bool
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::operator == (const DoFAccessor<dim2,DH2,level_dof_access2> &a) const
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::operator ==
+(const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &a) const
{
Assert (dim2 == 0, ExcCantCompareIterators());
Assert (this->dof_handler == a.dof_handler, ExcCantCompareIterators());
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
-template <int dim2, class DH2, bool level_dof_access2>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
+template <int dim2, class DoFHandlerType2, bool level_dof_access2>
inline
bool
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::operator != (const DoFAccessor<dim2,DH2,level_dof_access2> &a) const
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::operator !=
+(const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &a) const
{
Assert (dim2 == 0, ExcCantCompareIterators());
Assert (this->dof_handler == a.dof_handler, ExcCantCompareIterators());
-template <template <int, int> class DH, int spacedim, bool level_dof_access>
+template <template <int, int> class DoFHandlerType, int spacedim, bool level_dof_access>
inline
-TriaIterator<DoFAccessor<0,DH<1,spacedim>, level_dof_access > >
-DoFAccessor<0,DH<1,spacedim>, level_dof_access>::child (const unsigned int i) const
+TriaIterator<DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access > >
+DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::child (const unsigned int i) const
{
- return TriaIterator<DoFAccessor<0,DH<1,spacedim>, level_dof_access > >();
+ return TriaIterator<DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access > >();
}
}
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
-DoFCellAccessor<DH,level_dof_access>::DoFCellAccessor (
- const Triangulation<DH::dimension,DH::space_dimension> *tria,
- const int level,
- const int index,
- const AccessorData *local_data)
+DoFCellAccessor<DoFHandlerType,level_dof_access>::DoFCellAccessor
+(const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *tria,
+ const int level,
+ const int index,
+ const AccessorData *local_data)
:
- DoFAccessor<DH::dimension,DH,level_dof_access> (tria,level,index, local_data)
+ DoFAccessor<DoFHandlerType::dimension,DoFHandlerType,level_dof_access> (tria,level,index, local_data)
{}
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <int structdim2, int dim2, int spacedim2>
inline
-DoFCellAccessor<DH,level_dof_access>::DoFCellAccessor (const InvalidAccessor<structdim2,dim2,spacedim2> &)
+DoFCellAccessor<DoFHandlerType,level_dof_access>::DoFCellAccessor
+(const InvalidAccessor<structdim2,dim2,spacedim2> &)
{
Assert (false, typename BaseClass::ExcInvalidObject());
}
-template <class DH, bool level_dof_access>
-template <int dim2, class DH2, bool level_dof_access2>
+template <typename DoFHandlerType, bool level_dof_access>
+template <int dim2, class DoFHandlerType2, bool level_dof_access2>
inline
-DoFCellAccessor<DH,level_dof_access>::DoFCellAccessor (const DoFAccessor<dim2,DH2,level_dof_access2> &other)
+DoFCellAccessor<DoFHandlerType,level_dof_access>::DoFCellAccessor
+(const DoFAccessor<dim2,DoFHandlerType2,level_dof_access2> &other)
:
BaseClass(other)
{}
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
-TriaIterator<DoFCellAccessor<DH,level_dof_access> >
-DoFCellAccessor<DH,level_dof_access>::neighbor (const unsigned int i) const
+TriaIterator<DoFCellAccessor<DoFHandlerType,level_dof_access> >
+DoFCellAccessor<DoFHandlerType,level_dof_access>::neighbor (const unsigned int i) const
{
- TriaIterator<DoFCellAccessor<DH,level_dof_access> >
+ TriaIterator<DoFCellAccessor<DoFHandlerType,level_dof_access> >
q (this->tria,
this->neighbor_level (i),
this->neighbor_index (i),
}
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
-TriaIterator<DoFCellAccessor<DH,level_dof_access> >
-DoFCellAccessor<DH,level_dof_access>::child (const unsigned int i) const
+TriaIterator<DoFCellAccessor<DoFHandlerType,level_dof_access> >
+DoFCellAccessor<DoFHandlerType,level_dof_access>::child (const unsigned int i) const
{
- TriaIterator<DoFCellAccessor<DH,level_dof_access> >
+ TriaIterator<DoFCellAccessor<DoFHandlerType,level_dof_access> >
q (this->tria,
this->level()+1,
this->child_index (i),
}
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
-TriaIterator<DoFCellAccessor<DH,level_dof_access> >
-DoFCellAccessor<DH,level_dof_access>::parent () const
+TriaIterator<DoFCellAccessor<DoFHandlerType,level_dof_access> >
+DoFCellAccessor<DoFHandlerType,level_dof_access>::parent () const
{
- TriaIterator<DoFCellAccessor<DH,level_dof_access> >
+ TriaIterator<DoFCellAccessor<DoFHandlerType,level_dof_access> >
q (this->tria,
this->level() - 1,
this->parent_index (),
{
namespace DoFCellAccessor
{
- template <class DH, bool level_dof_access>
+ template <typename DoFHandlerType, bool level_dof_access>
inline
- TriaIterator<dealii::DoFAccessor<DH::dimension-1,DH,level_dof_access> >
- get_face (const dealii::DoFCellAccessor<DH,level_dof_access> &cell,
+ TriaIterator<dealii::DoFAccessor<DoFHandlerType::dimension-1,DoFHandlerType,level_dof_access> >
+ get_face (const dealii::DoFCellAccessor<DoFHandlerType,level_dof_access> &cell,
const unsigned int i,
const dealii::internal::int2type<1>)
{
- dealii::DoFAccessor<0, DH,level_dof_access>
+ dealii::DoFAccessor<0, DoFHandlerType,level_dof_access>
a (&cell.get_triangulation(),
((i == 0) && cell.at_boundary(0)
?
- dealii::TriaAccessor<0, 1, DH::space_dimension>::left_vertex
+ dealii::TriaAccessor<0, 1, DoFHandlerType::space_dimension>::left_vertex
:
((i == 1) && cell.at_boundary(1)
?
- dealii::TriaAccessor<0, 1, DH::space_dimension>::right_vertex
+ dealii::TriaAccessor<0, 1, DoFHandlerType::space_dimension>::right_vertex
:
- dealii::TriaAccessor<0, 1, DH::space_dimension>::interior_vertex)),
+ dealii::TriaAccessor<0, 1, DoFHandlerType::space_dimension>::interior_vertex)),
cell.vertex_index(i),
&cell.get_dof_handler());
- return dealii::TriaIterator<dealii::DoFAccessor<0,DH,level_dof_access> > (a);
+ return dealii::TriaIterator<dealii::DoFAccessor<0,DoFHandlerType,level_dof_access> > (a);
}
- template <class DH, bool level_dof_access>
+ template <typename DoFHandlerType, bool level_dof_access>
inline
- TriaIterator<dealii::DoFAccessor<DH::dimension-1,DH,level_dof_access> >
- get_face (const dealii::DoFCellAccessor<DH,level_dof_access> &cell,
+ TriaIterator<dealii::DoFAccessor<DoFHandlerType::dimension-1,DoFHandlerType,level_dof_access> >
+ get_face (const dealii::DoFCellAccessor<DoFHandlerType,level_dof_access> &cell,
const unsigned int i,
const dealii::internal::int2type<2>)
{
}
- template <class DH, bool level_dof_access>
+ template <typename DoFHandlerType, bool level_dof_access>
inline
- TriaIterator<dealii::DoFAccessor<DH::dimension-1,DH,level_dof_access> >
- get_face (const dealii::DoFCellAccessor<DH,level_dof_access> &cell,
+ TriaIterator<dealii::DoFAccessor<DoFHandlerType::dimension-1,DoFHandlerType,level_dof_access> >
+ get_face (const dealii::DoFCellAccessor<DoFHandlerType,level_dof_access> &cell,
const unsigned int i,
const dealii::internal::int2type<3>)
{
}
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
-typename DoFCellAccessor<DH,level_dof_access>::face_iterator
-DoFCellAccessor<DH,level_dof_access>::face (const unsigned int i) const
+typename DoFCellAccessor<DoFHandlerType,level_dof_access>::face_iterator
+DoFCellAccessor<DoFHandlerType,level_dof_access>::face (const unsigned int i) const
{
Assert (i<GeometryInfo<dim>::faces_per_cell, ExcIndexRange (i, 0, GeometryInfo<dim>::faces_per_cell));
- const unsigned int dim = DH::dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
return dealii::internal::DoFCellAccessor::get_face (*this, i, dealii::internal::int2type<dim>());
}
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFCellAccessor<DH,level_dof_access>::get_dof_indices (std::vector<types::global_dof_index> &dof_indices) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::get_dof_indices
+(std::vector<types::global_dof_index> &dof_indices) const
{
Assert (this->active(), ExcMessage ("get_dof_indices() only works on active cells."));
Assert (this->is_artificial() == false,
-template<class DH, bool level_dof_access>
+template<typename DoFHandlerType, bool level_dof_access>
inline
-void DoFCellAccessor<DH,level_dof_access>::get_mg_dof_indices (std::vector<types::global_dof_index> &dof_indices) const
+void DoFCellAccessor<DoFHandlerType,level_dof_access>::get_mg_dof_indices
+(std::vector<types::global_dof_index> &dof_indices) const
{
- DoFAccessor<dim, DH,level_dof_access>::get_mg_dof_indices (this->level (), dof_indices);
+ DoFAccessor<dim, DoFHandlerType,level_dof_access>::get_mg_dof_indices (this->level (), dof_indices);
}
-template<class DH, bool level_dof_access>
+template<typename DoFHandlerType, bool level_dof_access>
inline
-void DoFCellAccessor<DH,level_dof_access>::set_mg_dof_indices (const std::vector<types::global_dof_index> &dof_indices)
+void DoFCellAccessor<DoFHandlerType,level_dof_access>::set_mg_dof_indices
+(const std::vector<types::global_dof_index> &dof_indices)
{
- DoFAccessor<dim, DH,level_dof_access>::set_mg_dof_indices (this->level (), dof_indices);
+ DoFAccessor<dim, DoFHandlerType,level_dof_access>::set_mg_dof_indices (this->level (), dof_indices);
}
-template<class DH, bool level_dof_access>
+template<typename DoFHandlerType, bool level_dof_access>
inline
-void DoFCellAccessor<DH,level_dof_access>::get_active_or_mg_dof_indices (std::vector<types::global_dof_index> &dof_indices) const
+void DoFCellAccessor<DoFHandlerType,level_dof_access>::get_active_or_mg_dof_indices
+(std::vector<types::global_dof_index> &dof_indices) const
{
if (level_dof_access)
get_mg_dof_indices (dof_indices);
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <class InputVector, typename number>
inline
void
-DoFCellAccessor<DH,level_dof_access>::get_dof_values (const InputVector &values,
- Vector<number> &local_values) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::get_dof_values
+(const InputVector &values,
+ Vector<number> &local_values) const
{
get_dof_values (values, local_values.begin(), local_values.end());
}
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <class InputVector, typename ForwardIterator>
inline
void
-DoFCellAccessor<DH,level_dof_access>::get_dof_values (const InputVector &values,
- ForwardIterator local_values_begin,
- ForwardIterator local_values_end) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::get_dof_values
+(const InputVector &values,
+ ForwardIterator local_values_begin,
+ ForwardIterator local_values_end) const
{
(void)local_values_end;
Assert (this->is_artificial() == false,
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <class InputVector, typename ForwardIterator>
inline
void
-DoFCellAccessor<DH,level_dof_access>::get_dof_values (const ConstraintMatrix &constraints,
- const InputVector &values,
- ForwardIterator local_values_begin,
- ForwardIterator local_values_end) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::get_dof_values
+(const ConstraintMatrix &constraints,
+ const InputVector &values,
+ ForwardIterator local_values_begin,
+ ForwardIterator local_values_end) const
{
Assert (this->is_artificial() == false,
ExcMessage ("Can't ask for DoF indices on artificial cells."));
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <class OutputVector, typename number>
inline
void
-DoFCellAccessor<DH,level_dof_access>::set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::set_dof_values
+(const Vector<number> &local_values,
+ OutputVector &values) const
{
Assert (this->is_artificial() == false,
ExcMessage ("Can't ask for DoF indices on artificial cells."));
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
-const FiniteElement<DH::dimension,DH::space_dimension> &
-DoFCellAccessor<DH,level_dof_access>::get_fe () const
+const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &
+DoFCellAccessor<DoFHandlerType,level_dof_access>::get_fe () const
{
- Assert ((dynamic_cast<const dealii::DoFHandler<DH::dimension,DH::space_dimension>*>
+ Assert ((dynamic_cast<const dealii::DoFHandler<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(this->dof_handler) != 0)
||
(this->has_children() == false),
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
unsigned int
-DoFCellAccessor<DH,level_dof_access>::active_fe_index () const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::active_fe_index () const
{
- Assert ((dynamic_cast<const dealii::DoFHandler<DH::dimension,DH::space_dimension>*>
+ Assert ((dynamic_cast<const dealii::DoFHandler<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(this->dof_handler) != 0)
||
(this->has_children() == false),
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
void
-DoFCellAccessor<DH,level_dof_access>::set_active_fe_index (const unsigned int i)
+DoFCellAccessor<DoFHandlerType,level_dof_access>::set_active_fe_index (const unsigned int i)
{
- Assert ((dynamic_cast<const dealii::DoFHandler<DH::dimension,DH::space_dimension>*>
+ Assert ((dynamic_cast<const dealii::DoFHandler<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(this->dof_handler) != 0)
||
(this->has_children() == false),
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <typename number, typename OutputVector>
inline
void
-DoFCellAccessor<DH,level_dof_access>::distribute_local_to_global (
- const Vector<number> &local_source,
- OutputVector &global_destination) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::distribute_local_to_global
+(const Vector<number> &local_source,
+ OutputVector &global_destination) const
{
dealii::internal::DoFCellAccessor::Implementation::
distribute_local_to_global (*this, local_source.begin(),
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <typename ForwardIterator, typename OutputVector>
inline
void
-DoFCellAccessor<DH,level_dof_access>::distribute_local_to_global (
- ForwardIterator local_source_begin,
- ForwardIterator local_source_end,
- OutputVector &global_destination) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::distribute_local_to_global
+(ForwardIterator local_source_begin,
+ ForwardIterator local_source_end,
+ OutputVector &global_destination) const
{
dealii::internal::DoFCellAccessor::Implementation::
distribute_local_to_global (*this, local_source_begin,
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <typename ForwardIterator, typename OutputVector>
inline
void
-DoFCellAccessor<DH,level_dof_access>::distribute_local_to_global (
- const ConstraintMatrix &constraints,
- ForwardIterator local_source_begin,
- ForwardIterator local_source_end,
- OutputVector &global_destination) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::distribute_local_to_global
+(const ConstraintMatrix &constraints,
+ ForwardIterator local_source_begin,
+ ForwardIterator local_source_end,
+ OutputVector &global_destination) const
{
dealii::internal::DoFCellAccessor::Implementation::
distribute_local_to_global (*this, constraints, local_source_begin,
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <typename number, typename OutputMatrix>
inline
void
-DoFCellAccessor<DH,level_dof_access>::distribute_local_to_global (
- const FullMatrix<number> &local_source,
- OutputMatrix &global_destination) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::distribute_local_to_global
+(const FullMatrix<number> &local_source,
+ OutputMatrix &global_destination) const
{
dealii::internal::DoFCellAccessor::Implementation::
distribute_local_to_global (*this,local_source,global_destination);
-template <class DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
template <typename number, typename OutputMatrix, typename OutputVector>
inline
void
-DoFCellAccessor<DH,level_dof_access>::distribute_local_to_global (
- const FullMatrix<number> &local_matrix,
- const Vector<number> &local_vector,
- OutputMatrix &global_matrix,
- OutputVector &global_vector) const
+DoFCellAccessor<DoFHandlerType,level_dof_access>::distribute_local_to_global
+(const FullMatrix<number> &local_matrix,
+ const Vector<number> &local_vector,
+ OutputMatrix &global_matrix,
+ OutputVector &global_vector) const
{
dealii::internal::DoFCellAccessor::Implementation::
distribute_local_to_global (*this,local_matrix,local_vector,
template <int, int, int> class InvalidAccessor;
-template <int structdim, class DH, bool lda> class DoFAccessor;
-template <class DH, bool lda> class DoFCellAccessor;
+template <int structdim, typename DoFHandlerType, bool lda> class DoFAccessor;
+template <typename DoFHandlerType, bool lda> class DoFCellAccessor;
template <int dim, int spacedim> class FiniteElement;
template <typename Accessor> class TriaRawIterator;
{
namespace DoFHandler
{
- template <class DH, bool lda=false>
+ template <typename DoFHandlerType, bool lda=false>
struct Iterators;
* @author Wolfgang Bangerth, Oliver Kayser-Herold, Guido Kanschat, 1998,
* 2003, 2008, 2010
*/
- template <template <int, int> class DH, int spacedim, bool lda>
- struct Iterators<DH<1, spacedim>, lda>
+ template <template <int, int> class DoFHandlerType, int spacedim, bool lda>
+ struct Iterators<DoFHandlerType<1, spacedim>, lda>
{
- typedef DH<1,spacedim> DoFHandler_type;
+ typedef DoFHandlerType<1,spacedim> DoFHandler_type;
typedef dealii::DoFCellAccessor<DoFHandler_type, lda> CellAccessor;
typedef dealii::DoFAccessor<0,DoFHandler_type, lda> FaceAccessor;
* @author Wolfgang Bangerth, Oliver Kayser-Herold, Guido Kanschat, 1998,
* 2003, 2008, 2010
*/
- template <template <int, int> class DH, int spacedim, bool lda>
- struct Iterators<DH<2, spacedim>, lda>
+ template <template <int, int> class DoFHandlerType, int spacedim, bool lda>
+ struct Iterators<DoFHandlerType<2, spacedim>, lda>
{
- typedef DH<2,spacedim> DoFHandler_type;
+ typedef DoFHandlerType<2,spacedim> DoFHandler_type;
typedef dealii::DoFCellAccessor<DoFHandler_type, lda> CellAccessor;
typedef dealii::DoFAccessor<1, DoFHandler_type, lda> FaceAccessor;
* @author Wolfgang Bangerth, Oliver Kayser-Herold, Guido Kanschat, 1998,
* 2003, 2008, 2010
*/
- template <template <int, int> class DH, int spacedim, bool lda>
- struct Iterators<DH<3, spacedim>, lda>
+ template <template <int, int> class DoFHandlerType, int spacedim, bool lda>
+ struct Iterators<DoFHandlerType<3, spacedim>, lda>
{
- typedef DH<3, spacedim> DoFHandler_type;
+ typedef DoFHandlerType<3, spacedim> DoFHandler_type;
typedef dealii::DoFCellAccessor<DoFHandler_type, lda> CellAccessor;
typedef dealii::DoFAccessor<2, DoFHandler_type, lda> FaceAccessor;
* comparison of various algorithms in the documentation of the
* DoFRenumbering namespace.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- Cuthill_McKee (DH &dof_handler,
- const bool reversed_numbering = false,
- const bool use_constraints = false);
+ Cuthill_McKee (DoFHandlerType &dof_handler,
+ const bool reversed_numbering = false,
+ const bool use_constraints = false);
/**
* Computes the renumbering vector needed by the Cuthill_McKee() function.
* Does not perform the renumbering on the DoFHandler dofs but returns the
* renumbering vector.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &,
- const bool reversed_numbering = false,
- const bool use_constraints = false);
+ const DoFHandlerType &,
+ const bool reversed_numbering = false,
+ const bool use_constraints = false);
/**
* Renumber the degrees of freedom based on the BOOST implementation of
*
* This algorithm is used in step-22.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- king_ordering (DH &dof_handler,
- const bool reversed_numbering = false,
- const bool use_constraints = false);
+ king_ordering (DoFHandlerType &dof_handler,
+ const bool reversed_numbering = false,
+ const bool use_constraints = false);
/**
* Compute the renumbering for the King algorithm but do not actually
* renumber the degrees of freedom in the DoF handler argument.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_king_ordering (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &,
- const bool reversed_numbering = false,
- const bool use_constraints = false);
+ const DoFHandlerType &,
+ const bool reversed_numbering = false,
+ const bool use_constraints = false);
/**
* Renumber the degrees of freedom based on the BOOST implementation of
* comparison of various algorithms in the documentation of the
* DoFRenumbering namespace.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- minimum_degree (DH &dof_handler,
- const bool reversed_numbering = false,
- const bool use_constraints = false);
+ minimum_degree (DoFHandlerType &dof_handler,
+ const bool reversed_numbering = false,
+ const bool use_constraints = false);
/**
* Compute the renumbering for the minimum degree algorithm but do not
* actually renumber the degrees of freedom in the DoF handler argument.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_minimum_degree (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &,
- const bool reversed_numbering = false,
- const bool use_constraints = false);
+ const DoFHandlerType &,
+ const bool reversed_numbering = false,
+ const bool use_constraints = false);
}
/**
* different on every processor unless you pass an empty list as is the
* default.)
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- Cuthill_McKee (DH &dof_handler,
- const bool reversed_numbering = false,
- const bool use_constraints = false,
- const std::vector<types::global_dof_index> &starting_indices = std::vector<types::global_dof_index>());
+ Cuthill_McKee (DoFHandlerType &dof_handler,
+ const bool reversed_numbering = false,
+ const bool use_constraints = false,
+ const std::vector<types::global_dof_index> &starting_indices
+ = std::vector<types::global_dof_index>());
/**
* Computes the renumbering vector needed by the Cuthill_McKee() function.
* Does not perform the renumbering on the DoFHandler dofs but returns the
* renumbering vector.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &,
- const bool reversed_numbering = false,
- const bool use_constraints = false,
- const std::vector<types::global_dof_index> &starting_indices = std::vector<types::global_dof_index>());
+ compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_dof_indices,
+ const DoFHandlerType &,
+ const bool reversed_numbering = false,
+ const bool use_constraints = false,
+ const std::vector<types::global_dof_index> &starting_indices
+ = std::vector<types::global_dof_index>());
/**
* Renumber the degrees of freedom according to the Cuthill-McKee method,
* See the general documentation of this class for details on the different
* methods.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- Cuthill_McKee (DH &dof_handler,
- const unsigned int level,
- const bool reversed_numbering = false,
- const std::vector<types::global_dof_index> &starting_indices = std::vector<types::global_dof_index> ());
+ Cuthill_McKee (DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const bool reversed_numbering = false,
+ const std::vector<types::global_dof_index> &starting_indices
+ = std::vector<types::global_dof_index> ());
/**
* @name Component-wise numberings
* multilevel discretization. The non-multigrid part of the the DoFHandler
* is not touched.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- component_wise (DH &dof_handler,
- const unsigned int level,
- const std::vector<unsigned int> &target_component = std::vector<unsigned int>());
+ component_wise (DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const std::vector<unsigned int> &target_component
+ = std::vector<unsigned int>());
/**
* Computes the renumbering vector needed by the component_wise() functions.
* cell iterator of that triangulation needs to be present in @p cell_order
* exactly once.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- cell_wise (DH &dof_handler,
- const std::vector<typename DH::active_cell_iterator> &cell_order);
+ cell_wise (DoFHandlerType &dof_handler,
+ const std::vector<typename DoFHandlerType::active_cell_iterator> &cell_order);
/**
* Compute a renumbering of degrees of freedom by cell. The function takes a
* the condition <code>renumbering[inverse_renumbering[i]] == i</code>
* will hold.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_cell_wise (std::vector<types::global_dof_index> &renumbering,
- std::vector<types::global_dof_index> &inverse_renumbering,
- const DH &dof_handler,
- const std::vector<typename DH::active_cell_iterator> &cell_order);
+ compute_cell_wise
+ (std::vector<types::global_dof_index> &renumbering,
+ std::vector<types::global_dof_index> &inverse_renumbering,
+ const DoFHandlerType &dof_handler,
+ const std::vector<typename DoFHandlerType::active_cell_iterator> &cell_order);
/**
* Like the other cell_wise() function, but for one level
* of a multilevel enumeration of degrees of freedom.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- cell_wise (DH &dof_handler,
- const unsigned int level,
- const std::vector<typename DH::level_cell_iterator> &cell_order);
+ cell_wise (DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const std::vector<typename DoFHandlerType::level_cell_iterator> &cell_order);
/**
* Like the other compute_cell_wise() function, but for one level
* of a multilevel enumeration of degrees of freedom.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_cell_wise (std::vector<types::global_dof_index> &renumbering,
- std::vector<types::global_dof_index> &inverse_renumbering,
- const DH &dof_handler,
- const unsigned int level,
- const std::vector<typename DH::level_cell_iterator> &cell_order);
+ compute_cell_wise
+ (std::vector<types::global_dof_index> &renumbering,
+ std::vector<types::global_dof_index> &inverse_renumbering,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const std::vector<typename DoFHandlerType::level_cell_iterator> &cell_order);
/**
* @}
* downstream location (e.g. those parallel to the flow direction, or
* several dofs within a FESystem) will be unaffected.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- downstream (DH &dof_handler,
- const Point<DH::space_dimension> &direction,
- const bool dof_wise_renumbering = false);
+ downstream (DoFHandlerType &dof_handler,
+ const Point<DoFHandlerType::space_dimension> &direction,
+ const bool dof_wise_renumbering = false);
/**
* Cell-wise downstream numbering with respect to a constant flow direction
* on one level. See the other function with the same name.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- downstream (DH &dof_handler,
- const unsigned int level,
- const Point<DH::space_dimension> &direction,
- const bool dof_wise_renumbering = false);
+ downstream (DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const Point<DoFHandlerType::space_dimension> &direction,
+ const bool dof_wise_renumbering = false);
/**
* Computes the renumbering vector needed by the downstream() function. Does
* not perform the renumbering on the DoFHandler dofs but returns the
* renumbering vector.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_downstream (std::vector<types::global_dof_index> &new_dof_indices,
- std::vector<types::global_dof_index> &reverse,
- const DH &dof_handler,
- const Point<DH::space_dimension> &direction,
- const bool dof_wise_renumbering);
+ compute_downstream (std::vector<types::global_dof_index> &new_dof_indices,
+ std::vector<types::global_dof_index> &reverse,
+ const DoFHandlerType &dof_handler,
+ const Point<DoFHandlerType::space_dimension> &direction,
+ const bool dof_wise_renumbering);
/**
* Computes the renumbering vector needed by the downstream() function. Does
* not perform the renumbering on the DoFHandler dofs but returns the
* renumbering vector.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_downstream (std::vector<types::global_dof_index> &new_dof_indices,
- std::vector<types::global_dof_index> &reverse,
- const DH &dof_handler,
- const unsigned int level,
- const Point<DH::space_dimension> &direction,
- const bool dof_wise_renumbering);
+ compute_downstream (std::vector<types::global_dof_index> &new_dof_indices,
+ std::vector<types::global_dof_index> &reverse,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const Point<DoFHandlerType::space_dimension> &direction,
+ const bool dof_wise_renumbering);
/**
* Cell-wise clockwise numbering.
* only works with Discontinuous Galerkin Finite Elements, i.e. all degrees
* of freedom have to be associated with the interior of the cell.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- clockwise_dg (DH &dof_handler,
- const Point<DH::space_dimension> ¢er,
- const bool counter = false);
+ clockwise_dg (DoFHandlerType &dof_handler,
+ const Point<DoFHandlerType::space_dimension> ¢er,
+ const bool counter = false);
/**
* Cell-wise clockwise numbering on one level. See the other function with
* the same name.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- clockwise_dg (DH &dof_handler,
- const unsigned int level,
- const Point<DH::space_dimension> ¢er,
- const bool counter = false);
+ clockwise_dg (DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const Point<DoFHandlerType::space_dimension> ¢er,
+ const bool counter = false);
/**
* Computes the renumbering vector needed by the clockwise_dg() functions.
* Does not perform the renumbering on the DoFHandler dofs but returns the
* renumbering vector.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_clockwise_dg (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler,
- const Point<DH::space_dimension> ¢er,
- const bool counter);
+ compute_clockwise_dg (std::vector<types::global_dof_index> &new_dof_indices,
+ const DoFHandlerType &dof_handler,
+ const Point<DoFHandlerType::space_dimension> ¢er,
+ const bool counter);
/**
* @}
* @pre The @p selected_dofs array must have as many elements as the @p
* dof_handler has degrees of freedom.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- sort_selected_dofs_back (DH &dof_handler,
+ sort_selected_dofs_back (DoFHandlerType &dof_handler,
const std::vector<bool> &selected_dofs);
/**
* @pre The @p selected_dofs array must have as many elements as the @p
* dof_handler has degrees of freedom on the given level.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- sort_selected_dofs_back (DH &dof_handler,
+ sort_selected_dofs_back (DoFHandlerType &dof_handler,
const std::vector<bool> &selected_dofs,
const unsigned int level);
* @pre The @p selected_dofs array must have as many elements as the @p
* dof_handler has degrees of freedom.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_sort_selected_dofs_back (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler,
- const std::vector<bool> &selected_dofs);
+ const DoFHandlerType &dof_handler,
+ const std::vector<bool> &selected_dofs);
/**
* This function computes the renumbering vector on each level needed by the
* @pre The @p selected_dofs array must have as many elements as the @p
* dof_handler has degrees of freedom on the given level.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_sort_selected_dofs_back (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler,
- const std::vector<bool> &selected_dofs,
- const unsigned int level);
+ const DoFHandlerType &dof_handler,
+ const std::vector<bool> &selected_dofs,
+ const unsigned int level);
/**
* Renumber the degrees of freedom in a random way. The result of this
* other threads running concurrently to this function also draw
* random numbers).
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- random (DH &dof_handler);
+ random (DoFHandlerType &dof_handler);
/**
* Computes the renumbering vector needed by the random() function. See
* perform the renumbering on the DoFHandler dofs but returns the
* renumbering vector.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_random (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler);
+ const DoFHandlerType &dof_handler);
/**
* @}
* belong to the same subdomain, then they will be in this order also after
* reordering.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- subdomain_wise (DH &dof_handler);
+ subdomain_wise (DoFHandlerType &dof_handler);
/**
* Computes the renumbering vector needed by the subdomain_wise() function.
* Does not perform the renumbering on the @p DoFHandler dofs but returns
* the renumbering vector.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_subdomain_wise (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler);
+ const DoFHandlerType &dof_handler);
/**
* @}
#ifndef DOXYGEN
namespace DoFRenumbering
{
- template <class DH>
+ template <typename DoFHandlerType>
void
inline
- downstream (DH &dof,
- const Point<DH::space_dimension> &direction,
- const bool dof_wise_renumbering)
+ downstream (DoFHandlerType &dof,
+ const Point<DoFHandlerType::space_dimension> &direction,
+ const bool dof_wise_renumbering)
{
std::vector<types::global_dof_index> renumbering(dof.n_dofs());
std::vector<types::global_dof_index> reverse(dof.n_dofs());
*
* @ingroup constraints
*/
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_sparsity_pattern (const DH &dof,
+ make_sparsity_pattern (const DoFHandlerType &dof,
SP &sparsity_pattern,
const ConstraintMatrix &constraints = ConstraintMatrix(),
const bool keep_constrained_dofs = true,
*
* @ingroup constraints
*/
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_sparsity_pattern (const DH &dof,
+ make_sparsity_pattern (const DoFHandlerType &dof,
const Table<2, Coupling> &coupling,
SP &sparsity_pattern,
const ConstraintMatrix &constraints = ConstraintMatrix(),
* whereas the ones that correspond to columns come from the second
* DoFHandler.
*/
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_sparsity_pattern (const DH &dof_row,
- const DH &dof_col,
+ make_sparsity_pattern (const DoFHandlerType &dof_row,
+ const DoFHandlerType &dof_col,
SP &sparsity);
/**
* class that satisfies similar requirements. It is assumed that the size of
* the sparsity pattern is already correct.
*/
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_boundary_sparsity_pattern (const DH &dof,
+ make_boundary_sparsity_pattern (const DoFHandlerType &dof,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SP &sparsity_pattern);
*
* For the type of the sparsity pattern, the same holds as said above.
*/
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_boundary_sparsity_pattern (const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &boundary_ids,
+ make_boundary_sparsity_pattern (const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &boundary_ids,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SP &sparsity);
* neighboring elements, the normal couplings and these extra matrix entries
* are considered.
*/
- template<class DH, class SP>
+ template<typename DoFHandlerType, class SP>
void
- make_flux_sparsity_pattern (const DH &dof_handler,
+ make_flux_sparsity_pattern (const DoFHandlerType &dof_handler,
SP &sparsity_pattern);
/**
*
* @ingroup constraints
*/
- template<class DH, class SP>
+ template<typename DoFHandlerType, class SP>
void
- make_flux_sparsity_pattern (const DH &dof_handler,
+ make_flux_sparsity_pattern (const DoFHandlerType &dof_handler,
SP &sparsity_pattern,
const ConstraintMatrix &constraints,
const bool keep_constrained_dofs = true,
*
* @todo Not implemented for hp::DoFHandler.
*/
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_flux_sparsity_pattern (const DH &dof,
+ make_flux_sparsity_pattern (const DoFHandlerType &dof,
SP &sparsity,
const Table<2,Coupling> &int_mask,
const Table<2,Coupling> &flux_mask);
*
* @ingroup constraints
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- make_hanging_node_constraints (const DH &dof_handler,
- ConstraintMatrix &constraints);
+ make_hanging_node_constraints (const DoFHandlerType &dof_handler,
+ ConstraintMatrix &constraints);
/**
* This function is used when different variables in a problem are
*
* @author Daniel Arndt, Matthias Maier, 2013 - 2015
*/
- template<typename DH>
+ template<typename DoFHandlerType>
void
make_periodicity_constraints
- (const std::vector<GridTools::PeriodicFacePair<typename DH::cell_iterator> >
+ (const std::vector<GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator> >
&periodic_faces,
dealii::ConstraintMatrix &constraint_matrix,
const ComponentMask &component_mask = ComponentMask(),
*
* @author Matthias Maier, 2012
*/
- template<typename DH>
+ template<typename DoFHandlerType>
void
make_periodicity_constraints
- (const DH &dof_handler,
- const types::boundary_id b_id1,
- const types::boundary_id b_id2,
- const int direction,
+ (const DoFHandlerType &dof_handler,
+ const types::boundary_id b_id1,
+ const types::boundary_id b_id2,
+ const int direction,
dealii::ConstraintMatrix &constraint_matrix,
const ComponentMask &component_mask = ComponentMask());
* @ref GlossPeriodicConstraints "Glossary entry on periodic boundary conditions"
* for further information.
*/
- template<typename DH>
+ template<typename DoFHandlerType>
void
make_periodicity_constraints
- (const DH &dof_handler,
- const types::boundary_id b_id,
- const int direction,
+ (const DoFHandlerType &dof_handler,
+ const types::boundary_id b_id,
+ const int direction,
dealii::ConstraintMatrix &constraint_matrix,
const ComponentMask &component_mask = ComponentMask());
* functions that are non-zero in more than one vector component (in deal.II
* speak: they are non-primitive).
*/
- template <class DH, typename Number>
+ template <typename DoFHandlerType, typename Number>
void
- distribute_cell_to_dof_vector (const DH &dof_handler,
+ distribute_cell_to_dof_vector (const DoFHandlerType &dof_handler,
const Vector<Number> &cell_data,
Vector<double> &dof_data,
const unsigned int component = 0);
* Do the same thing as the corresponding extract_dofs() function for one
* level of a multi-grid DoF numbering.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_level_dofs (const unsigned int level,
- const DH &dof,
- const ComponentMask &component_mask,
- std::vector<bool> &selected_dofs);
+ extract_level_dofs (const unsigned int level,
+ const DoFHandlerType &dof,
+ const ComponentMask &component_mask,
+ std::vector<bool> &selected_dofs);
/**
* Do the same thing as the corresponding extract_dofs() function for one
* level of a multi-grid DoF numbering.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_level_dofs (const unsigned int level,
- const DH &dof,
- const BlockMask &component_mask,
- std::vector<bool> &selected_dofs);
+ extract_level_dofs (const unsigned int level,
+ const DoFHandlerType &dof,
+ const BlockMask &component_mask,
+ std::vector<bool> &selected_dofs);
/**
* Extract all degrees of freedom which are at the boundary and belong to
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_boundary_dofs (const DH &dof_handler,
+ extract_boundary_dofs (const DoFHandlerType &dof_handler,
const ComponentMask &component_mask,
std::vector<bool> &selected_dofs,
const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_boundary_dofs (const DH &dof_handler,
+ extract_boundary_dofs (const DoFHandlerType &dof_handler,
const ComponentMask &component_mask,
IndexSet &selected_dofs,
const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_dofs_with_support_on_boundary (const DH &dof_handler,
+ extract_dofs_with_support_on_boundary (const DoFHandlerType &dof_handler,
const ComponentMask &component_mask,
std::vector<bool> &selected_dofs,
const std::set<types::boundary_id> &boundary_ids = std::set<types::boundary_id>());
* The main reason for this program is the use of the null space with the
* AMG preconditioner.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_constant_modes (const DH &dof_handler,
+ extract_constant_modes (const DoFHandlerType &dof_handler,
const ComponentMask &component_mask,
std::vector<std::vector<bool> > &constant_modes);
* If you want to get a unique association of degree of freedom with
* subdomains, use the @p get_subdomain_association function.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_subdomain_dofs (const DH &dof_handler,
- const types::subdomain_id subdomain_id,
- std::vector<bool> &selected_dofs);
+ extract_subdomain_dofs (const DoFHandlerType &dof_handler,
+ const types::subdomain_id subdomain_id,
+ std::vector<bool> &selected_dofs);
/**
* with all DoF indices. In either case, it equals what
* DoFHandler::locally_owned_dofs() returns.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_locally_owned_dofs (const DH &dof_handler,
- IndexSet &dof_set);
+ extract_locally_owned_dofs (const DoFHandlerType &dof_handler,
+ IndexSet &dof_set);
/**
* from the dof_indices_with_subdomain_association() function when called
* with the locally owned subdomain id.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_locally_active_dofs (const DH &dof_handler,
- IndexSet &dof_set);
+ extract_locally_active_dofs (const DoFHandlerType &dof_handler,
+ IndexSet &dof_set);
/**
* Extract the set of global DoF indices that are active on the current
* not artificial (see
* @ref GlossArtificialCell "the glossary").
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_locally_relevant_dofs (const DH &dof_handler,
- IndexSet &dof_set);
+ extract_locally_relevant_dofs (const DoFHandlerType &dof_handler,
+ IndexSet &dof_set);
/**
*
*
* @author Denis Davydov, 2015
*/
- template <class DH>
+ template <typename DoFHandlerType>
std::vector<IndexSet>
- locally_owned_dofs_per_subdomain (const DH &dof_handler);
+ locally_owned_dofs_per_subdomain (const DoFHandlerType &dof_handler);
/**
*
*
* @author Jean-Paul Pelteret, 2015
*/
- template <class DH>
+ template <typename DoFHandlerType>
std::vector<IndexSet>
- locally_relevant_dofs_per_subdomain (const DH &dof_handler);
+ locally_relevant_dofs_per_subdomain (const DoFHandlerType &dof_handler);
/**
* Same as extract_locally_relevant_dofs() but for multigrid DoFs
* for the given @p level.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_locally_relevant_level_dofs (const DH &dof_handler,
- const unsigned int level,
- IndexSet &dof_set);
+ extract_locally_relevant_level_dofs (const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ IndexSet &dof_set);
/**
* subdomain are not the same the DoFHandler class identifies as those it
* owns.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- get_subdomain_association (const DH &dof_handler,
+ get_subdomain_association (const DoFHandlerType &dof_handler,
std::vector<types::subdomain_id> &subdomain);
/**
* subdomain are not the same the DoFHandler class identifies as those it
* owns.
*/
- template <class DH>
+ template <typename DoFHandlerType>
unsigned int
- count_dofs_with_subdomain_association (const DH &dof_handler,
- const types::subdomain_id subdomain);
+ count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler,
+ const types::subdomain_id subdomain);
/**
* Count how many degrees of freedom are uniquely associated with the given
* subdomain are not the same the DoFHandler class identifies as those it
* owns.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- count_dofs_with_subdomain_association (const DH &dof_handler,
- const types::subdomain_id subdomain,
+ count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler,
+ const types::subdomain_id subdomain,
std::vector<unsigned int> &n_dofs_on_subdomain);
/**
* subdomain are not the same the DoFHandler class identifies as those it
* owns.
*/
- template <class DH>
+ template <typename DoFHandlerType>
IndexSet
- dof_indices_with_subdomain_association (const DH &dof_handler,
+ dof_indices_with_subdomain_association (const DoFHandlerType &dof_handler,
const types::subdomain_id subdomain);
// @}
/**
* @note The ordering of rows (cells) follows the ordering of the standard
* cell iterators.
*/
- template <class DH, class Sparsity>
- void make_cell_patches(Sparsity &block_list,
- const DH &dof_handler,
- const unsigned int level,
+ template <typename DoFHandlerType, class Sparsity>
+ void make_cell_patches(Sparsity &block_list,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
const std::vector<bool> &selected_dofs = std::vector<bool>(),
- types::global_dof_index offset = 0);
+ types::global_dof_index offset = 0);
/**
* Create an incidence matrix that for every vertex on a given level of a
* @arg <tt>single_cell_patches</tt>: if not true, patches containing a
* single cell are eliminated.
*/
- template <class DH>
- void make_vertex_patches(SparsityPattern &block_list,
- const DH &dof_handler,
- const unsigned int level,
- const bool interior_dofs_only,
- const bool boundary_patches = false,
- const bool level_boundary_patches = false,
- const bool single_cell_patches = false);
+ template <typename DoFHandlerType>
+ void make_vertex_patches(SparsityPattern &block_list,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const bool interior_dofs_only,
+ const bool boundary_patches = false,
+ const bool level_boundary_patches = false,
+ const bool single_cell_patches = false);
/**
* Create an incidence matrix that for every cell on a given level of a
* the domain, and thus need smoothing. This parameter has no effect if
* <tt>interior_dofs_only</tt> is false.
*/
- template <class DH>
- void make_child_patches(SparsityPattern &block_list,
- const DH &dof_handler,
- const unsigned int level,
- const bool interior_dofs_only,
- const bool boundary_dofs = false);
+ template <typename DoFHandlerType>
+ void make_child_patches(SparsityPattern &block_list,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const bool interior_dofs_only,
+ const bool boundary_dofs = false);
/**
* Create a block list with only a single patch, which in turn contains all
* @arg <tt>interior_dofs_only</tt>: if true, exclude degrees of freedom on
* the boundary of the domain.
*/
- template <class DH>
- void make_single_patch(SparsityPattern &block_list,
- const DH &dof_handler,
- const unsigned int level,
- const bool interior_dofs_only = false);
+ template <typename DoFHandlerType>
+ void make_single_patch(SparsityPattern &block_list,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const bool interior_dofs_only = false);
/**
* @}
* in @p target_component. If this is not the case, an assertion is thrown.
* The indices not targeted by target_components are left untouched.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- count_dofs_per_component (const DH &dof_handler,
+ count_dofs_per_component (const DoFHandlerType &dof_handler,
std::vector<types::global_dof_index> &dofs_per_component,
- const bool vector_valued_once = false,
- std::vector<unsigned int> target_component
+ const bool vector_valued_once = false,
+ std::vector<unsigned int> target_component
= std::vector<unsigned int>());
/**
* element used by the dof_handler argument has blocks, or alternatively as
* many blocks as are enumerated in the target_blocks argument if given.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- count_dofs_per_block (const DH &dof,
+ count_dofs_per_block (const DoFHandlerType &dof,
std::vector<types::global_dof_index> &dofs_per_block,
const std::vector<unsigned int> &target_block
= std::vector<unsigned int>());
* finite element. For a hp::DoFHandler, the values may be different,
* though.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- get_active_fe_indices (const DH &dof_handler,
+ get_active_fe_indices (const DoFHandlerType &dof_handler,
std::vector<unsigned int> &active_fe_indices);
/**
* between global degrees of freedom and the local ones.
*
* @tparam Container A type that is either DoFHandler or hp::DoFHandler. In
- * C++, the compiler can not determine the type of <code>DH</code> from the
+ * C++, the compiler can not determine the type of <code>DoFHandlerType</code> from the
* function call. You need to specify it as an explicit template argument
* following the function name.
- * @param patch A collection of cells within an object of type DH
+ * @param patch A collection of cells within an object of type DoFHandlerType
* @return The number of degrees of freedom associated with the cells of
* this patch.
*
*
* @author Arezou Ghesmati, Wolfgang Bangerth, 2014
*/
- template <class DH>
+ template <typename DoFHandlerType>
unsigned int
- count_dofs_on_patch (const std::vector<typename DH::active_cell_iterator> &patch);
+ count_dofs_on_patch (const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
/**
* Return the set of degrees of freedom that live on a set of cells (i.e., a
* system that results retains the block structure of the global system.
*
* @tparam Container A type that is either DoFHandler or hp::DoFHandler. In
- * C++, the compiler can not determine the type of <code>DH</code> from the
+ * C++, the compiler can not determine the type of <code>DoFHandlerType</code> from the
* function call. You need to specify it as an explicit template argument
* following the function name.
- * @param patch A collection of cells within an object of type DH
+ * @param patch A collection of cells within an object of type DoFHandlerType
* @return A list of those global degrees of freedom located on the patch,
* as defined above.
*
*
* @author Arezou Ghesmati, Wolfgang Bangerth, 2014
*/
- template <class DH>
+ template <typename DoFHandlerType>
std::vector<types::global_dof_index>
- get_dofs_on_patch (const std::vector<typename DH::active_cell_iterator> &patch);
+ get_dofs_on_patch (const std::vector<typename DoFHandlerType::active_cell_iterator> &patch);
/**
* @}
*
* Prior content of @p mapping is deleted.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- map_dof_to_boundary_indices (const DH &dof_handler,
- std::vector<types::global_dof_index> &mapping);
+ map_dof_to_boundary_indices (const DoFHandlerType &dof_handler,
+ std::vector<types::global_dof_index> &mapping);
/**
* Same as the previous function, except that only those parts of the
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- map_dof_to_boundary_indices (const DH &dof_handler,
- const std::set<types::boundary_id> &boundary_ids,
- std::vector<types::global_dof_index> &mapping);
+ map_dof_to_boundary_indices (const DoFHandlerType &dof_handler,
+ const std::set<types::boundary_id> &boundary_ids,
+ std::vector<types::global_dof_index> &mapping);
/**
* Return a list of support points (see this
* use here actually supports the notion of support points of all its
* components.
*/
- template <class DH, class Comp>
+ template <typename DoFHandlerType, class Comp>
void
- map_support_points_to_dofs (const Mapping<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof_handler,
- std::map<Point<DH::space_dimension>, types::global_dof_index, Comp> &point_to_index_map);
+ map_support_points_to_dofs
+ (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof_handler,
+ std::map<Point<DoFHandlerType::space_dimension>, types::global_dof_index, Comp> &point_to_index_map);
/**
* Map a coupling table from the user friendly organization by components to
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, int spacedim, template <int, int> class DH>
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType>
void
- make_zero_boundary_constraints (const DH<dim,spacedim> &dof,
- const types::boundary_id boundary_id,
- ConstraintMatrix &zero_boundary_constraints,
- const ComponentMask &component_mask = ComponentMask());
+ make_zero_boundary_constraints (const DoFHandlerType<dim,spacedim> &dof,
+ const types::boundary_id boundary_id,
+ ConstraintMatrix &zero_boundary_constraints,
+ const ComponentMask &component_mask = ComponentMask());
/**
* Do the same as the previous function, except do it for all parts of the
*
* @ingroup constraints
*/
- template <int dim, int spacedim, template <int, int> class DH>
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType>
void
- make_zero_boundary_constraints (const DH<dim,spacedim> &dof,
- ConstraintMatrix &zero_boundary_constraints,
- const ComponentMask &component_mask = ComponentMask());
+ make_zero_boundary_constraints (const DoFHandlerType<dim,spacedim> &dof,
+ ConstraintMatrix &zero_boundary_constraints,
+ const ComponentMask &component_mask = ComponentMask());
/**
}
- template <class DH, class Comp>
+ template <typename DoFHandlerType, class Comp>
void
- map_support_points_to_dofs (
- const Mapping<DH::dimension,DH::space_dimension> &mapping,
- const DH &dof_handler,
- std::map<Point<DH::space_dimension>, types::global_dof_index, Comp> &point_to_index_map)
+ map_support_points_to_dofs
+ (
+ const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof_handler,
+ std::map<Point<DoFHandlerType::space_dimension>, types::global_dof_index, Comp> &point_to_index_map)
{
// let the checking of arguments be
// done by the function first
// called
- std::vector<Point<DH::space_dimension> > support_points (dof_handler.n_dofs());
+ std::vector<Point<DoFHandlerType::space_dimension> > support_points (dof_handler.n_dofs());
map_dofs_to_support_points (mapping, dof_handler, support_points);
// now copy over the results of the
// previous function into the
* @p distribute function of your hanging node constraints object.
*/
template <int dim, int spacedim,
- template <int,int> class DH1,
- template <int,int> class DH2,
+ template <int, int> class DoFHandlerType1,
+ template <int, int> class DoFHandlerType2,
class InVector, class OutVector>
void
- interpolate (const DH1<dim,spacedim> &dof1,
- const InVector &u1,
- const DH2<dim,spacedim> &dof2,
- OutVector &u2);
+ interpolate (const DoFHandlerType1<dim,spacedim> &dof1,
+ const InVector &u1,
+ const DoFHandlerType2<dim,spacedim> &dof2,
+ OutVector &u2);
/**
* Gives the interpolation of a the @p dof1-function @p u1 to a @p
* at the discontinuities.
*/
template <int dim, int spacedim,
- template <int, int> class DH1,
- template <int, int> class DH2,
+ template <int, int> class DoFHandlerType1,
+ template <int, int> class DoFHandlerType2,
class InVector, class OutVector>
- void interpolate (const DH1<dim,spacedim> &dof1,
- const InVector &u1,
- const DH2<dim,spacedim> &dof2,
- const ConstraintMatrix &constraints,
- OutVector &u2);
+ void interpolate (const DoFHandlerType1<dim,spacedim> &dof1,
+ const InVector &u1,
+ const DoFHandlerType2<dim,spacedim> &dof2,
+ const ConstraintMatrix &constraints,
+ OutVector &u2);
/**
* Gives the interpolation of the @p fe1-function @p u1 to a @p
* type @p hp::DoFHandler.
*/
template <int dim,
- template <int> class DH,
+ template <int> class DoFHandlerType,
class InVector, class OutVector, int spacedim>
- void back_interpolate (const DH<dim> &dof1,
- const InVector &u1,
+ void back_interpolate (const DoFHandlerType<dim> &dof1,
+ const InVector &u1,
const FiniteElement<dim,spacedim> &fe2,
- OutVector &u1_interpolated);
+ OutVector &u1_interpolated);
/**
* Gives the interpolation of the @p dof1-function @p u1 to a @p
* associated with this object. It is assumed that the finite element used
* by the given cell is also the one used by this FEValues object.
*/
- template <template <int,int> class DH, bool level_dof_access>
- void reinit (const TriaIterator<DoFCellAccessor<DH<dim,spacedim>,level_dof_access> > &cell);
+ template <template <int, int> class DoFHandlerType, bool level_dof_access>
+ void reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>,level_dof_access> > &cell);
/**
* Reinitialize the gradients, Jacobi determinants, etc for the given cell
* Reinitialize the gradients, Jacobi determinants, etc for the face with
* number @p face_no of @p cell and the given finite element.
*/
- template <template <int,int> class DH, bool level_dof_access>
- void reinit (const TriaIterator<DoFCellAccessor<DH<dim,spacedim>,level_dof_access> > &cell,
+ template <template <int, int> class DoFHandlerType, bool level_dof_access>
+ void reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>,level_dof_access> > &cell,
const unsigned int face_no);
/**
* associated with this object. It is assumed that the finite element used
* by the given cell is also the one used by this FESubfaceValues object.
*/
- template <template <int,int> class DH, bool level_dof_access>
- void reinit (const TriaIterator<DoFCellAccessor<DH<dim,spacedim>,level_dof_access> > &cell,
- const unsigned int face_no,
- const unsigned int subface_no);
+ template <template <int, int> class DoFHandlerType, bool level_dof_access>
+ void reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>,level_dof_access> > &cell,
+ const unsigned int face_no,
+ const unsigned int subface_no);
/**
* Reinitialize the gradients, Jacobi determinants, etc for the given
*/
template <int dim, int spacedim=dim,
typename VectorType=Vector<double>,
- class DH=DoFHandler<dim,spacedim> >
+ typename DoFHandlerType=DoFHandler<dim,spacedim> >
class MappingFEField : public Mapping<dim,spacedim>
{
public:
*
* If an incompatible mask is passed, an exception is thrown.
*/
- MappingFEField (const DH &euler_dof_handler,
- const VectorType &euler_vector,
- const ComponentMask mask=ComponentMask());
+ MappingFEField (const DoFHandlerType &euler_dof_handler,
+ const VectorType &euler_vector,
+ const ComponentMask mask = ComponentMask());
/**
* Copy constructor.
*/
- MappingFEField (const MappingFEField<dim,spacedim,VectorType,DH> &mapping);
+ MappingFEField (const MappingFEField<dim,spacedim,VectorType,DoFHandlerType> &mapping);
/**
* Return a pointer to a copy of the present object. The caller of this copy
/**
* Reference to the vector of shifts.
*/
- SmartPointer<const VectorType, MappingFEField<dim,spacedim,VectorType,DH> > euler_vector;
+ SmartPointer<const VectorType, MappingFEField<dim,spacedim,VectorType,DoFHandlerType> > euler_vector;
/**
* A FiniteElement object which is only needed in 3D, since it knows how to
* prevent construction in 1D and 2D, but since memory and time requirements
* are not particularly high this seems unnecessary at the moment.
*/
- SmartPointer<const FiniteElement<dim,spacedim>, MappingFEField<dim,spacedim,VectorType,DH> > fe;
+ SmartPointer<const FiniteElement<dim,spacedim>, MappingFEField<dim,spacedim,VectorType,DoFHandlerType> > fe;
/**
* Pointer to the DoFHandler to which the mapping vector is associated.
*/
- SmartPointer<const DH,MappingFEField<dim,spacedim,VectorType,DH> > euler_dof_handler;
+ SmartPointer<const DoFHandlerType,MappingFEField<dim,spacedim,VectorType,DoFHandlerType> > euler_dof_handler;
private:
/**
* mapping is used unless a different value for this argument is
* specified.
*/
- template <class DH, bool lda>
+ template <typename DoFHandlerType, bool lda>
void
- reinit (const TriaIterator<DoFCellAccessor<DH,lda> > cell,
- const unsigned int q_index = numbers::invalid_unsigned_int,
+ reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType,lda> > cell,
+ const unsigned int q_index = numbers::invalid_unsigned_int,
const unsigned int mapping_index = numbers::invalid_unsigned_int,
- const unsigned int fe_index = numbers::invalid_unsigned_int);
+ const unsigned int fe_index = numbers::invalid_unsigned_int);
/**
* Like the previous function, but for non-hp iterators. The reason this
*/
void
reinit (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const unsigned int q_index = numbers::invalid_unsigned_int,
+ const unsigned int q_index = numbers::invalid_unsigned_int,
const unsigned int mapping_index = numbers::invalid_unsigned_int,
- const unsigned int fe_index = numbers::invalid_unsigned_int);
+ const unsigned int fe_index = numbers::invalid_unsigned_int);
};
* mapping is used unless a different value for this argument is
* specified.
*/
- template <class DH, bool lda>
+ template <typename DoFHandlerType, bool lda>
void
- reinit (const TriaIterator<DoFCellAccessor<DH,lda> > cell,
+ reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType,lda> > cell,
const unsigned int face_no,
- const unsigned int q_index = numbers::invalid_unsigned_int,
+ const unsigned int q_index = numbers::invalid_unsigned_int,
const unsigned int mapping_index = numbers::invalid_unsigned_int,
- const unsigned int fe_index = numbers::invalid_unsigned_int);
+ const unsigned int fe_index = numbers::invalid_unsigned_int);
/**
* Like the previous function, but for non-hp iterators. The reason this
void
reinit (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
- const unsigned int q_index = numbers::invalid_unsigned_int,
+ const unsigned int q_index = numbers::invalid_unsigned_int,
const unsigned int mapping_index = numbers::invalid_unsigned_int,
- const unsigned int fe_index = numbers::invalid_unsigned_int);
+ const unsigned int fe_index = numbers::invalid_unsigned_int);
};
* mapping is used unless a different value for this argument is
* specified.
*/
- template <class DH, bool lda>
+ template <typename DoFHandlerType, bool lda>
void
- reinit (const TriaIterator<DoFCellAccessor<DH,lda> > cell,
+ reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType,lda> > cell,
const unsigned int face_no,
const unsigned int subface_no,
- const unsigned int q_index = numbers::invalid_unsigned_int,
+ const unsigned int q_index = numbers::invalid_unsigned_int,
const unsigned int mapping_index = numbers::invalid_unsigned_int,
- const unsigned int fe_index = numbers::invalid_unsigned_int);
+ const unsigned int fe_index = numbers::invalid_unsigned_int);
/**
* Like the previous function, but for non-hp iterators. The reason this
reinit (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const unsigned int q_index = numbers::invalid_unsigned_int,
+ const unsigned int q_index = numbers::invalid_unsigned_int,
const unsigned int mapping_index = numbers::invalid_unsigned_int,
- const unsigned int fe_index = numbers::invalid_unsigned_int);
+ const unsigned int fe_index = numbers::invalid_unsigned_int);
};
}
* also read from vectors (but less efficient than with data coming from
* MatrixFree).
*/
- template <class DH, bool level_dof_access>
- void reinit (const TriaIterator<DoFCellAccessor<DH,level_dof_access> > &cell);
+ template <typename DoFHandlerType, bool level_dof_access>
+ void reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType,level_dof_access> > &cell);
/**
* Initialize the data to the current cell using a TriaIterator object as
template <int dim, int n_components_, typename Number>
-template <typename DH, bool level_dof_access>
+template <typename DoFHandlerType, bool level_dof_access>
inline
void
FEEvaluationBase<dim,n_components_,Number>
-::reinit (const TriaIterator<DoFCellAccessor<DH,level_dof_access> > &cell)
+::reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType,level_dof_access> > &cell)
{
Assert(matrix_info == 0,
ExcMessage("Cannot use initialization from cell iterator if "
* used, which gets the partitioning information builtin into the
* DoFHandler.
*/
- template <typename DH, typename QuadratureType>
+ template <typename DoFHandlerType, typename QuadratureType>
void reinit (const Mapping<dim> &mapping,
- const DH &dof_handler,
+ const DoFHandlerType &dof_handler,
const ConstraintMatrix &constraint,
const IndexSet &locally_owned_dofs,
const QuadratureType &quad,
* Initializes the data structures. Same as above, but with index set stored
* in the DoFHandler for describing the locally owned degrees of freedom.
*/
- template <typename DH, typename QuadratureType>
+ template <typename DoFHandlerType, typename QuadratureType>
void reinit (const Mapping<dim> &mapping,
- const DH &dof_handler,
+ const DoFHandlerType &dof_handler,
const ConstraintMatrix &constraint,
const QuadratureType &quad,
const AdditionalData additional_data = AdditionalData());
/**
* Initializes the data structures. Same as above, but using a $Q_1$ mapping.
*/
- template <typename DH, typename QuadratureType>
- void reinit (const DH &dof_handler,
+ template <typename DoFHandlerType, typename QuadratureType>
+ void reinit (const DoFHandlerType &dof_handler,
const ConstraintMatrix &constraint,
const QuadratureType &quad,
const AdditionalData additional_data = AdditionalData());
* used, which gets the partitioning information from the DoFHandler. This
* is the most general initialization function.
*/
- template <typename DH, typename QuadratureType>
+ template <typename DoFHandlerType, typename QuadratureType>
void reinit (const Mapping<dim> &mapping,
- const std::vector<const DH *> &dof_handler,
+ const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const std::vector<IndexSet> &locally_owned_set,
const std::vector<QuadratureType> &quad,
* description of the locally owned range of degrees of freedom is taken
* from the DoFHandler.
*/
- template <typename DH, typename QuadratureType>
+ template <typename DoFHandlerType, typename QuadratureType>
void reinit (const Mapping<dim> &mapping,
- const std::vector<const DH *> &dof_handler,
+ const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const std::vector<QuadratureType> &quad,
const AdditionalData additional_data = AdditionalData());
/**
* Initializes the data structures. Same as above, but using a $Q_1$ mapping.
*/
- template <typename DH, typename QuadratureType>
- void reinit (const std::vector<const DH *> &dof_handler,
+ template <typename DoFHandlerType, typename QuadratureType>
+ void reinit (const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const std::vector<QuadratureType> &quad,
const AdditionalData additional_data = AdditionalData());
* as might be necessary when several components in a vector-valued problem
* are integrated together based on the same quadrature formula.
*/
- template <typename DH, typename QuadratureType>
+ template <typename DoFHandlerType, typename QuadratureType>
void reinit (const Mapping<dim> &mapping,
- const std::vector<const DH *> &dof_handler,
+ const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const QuadratureType &quad,
const AdditionalData additional_data = AdditionalData());
/**
* Initializes the data structures. Same as above, but using a $Q_1$ mapping.
*/
- template <typename DH, typename QuadratureType>
- void reinit (const std::vector<const DH *> &dof_handler,
+ template <typename DoFHandlerType, typename QuadratureType>
+ void reinit (const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const QuadratureType &quad,
const AdditionalData additional_data = AdditionalData());
{
namespace MatrixFree
{
- template <typename DH>
+ template <typename DoFHandlerType>
inline
std::vector<IndexSet>
- extract_locally_owned_index_sets (const std::vector<const DH *> &dofh,
+ extract_locally_owned_index_sets (const std::vector<const DoFHandlerType *> &dofh,
const unsigned int level)
{
std::vector<IndexSet> locally_owned_set;
template <int dim, typename Number>
-template <typename DH, typename QuadratureType>
+template <typename DoFHandlerType, typename QuadratureType>
void MatrixFree<dim,Number>::
-reinit(const DH &dof_handler,
+reinit(const DoFHandlerType &dof_handler,
const ConstraintMatrix &constraints_in,
const QuadratureType &quad,
const typename MatrixFree<dim,Number>::AdditionalData additional_data)
{
- std::vector<const DH *> dof_handlers;
+ std::vector<const DoFHandlerType *> dof_handlers;
std::vector<const ConstraintMatrix *> constraints;
std::vector<QuadratureType> quads;
template <int dim, typename Number>
-template <typename DH, typename QuadratureType>
+template <typename DoFHandlerType, typename QuadratureType>
void MatrixFree<dim,Number>::
reinit(const Mapping<dim> &mapping,
- const DH &dof_handler,
+ const DoFHandlerType &dof_handler,
const ConstraintMatrix &constraints_in,
const QuadratureType &quad,
const typename MatrixFree<dim,Number>::AdditionalData additional_data)
{
- std::vector<const DH *> dof_handlers;
+ std::vector<const DoFHandlerType *> dof_handlers;
std::vector<const ConstraintMatrix *> constraints;
std::vector<QuadratureType> quads;
template <int dim, typename Number>
-template <typename DH, typename QuadratureType>
+template <typename DoFHandlerType, typename QuadratureType>
void MatrixFree<dim,Number>::
-reinit(const std::vector<const DH *> &dof_handler,
+reinit(const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const std::vector<QuadratureType> &quad,
const typename MatrixFree<dim,Number>::AdditionalData additional_data)
template <int dim, typename Number>
-template <typename DH, typename QuadratureType>
+template <typename DoFHandlerType, typename QuadratureType>
void MatrixFree<dim,Number>::
-reinit(const std::vector<const DH *> &dof_handler,
+reinit(const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const QuadratureType &quad,
const typename MatrixFree<dim,Number>::AdditionalData additional_data)
template <int dim, typename Number>
-template <typename DH, typename QuadratureType>
+template <typename DoFHandlerType, typename QuadratureType>
void MatrixFree<dim,Number>::
reinit(const Mapping<dim> &mapping,
- const std::vector<const DH *> &dof_handler,
+ const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const QuadratureType &quad,
const typename MatrixFree<dim,Number>::AdditionalData additional_data)
template <int dim, typename Number>
-template <typename DH, typename QuadratureType>
+template <typename DoFHandlerType, typename QuadratureType>
void MatrixFree<dim,Number>::
reinit(const Mapping<dim> &mapping,
- const std::vector<const DH *> &dof_handler,
+ const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const std::vector<QuadratureType> &quad,
const typename MatrixFree<dim,Number>::AdditionalData additional_data)
template <int dim, typename Number>
-template <typename DH, typename QuadratureType>
+template <typename DoFHandlerType, typename QuadratureType>
void MatrixFree<dim,Number>::
reinit(const Mapping<dim> &mapping,
- const std::vector<const DH *> &dof_handler,
+ const std::vector<const DoFHandlerType *> &dof_handler,
const std::vector<const ConstraintMatrix *> &constraint,
const std::vector<IndexSet> &locally_owned_set,
const std::vector<QuadratureType> &quad,
* There is no need to consider hanging nodes here, since only one level is
* considered.
*/
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_sparsity_pattern (const DH &dof_handler,
+ make_sparsity_pattern (const DoFHandlerType &dof_handler,
SP &sparsity,
const unsigned int level);
* Result is a vector containing for each level a vector containing the
* number of dofs for each block (access is <tt>result[level][block]</tt>).
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- count_dofs_per_block (const DH &dof_handler,
+ count_dofs_per_block (const DoFHandlerType &dof_handler,
std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
- std::vector<unsigned int> target_block = std::vector<unsigned int>());
+ std::vector<unsigned int> target_block = std::vector<unsigned int>());
/**
* Count the dofs component-wise on each level.
typedef ::dealii::SparsityPattern Sparsity;
typedef ::dealii::SparseMatrix<typename VectorType::value_type> Matrix;
- template <class DSP, class DH>
- static void reinit(Matrix &matrix, Sparsity &sparsity, int level, const DSP &dsp, const DH &)
+ template <class DSP, typename DoFHandlerType>
+ static void reinit(Matrix &matrix, Sparsity &sparsity, int level, const DSP &dsp, const DoFHandlerType &)
{
sparsity.copy_from (dsp);
(void)level;
typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
- template <class DSP, class DH>
- static void reinit(Matrix &matrix, Sparsity &, int level, const DSP &dsp, DH &dh)
+ template <class DSP, typename DoFHandlerType>
+ static void reinit(Matrix &matrix, Sparsity &, int level, const DSP &dsp, DoFHandlerType &dh)
{
matrix.reinit(dh.locally_owned_mg_dofs(level+1),
dh.locally_owned_mg_dofs(level),
typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
- template <class DSP, class DH>
- static void reinit(Matrix &matrix, Sparsity &, int level, const DSP &dsp, DH &dh)
+ template <class DSP, typename DoFHandlerType>
+ static void reinit(Matrix &matrix, Sparsity &, int level, const DSP &dsp, DoFHandlerType &dh)
{
matrix.reinit(dh.locally_owned_mg_dofs(level+1),
dh.locally_owned_mg_dofs(level),
typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
- template <class DSP, class DH>
- static void reinit(Matrix &, Sparsity &, int /*level*/, const DSP &, DH &)
+ template <class DSP, typename DoFHandlerType>
+ static void reinit(Matrix &, Sparsity &, int /*level*/, const DSP &, DoFHandlerType &)
{
}
};
public:
void resize(const unsigned int minlevel, const unsigned int maxlevel);
- template <class DH>
- void reinit(const DH &dof_handler);
+ template <typename DoFHandlerType>
+ void reinit(const DoFHandlerType &dof_handler);
void set_zero();
template <typename number>
- template <class DH>
+ template <typename DoFHandlerType>
void
- SparseMatrixCollection<number>::reinit(const DH &dof_handler)
+ SparseMatrixCollection<number>::reinit(const DoFHandlerType &dof_handler)
{
AssertIndexRange(sparsity.max_level(), dof_handler.get_tria().n_levels());
*
* @pre This class only makes sense if the first template argument,
* <code>dim</code> equals the dimension of the DoFHandler type given as the
- * second template argument, i.e., if <code>dim == DH::dimension</code>. This
+ * second template argument, i.e., if <code>dim == DoFHandlerType::dimension</code>. This
* redundancy is a historical relic from the time where the library had only a
* single DoFHandler class and this class consequently only a single template
* argument.
* @ingroup output
* @author Wolfgang Bangerth, 1999
*/
-template <int dim, class DH=DoFHandler<dim> >
-class DataOut : public DataOut_DoFData<DH, DH::dimension, DH::space_dimension>
+template <int dim, typename DoFHandlerType=DoFHandler<dim> >
+class DataOut : public DataOut_DoFData<DoFHandlerType, DoFHandlerType::dimension, DoFHandlerType::space_dimension>
{
public:
/**
* Typedef to the iterator type of the dof handler class under
* consideration.
*/
- typedef typename DataOut_DoFData<DH,DH::dimension,DH::space_dimension>::cell_iterator cell_iterator;
- typedef typename DataOut_DoFData<DH,DH::dimension,DH::space_dimension>::active_cell_iterator active_cell_iterator;
+ typedef typename DataOut_DoFData<DoFHandlerType, DoFHandlerType::dimension, DoFHandlerType::space_dimension>::cell_iterator
+ cell_iterator;
+ typedef typename DataOut_DoFData<DoFHandlerType, DoFHandlerType::dimension, DoFHandlerType::space_dimension>::active_cell_iterator
+ active_cell_iterator;
/**
* Enumeration describing the region of the domain in which curved cells
* @todo The @p mapping argument should be replaced by a
* hp::MappingCollection in case of a hp::DoFHandler.
*/
- virtual void build_patches (const Mapping<DH::dimension,DH::space_dimension> &mapping,
+ virtual void build_patches (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
const unsigned int n_subdivisions = 0,
const CurvedCellRegion curved_region = curved_boundary);
* The function does not take a CopyData object but rather allocates one
* on its own stack for memory access efficiency reasons.
*/
- void build_one_patch (const std::pair<cell_iterator, unsigned int> *cell_and_index,
- internal::DataOut::ParallelData<DH::dimension, DH::space_dimension> &scratch_data,
- const unsigned int n_subdivisions,
- const CurvedCellRegion curved_cell_region,
- std::vector<DataOutBase::Patch<DH::dimension, DH::space_dimension> > &patches);
+ void build_one_patch
+ (const std::pair<cell_iterator, unsigned int> *cell_and_index,
+ internal::DataOut::ParallelData<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &scratch_data,
+ const unsigned int n_subdivisions,
+ const CurvedCellRegion curved_cell_region,
+ std::vector<DataOutBase::Patch<DoFHandlerType::dimension, DoFHandlerType::space_dimension> > &patches);
};
*
* @author Wolfgang Bangerth, 2004
*/
- template <class DH>
+ template <typename DoFHandlerType>
class DataEntryBase
{
public:
* the vector and their interpretation as scalar or vector data. This
* constructor assumes that no postprocessor is going to be used.
*/
- DataEntryBase (const DH *dofs,
+ DataEntryBase (const DoFHandlerType *dofs,
const std::vector<std::string> &names,
const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation);
* case, the names and vector declarations are going to be acquired from
* the postprocessor.
*/
- DataEntryBase (const DH *dofs,
- const DataPostprocessor<DH::space_dimension> *data_postprocessor);
+ DataEntryBase (const DoFHandlerType *dofs,
+ const DataPostprocessor<DoFHandlerType::space_dimension> *data_postprocessor);
/**
* Destructor made virtual.
*/
virtual
void
- get_function_values (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<double> &patch_values) const = 0;
+ get_function_values
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<double> &patch_values) const = 0;
/**
* Given a FEValuesBase object, extract the values on the present cell
*/
virtual
void
- get_function_values (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<dealii::Vector<double> > &patch_values_system) const = 0;
+ get_function_values
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<dealii::Vector<double> > &patch_values_system) const = 0;
/**
* Given a FEValuesBase object, extract the gradients on the present
*/
virtual
void
- get_function_gradients (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<Tensor<1,DH::space_dimension> > &patch_gradients) const = 0;
+ get_function_gradients
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<Tensor<1,DoFHandlerType::space_dimension> > &patch_gradients) const = 0;
/**
* Given a FEValuesBase object, extract the gradients on the present
*/
virtual
void
- get_function_gradients (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<std::vector<Tensor<1,DH::space_dimension> > > &patch_gradients_system) const = 0;
+ get_function_gradients
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<std::vector<Tensor<1,DoFHandlerType::space_dimension> > > &patch_gradients_system) const = 0;
/**
* Given a FEValuesBase object, extract the second derivatives on the
*/
virtual
void
- get_function_hessians (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<Tensor<2,DH::space_dimension> > &patch_hessians) const = 0;
+ get_function_hessians
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<Tensor<2,DoFHandlerType::space_dimension> > &patch_hessians) const = 0;
/**
* Given a FEValuesBase object, extract the second derivatives on the
*/
virtual
void
- get_function_hessians (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<std::vector< Tensor<2,DH::space_dimension> > > &patch_hessians_system) const = 0;
+ get_function_hessians
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<std::vector< Tensor<2,DoFHandlerType::space_dimension> > > &patch_hessians_system) const = 0;
/**
* Clear all references to the vectors.
/**
* Pointer to the DoFHandler object that the vector is based on.
*/
- SmartPointer<const DH> dof_handler;
+ SmartPointer<const DoFHandlerType> dof_handler;
/**
* Names of the components of this data vector.
* Pointer to a DataPostprocessing object which shall be applied to this
* data vector.
*/
- SmartPointer<const dealii::DataPostprocessor<DH::space_dimension> > postprocessor;
+ SmartPointer<const dealii::DataPostprocessor<DoFHandlerType::space_dimension> > postprocessor;
/**
* Number of output variables this dataset provides (either number of
ParallelDataBase (const ParallelDataBase &data);
- template <typename DH>
- void reinit_all_fe_values(std::vector<std_cxx11::shared_ptr<DataEntryBase<DH> > > &dof_data,
+ template <typename DoFHandlerType>
+ void reinit_all_fe_values(std::vector<std_cxx11::shared_ptr<DataEntryBase<DoFHandlerType> > > &dof_data,
const typename dealii::Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face = numbers::invalid_unsigned_int);
* @ingroup output
* @author Wolfgang Bangerth, 1999
*/
-template <class DH, int patch_dim, int patch_space_dim=patch_dim>
+template <typename DoFHandlerType, int patch_dim, int patch_space_dim=patch_dim>
class DataOut_DoFData : public DataOutInterface<patch_dim,patch_space_dim>
{
public:
* Typedef to the iterator type of the dof handler class under
* consideration.
*/
- typedef typename Triangulation<DH::dimension,DH::space_dimension>::cell_iterator cell_iterator;
- typedef typename Triangulation<DH::dimension,DH::space_dimension>::active_cell_iterator active_cell_iterator;
+ typedef typename Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::cell_iterator cell_iterator;
+ typedef typename Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::active_cell_iterator active_cell_iterator;
public:
* This call is optional: If you add data vectors with specified DoFHandler
* object, then that contains all information needed to generate the output.
*/
- void attach_dof_handler (const DH &);
+ void attach_dof_handler (const DoFHandlerType &);
/**
* Designate a triangulation to be used to extract geometry data and the
* This call is useful when you only output cell vectors and no DoFHandler
* at all, in which case it provides the geometry.
*/
- void attach_triangulation (const Triangulation<DH::dimension,
- DH::space_dimension> &);
+ void attach_triangulation (const Triangulation<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension> &);
/**
* Add a data vector together with its name.
* methods above is skipped.
*/
template <class VectorType>
- void add_data_vector (const DH &dof_handler,
+ void add_data_vector (const DoFHandlerType &dof_handler,
const VectorType &data,
const std::vector<std::string> &names,
const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation
* @p dof_handler given and a single data name.
*/
template <class VectorType>
- void add_data_vector (const DH &dof_handler,
+ void add_data_vector (const DoFHandlerType &dof_handler,
const VectorType &data,
const std::string &name,
const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation
*/
template <class VectorType>
void add_data_vector (const VectorType &data,
- const DataPostprocessor<DH::space_dimension> &data_postprocessor);
+ const DataPostprocessor<DoFHandlerType::space_dimension> &data_postprocessor);
/**
* Same function as above, but with a DoFHandler object that does not need
* vector, not other solution vectors or DoFHandlers.
*/
template <class VectorType>
- void add_data_vector (const DH &dof_handler,
+ void add_data_vector (const DoFHandlerType &dof_handler,
const VectorType &data,
- const DataPostprocessor<DH::space_dimension> &data_postprocessor);
+ const DataPostprocessor<DoFHandlerType::space_dimension> &data_postprocessor);
/**
* Release the pointers to the data vectors. This allows output of a new set
* This function will fail if either this or the other object did not yet
* set up any patches.
*/
- template <class DH2>
- void merge_patches (const DataOut_DoFData<DH2,patch_dim,patch_space_dim> &source,
+ template <typename DoFHandlerType2>
+ void merge_patches (const DataOut_DoFData<DoFHandlerType2,patch_dim,patch_space_dim> &source,
const Point<patch_space_dim> &shift = Point<patch_space_dim>());
/**
/**
* Pointer to the triangulation object.
*/
- SmartPointer<const Triangulation<DH::dimension,DH::space_dimension> > triangulation;
+ SmartPointer<const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> > triangulation;
/**
* Pointer to the optional handler object.
*/
- SmartPointer<const DH> dofs;
+ SmartPointer<const DoFHandlerType> dofs;
/**
* List of data elements with vectors of values for each degree of freedom.
*/
- std::vector<std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> > > dof_data;
+ std::vector<std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> > > dof_data;
/**
* List of data elements with vectors of values for each cell.
*/
- std::vector<std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> > > cell_data;
+ std::vector<std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> > > cell_data;
/**
* This is a list of patches that is created each time build_patches() is
* Extracts the finite elements stored in the dof_data object, including a
* dummy object of FE_DGQ<dim>(0) in case only the triangulation is used.
*/
- std::vector<std_cxx11::shared_ptr<dealii::hp::FECollection<DH::dimension,DH::space_dimension> > >
+ std::vector<std_cxx11::shared_ptr<dealii::hp::FECollection<DoFHandlerType::dimension,DoFHandlerType::space_dimension> > >
get_finite_elements() const;
/**
// -------------------- template and inline functions ------------------------
-template <class DH, int patch_dim, int patch_space_dim>
-template <class DH2>
+template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <typename DoFHandlerType2>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-merge_patches (const DataOut_DoFData<DH2,patch_dim,patch_space_dim> &source,
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
+merge_patches (const DataOut_DoFData<DoFHandlerType2,patch_dim,patch_space_dim> &source,
const Point<patch_space_dim> &shift)
{
const std::vector<Patch> source_patches = source.get_patches ();
*
* @pre This class only makes sense if the first template argument,
* <code>dim</code> equals the dimension of the DoFHandler type given as the
- * second template argument, i.e., if <code>dim == DH::dimension</code>. This
+ * second template argument, i.e., if <code>dim == DoFHandlerType::dimension</code>. This
* redundancy is a historical relic from the time where the library had only a
* single DoFHandler class and this class consequently only a single template
* argument.
* @ingroup output
* @author Wolfgang Bangerth, Guido Kanschat, 2000, 2011
*/
-template <int dim, class DH=DoFHandler<dim> >
-class DataOutFaces : public DataOut_DoFData<DH,DH::dimension-1,
- DH::dimension>
+template <int dim, typename DoFHandlerType=DoFHandler<dim> >
+class DataOutFaces : public DataOut_DoFData<DoFHandlerType,DoFHandlerType::dimension-1,
+ DoFHandlerType::dimension>
{
public:
/**
* An abbreviation for the dimension of the DoFHandler object we work with.
* Faces are then <code>dimension-1</code> dimensional objects.
*/
- static const unsigned int dimension = DH::dimension;
+ static const unsigned int dimension = DoFHandlerType::dimension;
/**
* An abbreviation for the spatial dimension within which the triangulation
* and DoFHandler are embedded in.
*/
- static const unsigned int space_dimension = DH::space_dimension;
+ static const unsigned int space_dimension = DoFHandlerType::space_dimension;
/**
* Typedef to the iterator type of the dof handler class under
* consideration.
*/
- typedef typename DataOut_DoFData<DH,dimension-1,
+ typedef typename DataOut_DoFData<DoFHandlerType,dimension-1,
dimension>::cell_iterator cell_iterator;
/**
*
* @pre This class only makes sense if the first template argument,
* <code>dim</code> equals the dimension of the DoFHandler type given as the
- * second template argument, i.e., if <code>dim == DH::dimension</code>. This
+ * second template argument, i.e., if <code>dim == DoFHandlerType::dimension</code>. This
* redundancy is a historical relic from the time where the library had only a
* single DoFHandler class and this class consequently only a single template
* argument.
* @ingroup output
* @author Wolfgang Bangerth, 2000
*/
-template <int dim, class DH=DoFHandler<dim> >
-class DataOutRotation : public DataOut_DoFData<DH,DH::dimension+1>
+template <int dim, typename DoFHandlerType=DoFHandler<dim> >
+class DataOutRotation : public DataOut_DoFData<DoFHandlerType,DoFHandlerType::dimension+1>
{
public:
/**
* An abbreviation for the dimension of the DoFHandler object we work with.
* Faces are then <code>dimension-1</code> dimensional objects.
*/
- static const unsigned int dimension = DH::dimension;
+ static const unsigned int dimension = DoFHandlerType::dimension;
/**
* An abbreviation for the spatial dimension within which the triangulation
* and DoFHandler are embedded in.
*/
- static const unsigned int space_dimension = DH::space_dimension;
+ static const unsigned int space_dimension = DoFHandlerType::space_dimension;
/**
* Typedef to the iterator type of the dof handler class under
* consideration.
*/
- typedef typename DataOut_DoFData<DH,dimension+1>::cell_iterator cell_iterator;
+ typedef typename DataOut_DoFData<DoFHandlerType,dimension+1>::cell_iterator cell_iterator;
/**
* This is the central function of this class since it builds the list of
* @ingroup output
* @author Wolfgang Bangerth, 1999
*/
-template <int dim, int spacedim=dim, class DH = DoFHandler<dim,spacedim> >
+template <int dim, int spacedim=dim, typename DoFHandlerType = DoFHandler<dim,spacedim> >
class DataOutStack : public DataOutInterface<dim+1>
{
public:
* This has to happen before adding data vectors for the present parameter
* value.
*/
- void attach_dof_handler (const DH &dof_handler);
+ void attach_dof_handler (const DoFHandlerType &dof_handler);
/**
* Declare a data vector. The @p vector_type argument determines whether the
* DoF handler to be used for the data corresponding to the present
* parameter value.
*/
- SmartPointer<const DH,DataOutStack<dim,spacedim,DH> > dof_handler;
+ SmartPointer<const DoFHandlerType,DataOutStack<dim,spacedim,DoFHandlerType> > dof_handler;
/**
* List of patches of all past and present parameter value data sets.
* @code
* --------------------------------------------------------
* An error occurred in line <749> of file <source/numerics/derivative_approximation.cc> in function
- * void DerivativeApproximation::approximate(const Mapping<dim,spacedim>&, const DH<dim,spacedim>&, const InputVector&, unsigned int, const
+ * void DerivativeApproximation::approximate(const Mapping<dim,spacedim>&, const DoFHandlerType<dim,spacedim>&, const InputVector&, unsigned int, const
* std::pair<unsigned int, unsigned int>&, Vector<float>&) [with DerivativeDescription = DerivativeApproximation::Gradient<3>, int
- * dim = 3, DH = DoFHandler, InputVector = Vector<double>]
+ * dim = 3, DoFHandlerType = DoFHandler, InputVector = Vector<double>]
* The violated condition was:
* determinant(Y) != 0
* The name and call sequence of the exception was:
* In a parallel computation the @p solution vector needs to contain the
* locally relevant unknowns.
*/
- template <int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_gradient (const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof,
- const InputVector &solution,
- Vector<float> &derivative_norm,
- const unsigned int component = 0);
+ approximate_gradient (const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof,
+ const InputVector &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component = 0);
/**
* Calls the @p interpolate function, see above, with
* <tt>mapping=MappingQGeneric@<dim@>(1)</tt>.
*/
- template <int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_gradient (const DH<dim,spacedim> &dof,
- const InputVector &solution,
- Vector<float> &derivative_norm,
- const unsigned int component = 0);
+ approximate_gradient (const DoFHandlerType<dim,spacedim> &dof,
+ const InputVector &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component = 0);
/**
* This function is the analogue to the one above, computing finite
* In a parallel computation the @p solution vector needs to contain the
* locally relevant unknowns.
*/
- template <int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_second_derivative (const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof,
- const InputVector &solution,
- Vector<float> &derivative_norm,
- const unsigned int component = 0);
+ approximate_second_derivative (const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof,
+ const InputVector &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component = 0);
/**
* Calls the @p interpolate function, see above, with
* <tt>mapping=MappingQGeneric@<dim@>(1)</tt>.
*/
- template <int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_second_derivative (const DH<dim,spacedim> &dof,
- const InputVector &solution,
- Vector<float> &derivative_norm,
- const unsigned int component = 0);
+ approximate_second_derivative (const DoFHandlerType<dim,spacedim> &dof,
+ const InputVector &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component = 0);
/**
* This function calculates the <tt>order</tt>-th order approximate
* In a parallel computation the @p solution vector needs to contain the
* locally relevant unknowns.
*/
- template <class DH, int dim, int spacedim, class InputVector, int order>
+ template <typename DoFHandlerType, int dim, int spacedim, class InputVector, int order>
void
- approximate_derivative_tensor(const Mapping<dim, spacedim> &mapping,
- const DH &dof,
- const InputVector &solution,
+ approximate_derivative_tensor
+ (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const InputVector &solution,
#ifndef _MSC_VER
- const typename DH::active_cell_iterator &cell,
+ const typename DoFHandlerType::active_cell_iterator &cell,
#else
- const TriaActiveIterator < dealii::DoFCellAccessor < DH, false > > &cell,
+ const TriaActiveIterator <dealii::DoFCellAccessor<DoFHandlerType, false> > &cell,
#endif
- Tensor<order, dim> &derivative,
- const unsigned int component = 0);
+ Tensor<order, dim> &derivative,
+ const unsigned int component = 0);
/**
* Same as above, with <tt>mapping=MappingQGeneric@<dim@>(1)</tt>.
*/
- template <class DH, int dim, int spacedim, class InputVector, int order>
+ template <typename DoFHandlerType, int dim, int spacedim, class InputVector, int order>
void
- approximate_derivative_tensor(const DH &dof,
- const InputVector &solution,
+ approximate_derivative_tensor
+ (const DoFHandlerType &dof,
+ const InputVector &solution,
#ifndef _MSC_VER
- const typename DH::active_cell_iterator &cell,
+ const typename DoFHandlerType::active_cell_iterator &cell,
#else
- const TriaActiveIterator < dealii::DoFCellAccessor < DH, false > > &cell,
+ const TriaActiveIterator<dealii::DoFCellAccessor<DoFHandlerType, false> > &cell,
#endif
- Tensor<order, dim> &derivative,
- const unsigned int component = 0);
+ Tensor<order, dim> &derivative,
+ const unsigned int component = 0);
/**
* Return the norm of the derivative.
* cell in the mesh as reported by
* parallel::distributed::Triangulation::n_locally_owned_active_cells().
*/
- template <typename InputVector, class DH>
- static void estimate (const Mapping<dim, spacedim> &mapping,
- const DH &dof,
- const Quadrature<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id,
- const Strategy strategy = cell_diameter_over_24);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const Quadrature<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Calls the @p estimate function, see above, with
* <tt>mapping=MappingQGeneric@<dim@>(1)</tt>.
*/
- template <typename InputVector, class DH>
- static void estimate (const DH &dof,
- const Quadrature<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id,
- const Strategy strategy = cell_diameter_over_24);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const DoFHandlerType &dof,
+ const Quadrature<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Same function as above, but accepts more than one solution vector and
* construct of vector of references, so we had to use a vector of
* pointers.)
*/
- template <typename InputVector, class DH>
- static void estimate (const Mapping<dim, spacedim> &mapping,
- const DH &dof,
- const Quadrature<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id,
- const Strategy strategy = cell_diameter_over_24);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const Quadrature<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Calls the @p estimate function, see above, with
* <tt>mapping=MappingQGeneric@<dim@>(1)</tt>.
*/
- template <typename InputVector, class DH>
- static void estimate (const DH &dof,
- const Quadrature<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id,
- const Strategy strategy = cell_diameter_over_24);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const DoFHandlerType &dof,
+ const Quadrature<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Equivalent to the set of functions above, except that this one takes a
* quadrature collection for hp finite element dof handlers.
*/
- template <typename InputVector, class DH>
- static void estimate (const Mapping<dim, spacedim> &mapping,
- const DH &dof,
- const hp::QCollection<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id,
- const Strategy strategy = cell_diameter_over_24);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const hp::QCollection<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Equivalent to the set of functions above, except that this one takes a
* quadrature collection for hp finite element dof handlers.
*/
- template <typename InputVector, class DH>
- static void estimate (const DH &dof,
- const hp::QCollection<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id,
- const Strategy strategy = cell_diameter_over_24);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const DoFHandlerType &dof,
+ const hp::QCollection<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Equivalent to the set of functions above, except that this one takes a
* quadrature collection for hp finite element dof handlers.
*/
- template <typename InputVector, class DH>
- static void estimate (const Mapping<dim, spacedim> &mapping,
- const DH &dof,
- const hp::QCollection<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id,
- const Strategy strategy = cell_diameter_over_24);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const hp::QCollection<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Equivalent to the set of functions above, except that this one takes a
* quadrature collection for hp finite element dof handlers.
*/
- template <typename InputVector, class DH>
- static void estimate (const DH &dof,
- const hp::QCollection<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id,
- const Strategy strategy = cell_diameter_over_24);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const DoFHandlerType &dof,
+ const hp::QCollection<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Exception
* respective parameter for compatibility with the function signature in the
* general case.
*/
- template <typename InputVector, class DH>
- static void estimate (const Mapping<1,spacedim> &mapping,
- const DH &dof,
- const Quadrature<0> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const Mapping<1,spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const Quadrature<0> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id);
/**
* Calls the @p estimate function, see above, with
* <tt>mapping=MappingQGeneric1<1>()</tt>.
*/
- template <typename InputVector, class DH>
- static void estimate (const DH &dof,
- const Quadrature<0> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const DoFHandlerType &dof,
+ const Quadrature<0> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id);
/**
* Same function as above, but accepts more than one solution vectors and
* construct of vector of references, so we had to use a vector of
* pointers.)
*/
- template <typename InputVector, class DH>
- static void estimate (const Mapping<1,spacedim> &mapping,
- const DH &dof,
- const Quadrature<0> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const Mapping<1,spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const Quadrature<0> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id);
/**
* Calls the @p estimate function, see above, with
* <tt>mapping=MappingQGeneric1<1>()</tt>.
*/
- template <typename InputVector, class DH>
- static void estimate (const DH &dof,
- const Quadrature<0> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const DoFHandlerType &dof,
+ const Quadrature<0> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id);
/**
* Equivalent to the set of functions above, except that this one takes a
* quadrature collection for hp finite element dof handlers.
*/
- template <typename InputVector, class DH>
- static void estimate (const Mapping<1,spacedim> &mapping,
- const DH &dof,
- const hp::QCollection<0> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const Mapping<1,spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const hp::QCollection<0> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id);
/**
* Equivalent to the set of functions above, except that this one takes a
* quadrature collection for hp finite element dof handlers.
*/
- template <typename InputVector, class DH>
- static void estimate (const DH &dof,
- const hp::QCollection<0> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const DoFHandlerType &dof,
+ const hp::QCollection<0> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id);
/**
* Equivalent to the set of functions above, except that this one takes a
* quadrature collection for hp finite element dof handlers.
*/
- template <typename InputVector, class DH>
- static void estimate (const Mapping<1,spacedim> &mapping,
- const DH &dof,
- const hp::QCollection<0> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const Mapping<1,spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const hp::QCollection<0> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id);
/**
* Equivalent to the set of functions above, except that this one takes a
* quadrature collection for hp finite element dof handlers.
*/
- template <typename InputVector, class DH>
- static void estimate (const DH &dof,
- const hp::QCollection<0> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask = ComponentMask(),
- const Function<spacedim> *coefficients = 0,
- const unsigned int n_threads = numbers::invalid_unsigned_int,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ template <typename InputVector, typename DoFHandlerType>
+ static void estimate
+ (const DoFHandlerType &dof,
+ const hp::QCollection<0> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask = ComponentMask(),
+ const Function<spacedim> *coefficients = 0,
+ const unsigned int n_threads = numbers::invalid_unsigned_int,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
+ const types::material_id material_id = numbers::invalid_material_id);
/**
* Exception
* resizing to a smaller size doesn't imply memory allocation, this is
* fast.
*/
- template <class DH,typename number>
+ template <typename DoFHandlerType,typename number>
struct ParallelData
{
- static const unsigned int dim = DH::dimension;
- static const unsigned int spacedim = DH::space_dimension;
+ static const unsigned int dim = DoFHandlerType::dimension;
+ static const unsigned int spacedim = DoFHandlerType::space_dimension;
/**
* The finite element to be used.
};
- template <class DH,typename number>
+ template <typename DoFHandlerType,typename number>
template <class FE>
- ParallelData<DH,number>::
- ParallelData (const FE &fe,
- const dealii::hp::QCollection<dim-1> &face_quadratures,
- const dealii::hp::MappingCollection<dim, spacedim> &mapping,
- const bool need_quadrature_points,
- const unsigned int n_solution_vectors,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id,
- const typename FunctionMap<spacedim>::type *neumann_bc,
- const ComponentMask component_mask,
- const Function<spacedim> *coefficients)
+ ParallelData<DoFHandlerType,number>::
+ ParallelData
+ (const FE &fe,
+ const dealii::hp::QCollection<dim-1> &face_quadratures,
+ const dealii::hp::MappingCollection<dim, spacedim> &mapping,
+ const bool need_quadrature_points,
+ const unsigned int n_solution_vectors,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id,
+ const typename FunctionMap<spacedim>::type *neumann_bc,
+ const ComponentMask component_mask,
+ const Function<spacedim> *coefficients)
:
finite_element (fe),
face_quadratures (face_quadratures),
- template <class DH, typename number>
+ template <typename DoFHandlerType, typename number>
void
- ParallelData<DH,number>::resize (const unsigned int active_fe_index)
+ ParallelData<DoFHandlerType,number>::resize (const unsigned int active_fe_index)
{
const unsigned int n_q_points = face_quadratures[active_fe_index].size();
const unsigned int n_components = finite_element.n_components();
* object into a global such map. This is the copier stage of a WorkStream
* pipeline.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- copy_local_to_global (const std::map<typename DH::face_iterator,std::vector<double> > &local_face_integrals,
- std::map<typename DH::face_iterator,std::vector<double> > &face_integrals)
+ copy_local_to_global
+ (const std::map<typename DoFHandlerType::face_iterator,std::vector<double> > &local_face_integrals,
+ std::map<typename DoFHandlerType::face_iterator,std::vector<double> > &face_integrals)
{
// now copy locally computed elements into the global map
- for (typename std::map<typename DH::face_iterator,std::vector<double> >::const_iterator
+ for (typename std::map<typename DoFHandlerType::face_iterator,std::vector<double> >::const_iterator
p=local_face_integrals.begin();
p!=local_face_integrals.end();
++p)
* Actually do the computation based on the evaluated gradients in
* ParallelData.
*/
- template <class DH, typename number>
+ template <typename DoFHandlerType, typename number>
std::vector<double>
- integrate_over_face (ParallelData<DH,number> ¶llel_data,
- const typename DH::face_iterator &face,
- dealii::hp::FEFaceValues<DH::dimension, DH::space_dimension> &fe_face_values_cell)
+ integrate_over_face
+ (ParallelData<DoFHandlerType,number> ¶llel_data,
+ const typename DoFHandlerType::face_iterator &face,
+ dealii::hp::FEFaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_face_values_cell)
{
const unsigned int n_q_points = parallel_data.psi[0].size(),
n_components = parallel_data.finite_element.n_components(),
* A factor to scale the integral for the face at the boundary.
* Used for Neumann BC.
*/
- template <class DH>
- double boundary_face_factor(const typename DH::active_cell_iterator &cell,
+ template <typename DoFHandlerType>
+ double boundary_face_factor(const typename DoFHandlerType::active_cell_iterator &cell,
const unsigned int face_no,
- const dealii::hp::FEFaceValues<DH::dimension, DH::space_dimension> &fe_face_values_cell,
- const typename KellyErrorEstimator<DH::dimension,DH::space_dimension>::Strategy strategy)
+ const dealii::hp::FEFaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_face_values_cell,
+ const typename KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::Strategy strategy)
{
switch (strategy)
{
- case KellyErrorEstimator<DH::dimension,DH::space_dimension>::cell_diameter_over_24 :
+ case KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::cell_diameter_over_24 :
{
return 1.0;
}
- case KellyErrorEstimator<DH::dimension,DH::space_dimension>::face_diameter_over_twice_max_degree :
+ case KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::face_diameter_over_twice_max_degree :
{
const double cell_degree = fe_face_values_cell.get_fe_collection()[cell->active_fe_index()].degree;
return cell->face(face_no)->diameter() / cell_degree;
/**
* A factor to scale the integral for the regular face.
*/
- template <class DH>
- double regular_face_factor(const typename DH::active_cell_iterator &cell,
+ template <typename DoFHandlerType>
+ double regular_face_factor(const typename DoFHandlerType::active_cell_iterator &cell,
const unsigned int face_no,
- const dealii::hp::FEFaceValues<DH::dimension, DH::space_dimension> &fe_face_values_cell,
- const dealii::hp::FEFaceValues<DH::dimension, DH::space_dimension> &fe_face_values_neighbor,
- const typename KellyErrorEstimator<DH::dimension,DH::space_dimension>::Strategy strategy)
+ const dealii::hp::FEFaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_face_values_cell,
+ const dealii::hp::FEFaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_face_values_neighbor,
+ const typename KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::Strategy strategy)
{
switch (strategy)
{
- case KellyErrorEstimator<DH::dimension,DH::space_dimension>::cell_diameter_over_24 :
+ case KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::cell_diameter_over_24 :
{
return 1.0;
}
- case KellyErrorEstimator<DH::dimension,DH::space_dimension>::face_diameter_over_twice_max_degree :
+ case KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::face_diameter_over_twice_max_degree :
{
const double cell_degree = fe_face_values_cell.get_fe_collection()[cell->active_fe_index()].degree;
const double neighbor_degree = fe_face_values_neighbor.get_fe_collection()[cell->neighbor(face_no)->active_fe_index()].degree;
/**
* A factor to scale the integral for the irregular face.
*/
- template <class DH>
- double irregular_face_factor(const typename DH::active_cell_iterator &cell,
- const typename DH::active_cell_iterator &neighbor_child,
+ template <typename DoFHandlerType>
+ double irregular_face_factor(const typename DoFHandlerType::active_cell_iterator &cell,
+ const typename DoFHandlerType::active_cell_iterator &neighbor_child,
const unsigned int face_no,
const unsigned int subface_no,
- const dealii::hp::FEFaceValues<DH::dimension, DH::space_dimension> &fe_face_values,
- dealii::hp::FESubfaceValues<DH::dimension, DH::space_dimension> &fe_subface_values,
- const typename KellyErrorEstimator<DH::dimension,DH::space_dimension>::Strategy strategy)
+ const dealii::hp::FEFaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_face_values,
+ dealii::hp::FESubfaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_subface_values,
+ const typename KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::Strategy strategy)
{
switch (strategy)
{
- case KellyErrorEstimator<DH::dimension,DH::space_dimension>::cell_diameter_over_24 :
+ case KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::cell_diameter_over_24 :
{
return 1.0;
}
- case KellyErrorEstimator<DH::dimension,DH::space_dimension>::face_diameter_over_twice_max_degree :
+ case KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::face_diameter_over_twice_max_degree :
{
const double cell_degree = fe_face_values.get_fe_collection()[cell->active_fe_index()].degree;
const double neighbor_child_degree = fe_subface_values.get_fe_collection()[neighbor_child->active_fe_index()].degree;
* A factor used when summing up all the contribution
* from different faces of each cell.
*/
- template <class DH>
- double cell_factor(const typename DH::active_cell_iterator &cell,
+ template <typename DoFHandlerType>
+ double cell_factor(const typename DoFHandlerType::active_cell_iterator &cell,
const unsigned int /*face_no*/,
- const DH &/*dof_handler*/,
- const typename KellyErrorEstimator<DH::dimension,DH::space_dimension>::Strategy strategy)
+ const DoFHandlerType &/*dof_handler*/,
+ const typename KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::Strategy strategy)
{
switch (strategy)
{
- case KellyErrorEstimator<DH::dimension,DH::space_dimension>::cell_diameter_over_24 :
+ case KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::cell_diameter_over_24 :
{
return cell->diameter()/24;
}
- case KellyErrorEstimator<DH::dimension,DH::space_dimension>::face_diameter_over_twice_max_degree :
+ case KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::face_diameter_over_twice_max_degree :
{
return 1.0;
}
* boundary), or the other side's refinement level is the same as that of
* this side, then handle the integration of these both cases together.
*/
- template <typename InputVector, class DH>
+ template <typename InputVector, typename DoFHandlerType>
void
integrate_over_regular_face (const std::vector<const InputVector *> &solutions,
- ParallelData<DH, typename InputVector::value_type> ¶llel_data,
- std::map<typename DH::face_iterator,std::vector<double> > &local_face_integrals,
- const typename DH::active_cell_iterator &cell,
+ ParallelData<DoFHandlerType, typename InputVector::value_type> ¶llel_data,
+ std::map<typename DoFHandlerType::face_iterator,std::vector<double> > &local_face_integrals,
+ const typename DoFHandlerType::active_cell_iterator &cell,
const unsigned int face_no,
- dealii::hp::FEFaceValues<DH::dimension, DH::space_dimension> &fe_face_values_cell,
- dealii::hp::FEFaceValues<DH::dimension, DH::space_dimension> &fe_face_values_neighbor,
- const typename KellyErrorEstimator<DH::dimension,DH::space_dimension>::Strategy strategy)
+ dealii::hp::FEFaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_face_values_cell,
+ dealii::hp::FEFaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_face_values_neighbor,
+ const typename KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::Strategy strategy)
{
- const unsigned int dim = DH::dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
(void)dim;
- const typename DH::face_iterator face = cell->face(face_no);
+ const typename DoFHandlerType::face_iterator face = cell->face(face_no);
const unsigned int n_solution_vectors = solutions.size();
Assert (cell->neighbor(face_no).state() == IteratorState::valid,
ExcInternalError());
- const typename DH::active_cell_iterator neighbor = cell->neighbor(face_no);
+ const typename DoFHandlerType::active_cell_iterator neighbor = cell->neighbor(face_no);
// find which number the current face has relative to the
// neighboring cell
fe_face_values_neighbor.reinit (neighbor, neighbor_neighbor,
cell->active_fe_index());
- factor = regular_face_factor<DH>(cell,face_no,
- fe_face_values_cell,fe_face_values_neighbor,
- strategy);
+ factor = regular_face_factor<DoFHandlerType>(cell,face_no,
+ fe_face_values_cell,fe_face_values_neighbor,
+ strategy);
// get gradients on neighbor cell
for (unsigned int n=0; n<n_solution_vectors; ++n)
}
else
{
- factor = boundary_face_factor<DH>(cell,face_no,
- fe_face_values_cell,
- strategy);
+ factor = boundary_face_factor<DoFHandlerType>(cell,face_no,
+ fe_face_values_cell,
+ strategy);
}
// now go to the generic function that does all the other things
* integration is a bit more
* complex.
*/
- template <typename InputVector, class DH>
+ template <typename InputVector, typename DoFHandlerType>
void
integrate_over_irregular_face (const std::vector<const InputVector *> &solutions,
- ParallelData<DH, typename InputVector::value_type> ¶llel_data,
- std::map<typename DH::face_iterator,std::vector<double> > &local_face_integrals,
- const typename DH::active_cell_iterator &cell,
+ ParallelData<DoFHandlerType, typename InputVector::value_type> ¶llel_data,
+ std::map<typename DoFHandlerType::face_iterator,std::vector<double> > &local_face_integrals,
+ const typename DoFHandlerType::active_cell_iterator &cell,
const unsigned int face_no,
- dealii::hp::FEFaceValues<DH::dimension,DH::space_dimension> &fe_face_values,
- dealii::hp::FESubfaceValues<DH::dimension, DH::space_dimension> &fe_subface_values,
- const typename KellyErrorEstimator<DH::dimension,DH::space_dimension>::Strategy strategy)
+ dealii::hp::FEFaceValues<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_face_values,
+ dealii::hp::FESubfaceValues<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe_subface_values,
+ const typename KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::Strategy strategy)
{
- const unsigned int dim = DH::dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
(void)dim;
- const typename DH::cell_iterator neighbor = cell->neighbor(face_no);
+ const typename DoFHandlerType::cell_iterator neighbor = cell->neighbor(face_no);
(void)neighbor;
const unsigned int n_solution_vectors = solutions.size();
- const typename DH::face_iterator
+ const typename DoFHandlerType::face_iterator
face=cell->face(face_no);
Assert (neighbor.state() == IteratorState::valid, ExcInternalError());
for (unsigned int subface_no=0; subface_no<face->n_children(); ++subface_no)
{
// get an iterator pointing to the cell behind the present subface
- const typename DH::active_cell_iterator neighbor_child
+ const typename DoFHandlerType::active_cell_iterator neighbor_child
= cell->neighbor_child_on_subface (face_no, subface_no);
Assert (!neighbor_child->has_children(),
ExcInternalError());
fe_face_values.reinit (neighbor_child, neighbor_neighbor,
cell->active_fe_index());
- const double factor = irregular_face_factor<DH>(cell,
- neighbor_child,
- face_no,
- subface_no,
- fe_face_values,
- fe_subface_values,
- strategy);
+ const double factor = irregular_face_factor<DoFHandlerType>(cell,
+ neighbor_child,
+ face_no,
+ subface_no,
+ fe_face_values,
+ fe_subface_values,
+ strategy);
// store the gradient of the solution in psi
for (unsigned int n=0; n<n_solution_vectors; ++n)
* This function is only needed in two or three dimensions. The error
* estimator in one dimension is implemented separately.
*/
- template <typename InputVector, class DH>
+ template <typename InputVector, typename DoFHandlerType>
void
- estimate_one_cell (const typename DH::active_cell_iterator &cell,
- ParallelData<DH, typename InputVector::value_type> ¶llel_data,
- std::map<typename DH::face_iterator,std::vector<double> > &local_face_integrals,
+ estimate_one_cell (const typename DoFHandlerType::active_cell_iterator &cell,
+ ParallelData<DoFHandlerType, typename InputVector::value_type> ¶llel_data,
+ std::map<typename DoFHandlerType::face_iterator,std::vector<double> > &local_face_integrals,
const std::vector<const InputVector *> &solutions,
- const typename KellyErrorEstimator<DH::dimension,DH::space_dimension>::Strategy strategy)
+ const typename KellyErrorEstimator<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::Strategy strategy)
{
- const unsigned int dim = DH::dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
const unsigned int n_solution_vectors = solutions.size();
const types::subdomain_id subdomain_id = parallel_data.subdomain_id;
for (unsigned int face_no=0;
face_no<GeometryInfo<dim>::faces_per_cell; ++face_no)
{
- const typename DH::face_iterator
+ const typename DoFHandlerType::face_iterator
face=cell->face(face_no);
// make sure we do work only once: this face may either be regular
// the following function is still independent of dimension, but it
// calls dimension dependent functions
template <int dim, int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<dim, spacedim>::
-estimate (const Mapping<dim, spacedim> &mapping,
- const DH &dof_handler,
- const Quadrature<dim-1> &quadrature,
+estimate (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof_handler,
+ const Quadrature<dim-1> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id,
- const Strategy strategy)
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id,
+ const Strategy strategy)
{
// just pass on to the other function
const std::vector<const InputVector *> solutions (1, &solution);
template <int dim, int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<dim,spacedim>::
-estimate (const DH &dof_handler,
- const Quadrature<dim-1> &quadrature,
+estimate (const DoFHandlerType &dof_handler,
+ const Quadrature<dim-1> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id,
- const Strategy strategy)
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id,
+ const Strategy strategy)
{
estimate(StaticMappingQ1<dim,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solution,
error, component_mask, coefficients, n_threads,
template <int dim, int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<dim, spacedim>::
-estimate (const Mapping<dim, spacedim> &mapping,
- const DH &dof_handler,
- const hp::QCollection<dim-1> &quadrature,
+estimate (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof_handler,
+ const hp::QCollection<dim-1> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id,
- const Strategy strategy)
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id,
+ const Strategy strategy)
{
// just pass on to the other function
const std::vector<const InputVector *> solutions (1, &solution);
template <int dim, int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<dim, spacedim>::
-estimate (const DH &dof_handler,
- const hp::QCollection<dim-1> &quadrature,
+estimate (const DoFHandlerType &dof_handler,
+ const hp::QCollection<dim-1> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id,
- const Strategy strategy)
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id,
+ const Strategy strategy)
{
estimate(StaticMappingQ1<dim, spacedim>::mapping, dof_handler, quadrature, neumann_bc, solution,
error, component_mask, coefficients, n_threads,
template <int dim, int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<dim, spacedim>::
-estimate (const Mapping<dim, spacedim> &mapping,
- const DH &dof_handler,
- const hp::QCollection<dim-1> &face_quadratures,
+estimate (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof_handler,
+ const hp::QCollection<dim-1> &face_quadratures,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int ,
- const types::subdomain_id subdomain_id_,
- const types::material_id material_id,
- const Strategy strategy)
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int,
+ const types::subdomain_id subdomain_id_,
+ const types::material_id material_id,
+ const Strategy strategy)
{
#ifdef DEAL_II_WITH_P4EST
if (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
// the integrated jump of the gradient for each face. At the end of the
// function, we again loop over the cells and collect the contributions of
// the different faces of the cell.
- std::map<typename DH::face_iterator,std::vector<double> > face_integrals;
+ std::map<typename DoFHandlerType::face_iterator,std::vector<double> > face_integrals;
// all the data needed in the error estimator by each of the threads is
// gathered in the following structures
const hp::MappingCollection<dim,spacedim> mapping_collection(mapping);
- const internal::ParallelData<DH,typename InputVector::value_type>
+ const internal::ParallelData<DoFHandlerType,typename InputVector::value_type>
parallel_data (dof_handler.get_fe(),
face_quadratures,
mapping_collection,
&neumann_bc,
component_mask,
coefficients);
- std::map<typename DH::face_iterator,std::vector<double> > sample_local_face_integrals;
+ std::map<typename DoFHandlerType::face_iterator,std::vector<double> > sample_local_face_integrals;
// now let's work on all those cells:
WorkStream::run (dof_handler.begin_active(),
- static_cast<typename DH::active_cell_iterator>(dof_handler.end()),
- std_cxx11::bind (&internal::estimate_one_cell<InputVector,DH>,
+ static_cast<typename DoFHandlerType::active_cell_iterator>(dof_handler.end()),
+ std_cxx11::bind (&internal::estimate_one_cell<InputVector,DoFHandlerType>,
std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::ref(solutions),strategy),
- std_cxx11::bind (&internal::copy_local_to_global<DH>,
+ std_cxx11::bind (&internal::copy_local_to_global<DoFHandlerType>,
std_cxx11::_1, std_cxx11::ref(face_integrals)),
parallel_data,
sample_local_face_integrals);
// now walk over all cells and collect information from the faces. only do
// something if this is a cell we care for based on the subdomain id
unsigned int present_cell=0;
- for (typename DH::active_cell_iterator cell=dof_handler.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell=dof_handler.begin_active();
cell!=dof_handler.end();
++cell, ++present_cell)
if ( ((subdomain_id == numbers::invalid_subdomain_id)
Assert(face_integrals.find(cell->face(face_no))
!= face_integrals.end(),
ExcInternalError());
- const double factor = internal::cell_factor<DH>(cell,
- face_no,
- dof_handler,
- strategy);
+ const double factor = internal::cell_factor<DoFHandlerType>(cell,
+ face_no,
+ dof_handler,
+ strategy);
for (unsigned int n=0; n<n_solution_vectors; ++n)
{
template <int dim, int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<dim, spacedim>::
-estimate (const Mapping<dim, spacedim> &mapping,
- const DH &dof_handler,
- const Quadrature<dim-1> &quadrature,
+estimate (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof_handler,
+ const Quadrature<dim-1> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id,
- const Strategy strategy)
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id,
+ const Strategy strategy)
{
// forward to the function with the QCollection
estimate (mapping, dof_handler,
template <int dim, int spacedim>
-template <typename InputVector, class DH>
-void KellyErrorEstimator<dim, spacedim>::estimate (const DH &dof_handler,
- const Quadrature<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id,
- const Strategy strategy)
+template <typename InputVector, typename DoFHandlerType>
+void KellyErrorEstimator<dim, spacedim>::estimate
+(const DoFHandlerType &dof_handler,
+ const Quadrature<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id,
+ const Strategy strategy)
{
estimate(StaticMappingQ1<dim, spacedim>::mapping, dof_handler, quadrature, neumann_bc, solutions,
errors, component_mask, coefficients, n_threads,
template <int dim, int spacedim>
-template <typename InputVector, class DH>
-void KellyErrorEstimator<dim, spacedim>::estimate (const DH &dof_handler,
- const hp::QCollection<dim-1> &quadrature,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id,
- const Strategy strategy)
+template <typename InputVector, typename DoFHandlerType>
+void KellyErrorEstimator<dim, spacedim>::estimate
+(const DoFHandlerType &dof_handler,
+ const hp::QCollection<dim-1> &quadrature,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id,
+ const Strategy strategy)
{
estimate(StaticMappingQ1<dim, spacedim>::mapping, dof_handler, quadrature, neumann_bc, solutions,
errors, component_mask, coefficients, n_threads,
* @author Luca Heltai, 2006, Markus Buerg, 2012, Wolfgang Bangerth, 2013
*/
template <int dim,
- typename DH=DoFHandler<dim>,
+ typename DoFHandlerType=DoFHandler<dim>,
typename VectorType=Vector<double> >
class FEFieldFunction : public Function<dim>
{
* mapping is specified, that is what is used to find out where the points
* lay. Otherwise the standard Q1 mapping is used.
*/
- FEFieldFunction (const DH &dh,
- const VectorType &data_vector,
- const Mapping<dim> &mapping = StaticMappingQ1<dim>::mapping);
+ FEFieldFunction (const DoFHandlerType &dh,
+ const VectorType &data_vector,
+ const Mapping<dim> &mapping = StaticMappingQ1<dim>::mapping);
/**
* Set the current cell. If you know in advance where your points lie, you
* can tell this object by calling this function. This will speed things
* up a little.
*/
- void set_active_cell (const typename DH::active_cell_iterator &newcell);
+ void set_active_cell (const typename DoFHandlerType::active_cell_iterator &newcell);
/**
* Get one vector value at the given point. It is inefficient to use
* See the section in the general documentation of this class for more
* information.
*/
- virtual double value (const Point< dim > &p,
+ virtual double value (const Point< dim > &p,
const unsigned int component = 0) const;
/**
* set of points.
*/
unsigned int
- compute_point_locations(const std::vector<Point<dim> > &points,
- std::vector<typename DH::active_cell_iterator > &cells,
- std::vector<std::vector<Point<dim> > > &qpoints,
- std::vector<std::vector<unsigned int> > &maps) const;
+ compute_point_locations
+ (const std::vector<Point<dim> > &points,
+ std::vector<typename DoFHandlerType::active_cell_iterator > &cells,
+ std::vector<std::vector<Point<dim> > > &qpoints,
+ std::vector<std::vector<unsigned int> > &maps) const;
/**
* @deprecated Use VectorTools::ExcPointNotAvailableHere instead.
* Typedef holding the local cell_hint.
*/
typedef
- Threads::ThreadLocalStorage <typename DH::active_cell_iterator >
+ Threads::ThreadLocalStorage <typename DoFHandlerType::active_cell_iterator >
cell_hint_t;
/**
* Pointer to the dof handler.
*/
- SmartPointer<const DH,FEFieldFunction<dim, DH, VectorType> > dh;
+ SmartPointer<const DoFHandlerType,FEFieldFunction<dim, DoFHandlerType, VectorType> > dh;
/**
* A reference to the actual data vector.
* uninitialized boost::optional object.
*/
boost::optional<Point<dim> >
- get_reference_coordinates (const typename DH::active_cell_iterator &cell,
- const Point<dim> &point) const;
+ get_reference_coordinates (const typename DoFHandlerType::active_cell_iterator &cell,
+ const Point<dim> &point) const;
};
}
namespace Functions
{
- template <int dim, typename DH, typename VectorType>
- FEFieldFunction<dim, DH, VectorType>::FEFieldFunction (const DH &mydh,
- const VectorType &myv,
- const Mapping<dim> &mymapping)
+ template <int dim, typename DoFHandlerType, typename VectorType>
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::FEFieldFunction
+ (const DoFHandlerType &mydh,
+ const VectorType &myv,
+ const Mapping<dim> &mymapping)
:
Function<dim>(mydh.get_fe().n_components()),
dh(&mydh, "FEFieldFunction"),
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
- set_active_cell(const typename DH::active_cell_iterator &newcell)
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
+ set_active_cell(const typename DoFHandlerType::active_cell_iterator &newcell)
{
cell_hint.get() = newcell;
}
- template <int dim, typename DH, typename VectorType>
- void FEFieldFunction<dim, DH, VectorType>::vector_value (const Point<dim> &p,
- Vector<double> &values) const
+ template <int dim, typename DoFHandlerType, typename VectorType>
+ void FEFieldFunction<dim, DoFHandlerType, VectorType>::vector_value (const Point<dim> &p,
+ Vector<double> &values) const
{
Assert (values.size() == n_components,
ExcDimensionMismatch(values.size(), n_components));
- typename DH::active_cell_iterator cell = cell_hint.get();
+ typename DoFHandlerType::active_cell_iterator cell = cell_hint.get();
if (cell == dh->end())
cell = dh->begin_active();
qp = get_reference_coordinates (cell, p);
if (!qp)
{
- const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DH>::type, Point<dim> > my_pair
+ const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DoFHandlerType>::type, Point<dim> > my_pair
= GridTools::find_active_cell_around_point (mapping, *dh, p);
AssertThrow (my_pair.first->is_locally_owned(),
VectorTools::ExcPointNotAvailableHere());
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
double
- FEFieldFunction<dim, DH, VectorType>::value (const Point<dim> &p,
- const unsigned int comp) const
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::value (const Point<dim> &p,
+ const unsigned int comp) const
{
Vector<double> values(n_components);
vector_value(p, values);
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
vector_gradient (const Point<dim> &p,
std::vector<Tensor<1,dim> > &gradients) const
{
Assert (gradients.size() == n_components,
ExcDimensionMismatch(gradients.size(), n_components));
- typename DH::active_cell_iterator cell = cell_hint.get();
+ typename DoFHandlerType::active_cell_iterator cell = cell_hint.get();
if (cell == dh->end())
cell = dh->begin_active();
qp = get_reference_coordinates (cell, p);
if (!qp)
{
- const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DH>::type, Point<dim> > my_pair
+ const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DoFHandlerType>::type, Point<dim> > my_pair
= GridTools::find_active_cell_around_point (mapping, *dh, p);
AssertThrow (my_pair.first->is_locally_owned(),
VectorTools::ExcPointNotAvailableHere());
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
Tensor<1,dim>
- FEFieldFunction<dim, DH, VectorType>::
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
gradient (const Point<dim> &p,
const unsigned int comp) const
{
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
vector_laplacian (const Point<dim> &p,
Vector<double> &values) const
{
Assert (values.size() == n_components,
ExcDimensionMismatch(values.size(), n_components));
- typename DH::active_cell_iterator cell = cell_hint.get();
+ typename DoFHandlerType::active_cell_iterator cell = cell_hint.get();
if (cell == dh->end())
cell = dh->begin_active();
qp = get_reference_coordinates (cell, p);
if (!qp)
{
- const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DH>::type, Point<dim> > my_pair
+ const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DoFHandlerType>::type, Point<dim> > my_pair
= GridTools::find_active_cell_around_point (mapping, *dh, p);
AssertThrow (my_pair.first->is_locally_owned(),
VectorTools::ExcPointNotAvailableHere());
- template <int dim, typename DH, typename VectorType>
- double FEFieldFunction<dim, DH, VectorType>::laplacian
- (const Point<dim> &p, const unsigned int comp) const
+ template <int dim, typename DoFHandlerType, typename VectorType>
+ double FEFieldFunction<dim, DoFHandlerType, VectorType>::laplacian
+ (const Point<dim> &p,
+ const unsigned int comp) const
{
Vector<double> lap(n_components);
vector_laplacian(p, lap);
// Now the list versions
// ==============================
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
- vector_value_list (const std::vector<Point< dim > > &points,
- std::vector< Vector<double> > &values) const
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
+ vector_value_list (const std::vector<Point< dim > > &points,
+ std::vector< Vector<double> > &values) const
{
Assert(points.size() == values.size(),
ExcDimensionMismatch(points.size(), values.size()));
- std::vector<typename DH::active_cell_iterator > cells;
+ std::vector<typename DoFHandlerType::active_cell_iterator > cells;
std::vector<std::vector<Point<dim> > > qpoints;
std::vector<std::vector<unsigned int> > maps;
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
value_list (const std::vector<Point< dim > > &points,
std::vector< double > &values,
- const unsigned int component) const
+ const unsigned int component) const
{
Assert(points.size() == values.size(),
ExcDimensionMismatch(points.size(), values.size()));
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
- vector_gradient_list (const std::vector<Point< dim > > &points,
- std::vector<
- std::vector< Tensor<1,dim> > > &values) const
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
+ vector_gradient_list (const std::vector<Point< dim > > &points,
+ std::vector<std::vector< Tensor<1,dim> > > &values) const
{
Assert(points.size() == values.size(),
ExcDimensionMismatch(points.size(), values.size()));
- std::vector<typename DH::active_cell_iterator > cells;
+ std::vector<typename DoFHandlerType::active_cell_iterator > cells;
std::vector<std::vector<Point<dim> > > qpoints;
std::vector<std::vector<unsigned int> > maps;
}
}
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
gradient_list (const std::vector<Point< dim > > &points,
- std::vector< Tensor<1,dim> > &values,
- const unsigned int component) const
+ std::vector< Tensor<1,dim> > &values,
+ const unsigned int component) const
{
Assert(points.size() == values.size(),
ExcDimensionMismatch(points.size(), values.size()));
}
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
- vector_laplacian_list (const std::vector<Point< dim > > &points,
- std::vector< Vector<double> > &values) const
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
+ vector_laplacian_list (const std::vector<Point< dim > > &points,
+ std::vector< Vector<double> > &values) const
{
Assert(points.size() == values.size(),
ExcDimensionMismatch(points.size(), values.size()));
- std::vector<typename DH::active_cell_iterator > cells;
+ std::vector<typename DoFHandlerType::active_cell_iterator> cells;
std::vector<std::vector<Point<dim> > > qpoints;
std::vector<std::vector<unsigned int> > maps;
}
}
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
void
- FEFieldFunction<dim, DH, VectorType>::
- laplacian_list (const std::vector<Point< dim > > &points,
- std::vector< double > &values,
- const unsigned int component) const
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
+ laplacian_list (const std::vector<Point<dim> > &points,
+ std::vector<double> &values,
+ const unsigned int component) const
{
Assert(points.size() == values.size(),
ExcDimensionMismatch(points.size(), values.size()));
- template <int dim, typename DH, typename VectorType>
- unsigned int FEFieldFunction<dim, DH, VectorType>::
- compute_point_locations(const std::vector<Point<dim> > &points,
- std::vector<typename DH::active_cell_iterator > &cells,
- std::vector<std::vector<Point<dim> > > &qpoints,
- std::vector<std::vector<unsigned int> > &maps) const
+ template <int dim, typename DoFHandlerType, typename VectorType>
+ unsigned int FEFieldFunction<dim, DoFHandlerType, VectorType>::
+ compute_point_locations
+ (const std::vector<Point<dim> > &points,
+ std::vector<typename DoFHandlerType::active_cell_iterator > &cells,
+ std::vector<std::vector<Point<dim> > > &qpoints,
+ std::vector<std::vector<unsigned int> > &maps) const
{
// How many points are here?
const unsigned int np = points.size();
bool left_over = true;
// Current quadrature point
- typename DH::active_cell_iterator cell = cell_hint.get();
+ typename DoFHandlerType::active_cell_iterator cell = cell_hint.get();
if (cell == dh->end())
cell = dh->begin_active();
qp = get_reference_coordinates (cell, points[0]);
if (!qp)
{
- const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DH>::type, Point<dim> >
+ const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DoFHandlerType>::type, Point<dim> >
my_pair = GridTools::find_active_cell_around_point
(mapping, *dh, points[0]);
AssertThrow (my_pair.first->is_locally_owned(),
// the next cell
if (left_over == true)
{
- const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DH>::type, Point<dim> > my_pair
+ const std::pair<typename dealii::internal::ActiveCellIterator<dim, dim, DoFHandlerType>::type, Point<dim> > my_pair
= GridTools::find_active_cell_around_point (mapping, *dh, points[first_outside]);
AssertThrow (my_pair.first->is_locally_owned(),
VectorTools::ExcPointNotAvailableHere());
}
- template <int dim, typename DH, typename VectorType>
+ template <int dim, typename DoFHandlerType, typename VectorType>
boost::optional<Point<dim> >
- FEFieldFunction<dim, DH, VectorType>::
- get_reference_coordinates (const typename DH::active_cell_iterator &cell,
- const Point<dim> &point) const
+ FEFieldFunction<dim, DoFHandlerType, VectorType>::
+ get_reference_coordinates (const typename DoFHandlerType::active_cell_iterator &cell,
+ const Point<dim> &point) const
{
try
{
* @author Ralf Hartmann, 1999, Oliver Kayser-Herold and Wolfgang Bangerth,
* 2006, Wolfgang Bangerth 2014
*/
-template<int dim, typename VectorType=Vector<double>, class DH=DoFHandler<dim> >
+template<int dim, typename VectorType=Vector<double>,
+ typename DoFHandlerType=DoFHandler<dim> >
class SolutionTransfer
{
public:
/**
* Constructor, takes the current DoFHandler as argument.
*/
- SolutionTransfer(const DH &dof);
+ SolutionTransfer(const DoFHandlerType &dof);
/**
* Destructor
/**
* Pointer to the degree of freedom handler to work with.
*/
- SmartPointer<const DH,SolutionTransfer<dim,VectorType,DH> > dof_handler;
+ SmartPointer<const DoFHandlerType, SolutionTransfer<dim,VectorType, DoFHandlerType> > dof_handler;
/**
* Stores the number of DoFs before the refinement and/or coarsening.
* with the hanging nodes from space @p dof afterwards, to make the result
* continuous again.
*
- * The template argument <code>DH</code> may either be of type DoFHandler or
+ * The template argument <code>DoFHandlerType</code> may either be of type DoFHandler or
* hp::DoFHandler.
*
* See the general documentation of this namespace for further information.
* @todo The @p mapping argument should be replaced by a
* hp::MappingCollection in case of a hp::DoFHandler.
*/
- template <typename VectorType, int dim, int spacedim, template <int,int> class DH>
- void interpolate (const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof,
- const Function<spacedim,double> &function,
- VectorType &vec);
+ template <typename VectorType, int dim, int spacedim, template <int, int> class DoFHandlerType>
+ void interpolate (const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof,
+ const Function<spacedim,double> &function,
+ VectorType &vec);
/**
* Calls the @p interpolate() function above with
* <tt>mapping=MappingQGeneric1@<dim>@()</tt>.
*/
- template <typename VectorType, class DH>
- void interpolate (const DH &dof,
- const Function<DH::space_dimension,double> &function,
- VectorType &vec);
+ template <typename VectorType, typename DoFHandlerType>
+ void interpolate (const DoFHandlerType &dof,
+ const Function<DoFHandlerType::space_dimension,double> &function,
+ VectorType &vec);
/**
* Interpolate different finite element spaces. The interpolation of vector
* instantiated by hand.
*/
template <int dim, class InVector, class OutVector, int spacedim>
- void interpolate (const DoFHandler<dim,spacedim> &dof_1,
- const DoFHandler<dim,spacedim> &dof_2,
- const FullMatrix<double> &transfer,
- const InVector &data_1,
- OutVector &data_2);
+ void interpolate (const DoFHandler<dim,spacedim> &dof_1,
+ const DoFHandler<dim,spacedim> &dof_2,
+ const FullMatrix<double> &transfer,
+ const InVector &data_1,
+ OutVector &data_2);
/**
* This function is a kind of generalization or modification of the very
*
* @author Valentin Zingan, 2013
*/
- template<typename VectorType, typename DH>
+ template <typename VectorType, typename DoFHandlerType>
void
interpolate_based_on_material_id
- (const Mapping<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof_handler,
- const std::map< types::material_id, const Function<DH::space_dimension,double>* > &function_map,
- VectorType &dst,
- const ComponentMask &component_mask = ComponentMask());
+ (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof_handler,
+ const std::map<types::material_id, const Function<DoFHandlerType::space_dimension, double> *> &function_map,
+ VectorType &dst,
+ const ComponentMask &component_mask = ComponentMask());
/**
* Gives the interpolation of a @p dof1-function @p u1 to a @p dof2-function
* flag).
*/
template <int dim, int spacedim,
- template <int,int> class DH,
+ template <int, int> class DoFHandlerType,
typename VectorType>
void
- interpolate_to_different_mesh (const DH<dim, spacedim> &dof1,
- const VectorType &u1,
- const DH<dim, spacedim> &dof2,
- VectorType &u2);
+ interpolate_to_different_mesh (const DoFHandlerType<dim, spacedim> &dof1,
+ const VectorType &u1,
+ const DoFHandlerType<dim, spacedim> &dof2,
+ VectorType &u2);
/**
* Gives the interpolation of a @p dof1-function @p u1 to a @p dof2-function
* does not necessarily respect continuity requirements at hanging nodes.
*/
template <int dim, int spacedim,
- template <int,int> class DH,
+ template <int, int> class DoFHandlerType,
typename VectorType>
void
- interpolate_to_different_mesh (const DH<dim, spacedim> &dof1,
- const VectorType &u1,
- const DH<dim, spacedim> &dof2,
- const ConstraintMatrix &constraints,
- VectorType &u2);
+ interpolate_to_different_mesh (const DoFHandlerType<dim, spacedim> &dof1,
+ const VectorType &u1,
+ const DoFHandlerType<dim, spacedim> &dof2,
+ const ConstraintMatrix &constraints,
+ VectorType &u2);
/**
* pointing from a source DoFHandler to a destination DoFHandler.
*/
template <int dim, int spacedim,
- template <int,int> class DH,
+ template <int, int> class DoFHandlerType,
typename VectorType>
void
- interpolate_to_different_mesh (const InterGridMap<DH<dim, spacedim> > &intergridmap,
- const VectorType &u1,
- const ConstraintMatrix &constraints,
- VectorType &u2);
+ interpolate_to_different_mesh
+ (const InterGridMap<DoFHandlerType<dim, spacedim> > &intergridmap,
+ const VectorType &u1,
+ const ConstraintMatrix &constraints,
+ VectorType &u2);
/**
* Compute the projection of @p function to the finite element space.
*
* See the general documentation of this namespace for more information.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const Mapping<DH::dimension,DH::space_dimension> &mapping,
- const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask = ComponentMask());
/**
* Like the previous function, but take a mapping collection to go with the
*/
template <int dim, int spacedim>
void
- interpolate_boundary_values (const hp::MappingCollection<dim,spacedim> &mapping,
- const hp::DoFHandler<dim,spacedim> &dof,
- const typename FunctionMap<spacedim>::type &function_map,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const hp::MappingCollection<dim,spacedim> &mapping,
+ const hp::DoFHandler<dim,spacedim> &dof,
+ const typename FunctionMap<spacedim>::type &function_map,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask = ComponentMask());
/**
* Same function as above, but taking only one pair of boundary indicator
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const Mapping<DH::dimension,DH::space_dimension> &mapping,
- const DH &dof,
- const types::boundary_id boundary_component,
- const Function<DH::space_dimension,double> &boundary_function,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const types::boundary_id boundary_component,
+ const Function<DoFHandlerType::space_dimension,double> &boundary_function,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask = ComponentMask());
/**
* Calls the other interpolate_boundary_values() function, see above, with
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const DH &dof,
- const types::boundary_id boundary_component,
- const Function<DH::space_dimension,double> &boundary_function,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const DoFHandlerType &dof,
+ const types::boundary_id boundary_component,
+ const Function<DoFHandlerType::space_dimension,double> &boundary_function,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask = ComponentMask());
/**
* previous function, in particular about the use of the component mask and
* the requires size of the function object.
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask = ComponentMask());
/**
*
* @ingroup constraints
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const Mapping<DH::dimension,DH::space_dimension> &mapping,
- const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- ConstraintMatrix &constraints,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ ConstraintMatrix &constraints,
+ const ComponentMask &component_mask = ComponentMask());
/**
* Same function as above, but taking only one pair of boundary indicator
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const Mapping<DH::dimension,DH::space_dimension> &mapping,
- const DH &dof,
- const types::boundary_id boundary_component,
- const Function<DH::space_dimension,double> &boundary_function,
- ConstraintMatrix &constraints,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const types::boundary_id boundary_component,
+ const Function<DoFHandlerType::space_dimension,double> &boundary_function,
+ ConstraintMatrix &constraints,
+ const ComponentMask &component_mask = ComponentMask());
/**
* Calls the other interpolate_boundary_values() function, see above, with
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const DH &dof,
- const types::boundary_id boundary_component,
- const Function<DH::space_dimension,double> &boundary_function,
- ConstraintMatrix &constraints,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const DoFHandlerType &dof,
+ const types::boundary_id boundary_component,
+ const Function<DoFHandlerType::space_dimension,double> &boundary_function,
+ ConstraintMatrix &constraints,
+ const ComponentMask &component_mask = ComponentMask());
/**
*
* @ingroup constraints
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- ConstraintMatrix &constraints,
- const ComponentMask &component_mask = ComponentMask());
+ interpolate_boundary_values
+ (const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ ConstraintMatrix &constraints,
+ const ComponentMask &component_mask = ComponentMask());
/**
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, template <int, int> class DH, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, int spacedim>
void
- compute_nonzero_normal_flux_constraints (const DH<dim,spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> &boundary_ids,
- typename FunctionMap<spacedim>::type &function_map,
- ConstraintMatrix &constraints,
- const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
+ compute_nonzero_normal_flux_constraints
+ (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ typename FunctionMap<spacedim>::type &function_map,
+ ConstraintMatrix &constraints,
+ const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
/**
* Same as above for homogeneous normal-flux constraints.
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, template <int, int> class DH, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, int spacedim>
void
- compute_no_normal_flux_constraints (const DH<dim,spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> &boundary_ids,
- ConstraintMatrix &constraints,
- const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
+ compute_no_normal_flux_constraints
+ (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ ConstraintMatrix &constraints,
+ const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
/**
* Compute the constraints that correspond to boundary conditions of the
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, template <int, int> class DH, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, int spacedim>
void
- compute_nonzero_tangential_flux_constraints (const DH<dim,spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> &boundary_ids,
- typename FunctionMap<spacedim>::type &function_map,
- ConstraintMatrix &constraints,
- const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
+ compute_nonzero_tangential_flux_constraints
+ (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ typename FunctionMap<spacedim>::type &function_map,
+ ConstraintMatrix &constraints,
+ const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
/**
* Same as above for homogeneous tangential-flux constraints.
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
*/
- template <int dim, template <int, int> class DH, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, int spacedim>
void
- compute_normal_flux_constraints (const DH<dim,spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> &boundary_ids,
- ConstraintMatrix &constraints,
- const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
+ compute_normal_flux_constraints
+ (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ ConstraintMatrix &constraints,
+ const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
//@}
*
* @author Luca Heltai, 2015
*/
- template<class DH, typename VectorType>
- void get_position_vector(const DH &dh,
- VectorType &vector,
- const ComponentMask &mask=ComponentMask());
+ template<typename DoFHandlerType, typename VectorType>
+ void get_position_vector(const DoFHandlerType &dh,
+ VectorType &vector,
+ const ComponentMask &mask = ComponentMask());
//@}
namespace VectorTools
{
- template <typename VectorType, int dim, int spacedim, template <int,int> class DH>
- void interpolate (const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof,
- const Function<spacedim> &function,
- VectorType &vec)
+ template <typename VectorType, int dim, int spacedim,
+ template <int, int> class DoFHandlerType>
+ void interpolate (const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof,
+ const Function<spacedim> &function,
+ VectorType &vec)
{
Assert (vec.size() == dof.n_dofs(),
ExcDimensionMismatch (vec.size(), dof.n_dofs()));
const unsigned int n_components = fe.n_components();
const bool fe_is_system = (n_components != 1);
- typename DH<dim,spacedim>::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType<dim,spacedim>::active_cell_iterator
+ cell = dof.begin_active(),
+ endc = dof.end();
// For FESystems many of the
// unit_support_points will appear
}
- template <typename VectorType, class DH>
- void interpolate (const DH &dof,
- const Function<DH::space_dimension> &function,
- VectorType &vec)
+ template <typename VectorType, typename DoFHandlerType>
+ void interpolate (const DoFHandlerType &dof,
+ const Function<DoFHandlerType::space_dimension> &function,
+ VectorType &vec)
{
- interpolate(StaticMappingQ1<DH::dimension, DH::space_dimension>::mapping,
- dof, function, vec);
+ interpolate(StaticMappingQ1<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>::mapping,
+ dof,
+ function,
+ vec);
}
}
- template<typename VectorType, typename DH>
+ template<typename VectorType, typename DoFHandlerType>
void
- interpolate_based_on_material_id(const Mapping<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof,
- const std::map< types::material_id, const Function<DH::space_dimension>* > &function_map,
- VectorType &dst,
- const ComponentMask &component_mask)
+ interpolate_based_on_material_id
+ (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const std::map<types::material_id, const Function<DoFHandlerType::space_dimension> *> &function_map,
+ VectorType &dst,
+ const ComponentMask &component_mask)
{
- const unsigned int dim = DH::dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
Assert( component_mask.represents_n_components(dof.get_fe().n_components()),
ExcMessage("The number of components in the mask has to be either "
ExcMessage("You cannot specify the invalid material indicator "
"in your function map."));
- for ( typename std::map< types::material_id, const Function<DH::space_dimension>* >::const_iterator
- iter = function_map.begin();
- iter != function_map.end();
- ++iter )
+ for (typename std::map<types::material_id, const Function<DoFHandlerType::space_dimension>* >
+ ::const_iterator
+ iter = function_map.begin();
+ iter != function_map.end();
+ ++iter )
{
Assert( dof.get_fe().n_components() == iter->second->n_components,
ExcDimensionMismatch(dof.get_fe().n_components(), iter->second->n_components) );
}
- const hp::FECollection<DH::dimension, DH::space_dimension> fe(dof.get_fe());
+ const hp::FECollection<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
+ fe(dof.get_fe());
const unsigned int n_components = fe.n_components();
const bool fe_is_system = (n_components != 1);
- typename DH::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
+ endc = dof.end();
std::vector< std::vector< Point<dim> > > unit_support_points(fe.size());
for (unsigned int fe_index = 0; fe_index < fe.size(); ++fe_index)
const unsigned int max_rep_points = *std::max_element(n_rep_points.begin(),
n_rep_points.end());
- std::vector< types::global_dof_index> dofs_on_cell(fe.max_dofs_per_cell());
- std::vector< Point<DH::space_dimension> > rep_points(max_rep_points);
+ std::vector< types::global_dof_index> dofs_on_cell(fe.max_dofs_per_cell());
+ std::vector< Point<DoFHandlerType::space_dimension> > rep_points(max_rep_points);
std::vector< std::vector<double> > function_values_scalar(fe.size());
std::vector< std::vector< Vector<double> > > function_values_system(fe.size());
for (unsigned int fe_index = 0; fe_index < fe.size(); ++fe_index)
support_quadrature.push_back( Quadrature<dim>(unit_support_points[fe_index]) );
- hp::MappingCollection<dim, DH::space_dimension> mapping_collection(mapping);
- hp::FEValues<dim, DH::space_dimension> fe_values(mapping_collection,
- fe,
- support_quadrature,
- update_quadrature_points);
+ hp::MappingCollection<dim, DoFHandlerType::space_dimension> mapping_collection(mapping);
+ hp::FEValues<dim, DoFHandlerType::space_dimension> fe_values(mapping_collection,
+ fe,
+ support_quadrature,
+ update_quadrature_points);
for ( ; cell != endc; ++cell)
if ( cell->is_locally_owned() )
fe_values.reinit(cell);
- const std::vector< Point<DH::space_dimension> > &support_points = fe_values.get_present_fe_values().get_quadrature_points();
+ const std::vector< Point<DoFHandlerType::space_dimension> > &support_points
+ = fe_values.get_present_fe_values().get_quadrature_points();
rep_points.resize( dofs_of_rep_points[fe_index].size() );
for (unsigned int i = 0; i < dofs_of_rep_points[fe_index].size(); ++i)
* mapping here because the function we evaluate for the DoFs is zero in
* the mapped locations as well as in the original, unmapped locations
*/
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_zero_boundary_values (const DH &dof_handler,
+ interpolate_zero_boundary_values (const DoFHandlerType &dof_handler,
std::map<types::global_dof_index,double> &boundary_values)
{
- const unsigned int dim = DH::dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
// loop over all boundary faces
// to get all dof indices of
// that is actually wholly on
// the boundary, not only by
// one line or one vertex
- typename DH::active_cell_iterator
+ typename DoFHandlerType::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
std::vector<types::global_dof_index> face_dof_indices;
- template <int dim, int spacedim, template <int,int> class DH, typename VectorType>
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType, typename VectorType>
void
- interpolate_to_different_mesh (const DH<dim, spacedim> &dof1,
- const VectorType &u1,
- const DH<dim, spacedim> &dof2,
- VectorType &u2)
+ interpolate_to_different_mesh (const DoFHandlerType<dim, spacedim> &dof1,
+ const VectorType &u1,
+ const DoFHandlerType<dim, spacedim> &dof2,
+ VectorType &u2)
{
Assert(GridTools::have_same_coarse_mesh(dof1, dof2),
ExcMessage ("The two containers must represent triangulations that "
"have the same coarse meshes"));
- InterGridMap<DH<dim, spacedim> > intergridmap;
+ InterGridMap<DoFHandlerType<dim, spacedim> > intergridmap;
intergridmap.make_mapping(dof1, dof2);
ConstraintMatrix dummy;
- template <int dim, int spacedim, template <int,int> class DH, typename VectorType>
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType, typename VectorType>
void
- interpolate_to_different_mesh (const DH<dim, spacedim> &dof1,
- const VectorType &u1,
- const DH<dim, spacedim> &dof2,
- const ConstraintMatrix &constraints,
- VectorType &u2)
+ interpolate_to_different_mesh (const DoFHandlerType<dim, spacedim> &dof1,
+ const VectorType &u1,
+ const DoFHandlerType<dim, spacedim> &dof2,
+ const ConstraintMatrix &constraints,
+ VectorType &u2)
{
Assert(GridTools::have_same_coarse_mesh(dof1, dof2),
ExcMessage ("The two containers must represent triangulations that "
"have the same coarse meshes"));
- InterGridMap<DH<dim, spacedim> > intergridmap;
+ InterGridMap<DoFHandlerType<dim, spacedim> > intergridmap;
intergridmap.make_mapping(dof1, dof2);
interpolate_to_different_mesh(intergridmap, u1, constraints, u2);
}
- template <int dim, int spacedim, template <int,int> class DH, typename VectorType>
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType, typename VectorType>
void
- interpolate_to_different_mesh (const InterGridMap<DH<dim, spacedim> > &intergridmap,
- const VectorType &u1,
- const ConstraintMatrix &constraints,
- VectorType &u2)
+ interpolate_to_different_mesh
+ (const InterGridMap<DoFHandlerType<dim, spacedim> > &intergridmap,
+ const VectorType &u1,
+ const ConstraintMatrix &constraints,
+ VectorType &u2)
{
- const DH<dim, spacedim> &dof1 = intergridmap.get_source_grid();
- const DH<dim, spacedim> &dof2 = intergridmap.get_destination_grid();
+ const DoFHandlerType<dim, spacedim> &dof1 = intergridmap.get_source_grid();
+ const DoFHandlerType<dim, spacedim> &dof2 = intergridmap.get_destination_grid();
(void)dof2;
Assert(u1.size()==dof1.n_dofs(),
// Therefor, loop over all cells
// (active and inactive) of the source
// grid ..
- typename DH<dim,spacedim>::cell_iterator cell1 = dof1.begin();
- const typename DH<dim,spacedim>::cell_iterator endc1 = dof1.end();
+ typename DoFHandlerType<dim,spacedim>::cell_iterator cell1 = dof1.begin();
+ const typename DoFHandlerType<dim,spacedim>::cell_iterator endc1 = dof1.end();
for (; cell1 != endc1; ++cell1)
{
- const typename DH<dim,spacedim>::cell_iterator cell2 = intergridmap[cell1];
+ const typename DoFHandlerType<dim,spacedim>::cell_iterator cell2 = intergridmap[cell1];
// .. and skip if source and destination
// cells are not on the same level ..
/**
* Compute the boundary values to be used in the project() functions.
*/
- template <int dim, int spacedim, template <int,int> class DH,
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType,
template <int,int> class M_or_MC, template <int> class Q_or_QC>
- void project_compute_b_v (const M_or_MC<dim, spacedim> &mapping,
- const DH<dim,spacedim> &dof,
- const Function<spacedim> &function,
- const bool enforce_zero_boundary,
- const Q_or_QC<dim-1> &q_boundary,
- const bool project_to_boundary_first,
- std::map<types::global_dof_index,double> &boundary_values)
+ void project_compute_b_v
+ (const M_or_MC<dim, spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof,
+ const Function<spacedim> &function,
+ const bool enforce_zero_boundary,
+ const Q_or_QC<dim-1> &q_boundary,
+ const bool project_to_boundary_first,
+ std::map<types::global_dof_index,double> &boundary_values)
{
if (enforce_zero_boundary == true)
// no need to project boundary
/**
* Generic implementation of the project() function
*/
- template <int dim, int spacedim, typename VectorType, template <int,int> class DH,
+ template <int dim, int spacedim, typename VectorType,
+ template <int, int> class DoFHandlerType,
template <int,int> class M_or_MC, template <int> class Q_or_QC>
- void do_project (const M_or_MC<dim, spacedim> &mapping,
- const DH<dim,spacedim> &dof,
- const ConstraintMatrix &constraints,
- const Q_or_QC<dim> &quadrature,
- const Function<spacedim> &function,
- VectorType &vec_result,
- const bool enforce_zero_boundary,
- const Q_or_QC<dim-1> &q_boundary,
- const bool project_to_boundary_first)
+ void do_project (const M_or_MC<dim, spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof,
+ const ConstraintMatrix &constraints,
+ const Q_or_QC<dim> &quadrature,
+ const Function<spacedim> &function,
+ VectorType &vec_result,
+ const bool enforce_zero_boundary,
+ const Q_or_QC<dim-1> &q_boundary,
+ const bool project_to_boundary_first)
{
Assert (dof.get_fe().n_components() == function.n_components,
ExcDimensionMismatch(dof.get_fe().n_components(),
// faces are points and it is far
// easier to simply work on
// individual vertices
- template <class DH, template <int,int> class M_or_MC>
+ template <typename DoFHandlerType, template <int,int> class M_or_MC>
static inline
- void do_interpolate_boundary_values (const M_or_MC<DH::dimension, DH::space_dimension> &,
- const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask,
- const dealii::internal::int2type<1>)
+ void do_interpolate_boundary_values
+ (const M_or_MC<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &,
+ const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask,
+ const dealii::internal::int2type<1>)
{
- const unsigned int dim = DH::dimension;
- const unsigned int spacedim=DH::space_dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
Assert (component_mask.represents_n_components(dof.get_fe().n_components()),
ExcMessage ("The number of components in the mask has to be either "
if (function_map.size() == 0)
return;
- for (typename DH::active_cell_iterator cell = dof.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell = dof.begin_active();
cell != dof.end(); ++cell)
for (unsigned int direction=0;
direction<GeometryInfo<dim>::faces_per_cell; ++direction)
&&
(function_map.find(cell->face(direction)->boundary_id()) != function_map.end()))
{
- const Function<DH::space_dimension> &boundary_function
+ const Function<DoFHandlerType::space_dimension> &boundary_function
= *function_map.find(cell->face(direction)->boundary_id())->second;
// get the FE corresponding to this
// dim_, it is clearly less specialized than the 1d function above and
// whenever possible (i.e., if dim==1), the function template above
// will be used
- template <class DH, template <int,int> class M_or_MC, int dim_>
+ template <typename DoFHandlerType, template <int,int> class M_or_MC, int dim_>
static inline
void
- do_interpolate_boundary_values (const M_or_MC<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask,
- const dealii::internal::int2type<dim_>)
+ do_interpolate_boundary_values
+ (const M_or_MC<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask,
+ const dealii::internal::int2type<dim_>)
{
- const unsigned int dim = DH::dimension;
- const unsigned int spacedim=DH::space_dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
+ const unsigned int spacedim=DoFHandlerType::space_dimension;
Assert (component_mask.represents_n_components(dof.get_fe().n_components()),
ExcMessage ("The number of components in the mask has to be either "
dealii::hp::FEFaceValues<dim,spacedim> x_fe_values (mapping_collection, finite_elements, q_collection,
update_quadrature_points);
- typename DH::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
+ endc = dof.end();
for (; cell!=endc; ++cell)
if (!cell->is_artificial())
for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
"elements"));
}
- const typename DH::face_iterator face = cell->face(face_no);
+ const typename DoFHandlerType::face_iterator face = cell->face(face_no);
const types::boundary_id boundary_component = face->boundary_id();
// see if this face is part of the boundaries for which we are
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const Mapping<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask_)
+ interpolate_boundary_values
+ (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask_)
{
do_interpolate_boundary_values (mapping, dof, function_map, boundary_values,
component_mask_,
- dealii::internal::int2type<DH::dimension>());
+ dealii::internal::int2type<DoFHandlerType::dimension>());
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const Mapping<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof,
- const types::boundary_id boundary_component,
- const Function<DH::space_dimension> &boundary_function,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask)
+ interpolate_boundary_values
+ (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const types::boundary_id boundary_component,
+ const Function<DoFHandlerType::space_dimension> &boundary_function,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask)
{
- typename FunctionMap<DH::space_dimension>::type function_map;
+ typename FunctionMap<DoFHandlerType::space_dimension>::type function_map;
function_map[boundary_component] = &boundary_function;
interpolate_boundary_values (mapping, dof, function_map, boundary_values,
component_mask);
template <int dim, int spacedim>
void
- interpolate_boundary_values (const hp::MappingCollection<dim,spacedim> &mapping,
- const hp::DoFHandler<dim,spacedim> &dof,
- const typename FunctionMap<spacedim>::type &function_map,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask_)
+ interpolate_boundary_values
+ (const hp::MappingCollection<dim,spacedim> &mapping,
+ const hp::DoFHandler<dim,spacedim> &dof,
+ const typename FunctionMap<spacedim>::type &function_map,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask_)
{
do_interpolate_boundary_values (mapping, dof, function_map, boundary_values,
component_mask_,
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const DH &dof,
- const types::boundary_id boundary_component,
- const Function<DH::space_dimension> &boundary_function,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask)
+ interpolate_boundary_values
+ (const DoFHandlerType &dof,
+ const types::boundary_id boundary_component,
+ const Function<DoFHandlerType::space_dimension> &boundary_function,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask)
{
- interpolate_boundary_values(StaticMappingQ1<DH::dimension,DH::space_dimension>::mapping,
+ interpolate_boundary_values(StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
dof, boundary_component,
boundary_function, boundary_values, component_mask);
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- interpolate_boundary_values (const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<types::global_dof_index,double> &boundary_values,
- const ComponentMask &component_mask)
+ interpolate_boundary_values
+ (const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ std::map<types::global_dof_index,double> &boundary_values,
+ const ComponentMask &component_mask)
{
- interpolate_boundary_values(StaticMappingQ1<DH::dimension,DH::space_dimension>::mapping,
- dof, function_map,
- boundary_values, component_mask);
+ interpolate_boundary_values
+ (StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
+ dof, function_map,
+ boundary_values, component_mask);
}
- template <class DH>
+ template <typename DoFHandlerType>
void
interpolate_boundary_values
- (const Mapping<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- ConstraintMatrix &constraints,
- const ComponentMask &component_mask_)
+ (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ ConstraintMatrix &constraints,
+ const ComponentMask &component_mask_)
{
std::map<types::global_dof_index,double> boundary_values;
interpolate_boundary_values (mapping, dof, function_map,
- template <class DH>
+ template <typename DoFHandlerType>
void
interpolate_boundary_values
- (const Mapping<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof,
- const types::boundary_id boundary_component,
- const Function<DH::space_dimension> &boundary_function,
- ConstraintMatrix &constraints,
- const ComponentMask &component_mask)
+ (const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof,
+ const types::boundary_id boundary_component,
+ const Function<DoFHandlerType::space_dimension> &boundary_function,
+ ConstraintMatrix &constraints,
+ const ComponentMask &component_mask)
{
- typename FunctionMap<DH::space_dimension>::type function_map;
+ typename FunctionMap<DoFHandlerType::space_dimension>::type function_map;
function_map[boundary_component] = &boundary_function;
interpolate_boundary_values (mapping, dof, function_map, constraints,
component_mask);
- template <class DH>
+ template <typename DoFHandlerType>
void
interpolate_boundary_values
- (const DH &dof,
- const types::boundary_id boundary_component,
- const Function<DH::space_dimension> &boundary_function,
- ConstraintMatrix &constraints,
- const ComponentMask &component_mask)
+ (const DoFHandlerType &dof,
+ const types::boundary_id boundary_component,
+ const Function<DoFHandlerType::space_dimension> &boundary_function,
+ ConstraintMatrix &constraints,
+ const ComponentMask &component_mask)
{
- interpolate_boundary_values(StaticMappingQ1<DH::dimension,DH::space_dimension>::mapping,
- dof, boundary_component,
- boundary_function, constraints, component_mask);
+ interpolate_boundary_values
+ (StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
+ dof, boundary_component,
+ boundary_function, constraints, component_mask);
}
- template <class DH>
+ template <typename DoFHandlerType>
void
interpolate_boundary_values
- (const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &function_map,
- ConstraintMatrix &constraints,
- const ComponentMask &component_mask)
+ (const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &function_map,
+ ConstraintMatrix &constraints,
+ const ComponentMask &component_mask)
{
- interpolate_boundary_values(StaticMappingQ1<DH::dimension,DH::space_dimension>::mapping,
- dof, function_map,
- constraints, component_mask);
+ interpolate_boundary_values
+ (StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
+ dof, function_map,
+ constraints, component_mask);
}
namespace
{
- template <int dim, int spacedim, template <int,int> class DH,
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType,
template <int,int> class M_or_MC, template <int> class Q_or_QC>
void
- do_project_boundary_values (const M_or_MC<dim, spacedim> &mapping,
- const DH<dim, spacedim> &dof,
+ do_project_boundary_values (const M_or_MC<dim, spacedim> &mapping,
+ const DoFHandlerType<dim, spacedim> &dof,
const typename FunctionMap<spacedim>::type &boundary_functions,
- const Q_or_QC<dim-1> &q,
- std::map<types::global_dof_index,double> &boundary_values,
- std::vector<unsigned int> component_mapping)
+ const Q_or_QC<dim-1> &q,
+ std::map<types::global_dof_index,double> &boundary_values,
+ std::vector<unsigned int> component_mapping)
{
// in 1d, projection onto the 0d end points == interpolation
if (dim == 1)
#ifdef DEBUG
// Assert that there are no hanging nodes at the boundary
int level = -1;
- for (typename DH<dim,spacedim>::active_cell_iterator cell = dof.begin_active();
+ for (typename DoFHandlerType<dim,spacedim>::active_cell_iterator cell = dof.begin_active();
cell != dof.end(); ++cell)
for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
{
}
}
- template <int dim, class DH>
+ template <int dim, typename DoFHandlerType>
void
- compute_project_boundary_values_curl_conforming_l2 (const DH &dof_handler,
- const unsigned int first_vector_component,
- const Function<dim> &boundary_function,
- const types::boundary_id boundary_component,
- ConstraintMatrix &constraints,
- const hp::MappingCollection<dim, dim> &mapping_collection)
+ compute_project_boundary_values_curl_conforming_l2
+ (const DoFHandlerType &dof_handler,
+ const unsigned int first_vector_component,
+ const Function<dim> &boundary_function,
+ const types::boundary_id boundary_component,
+ ConstraintMatrix &constraints,
+ const hp::MappingCollection<dim, dim> &mapping_collection)
{
// L2-projection based interpolation formed in one (in 2D) or two (in 3D) steps.
//
std::vector<bool> dofs_processed;
std::vector<double> dof_values;
std::vector<types::global_dof_index> face_dof_indices;
- typename DH::active_cell_iterator cell = dof_handler.begin_active ();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active ();
switch (dim)
{
- template <int dim, template <int, int> class DH, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, int spacedim>
void
- compute_no_normal_flux_constraints (const DH<dim,spacedim> &dof_handler,
- const unsigned int first_vector_component,
+ compute_no_normal_flux_constraints (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const unsigned int first_vector_component,
const std::set<types::boundary_id> &boundary_ids,
- ConstraintMatrix &constraints,
- const Mapping<dim, spacedim> &mapping)
+ ConstraintMatrix &constraints,
+ const Mapping<dim, spacedim> &mapping)
{
ZeroFunction<dim>zero_function(dim);
typename FunctionMap<spacedim>::type function_map;
mapping);
}
- template <int dim, template <int, int> class DH, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, int spacedim>
void
- compute_nonzero_normal_flux_constraints (const DH<dim,spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> &boundary_ids,
- typename FunctionMap<spacedim>::type &function_map,
- ConstraintMatrix &constraints,
- const Mapping<dim, spacedim> &mapping)
+ compute_nonzero_normal_flux_constraints
+ (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ typename FunctionMap<spacedim>::type &function_map,
+ ConstraintMatrix &constraints,
+ const Mapping<dim, spacedim> &mapping)
{
Assert (dim > 1,
ExcMessage ("This function is not useful in 1d because it amounts "
// normal vector was computed on
typedef
std::multimap<internal::VectorDoFTuple<dim>,
- std::pair<Tensor<1,dim>, typename DH<dim,spacedim>::active_cell_iterator> >
+ std::pair<Tensor<1,dim>, typename DoFHandlerType<dim,spacedim>::active_cell_iterator> >
DoFToNormalsMap;
std::map<internal::VectorDoFTuple<dim>, Vector<double> >
dof_vector_to_b_values;
DoFToNormalsMap dof_to_normals_map;
// now loop over all cells and all faces
- typename DH<dim,spacedim>::active_cell_iterator
+ typename DoFHandlerType<dim,spacedim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
std::set<types::boundary_id>::iterator b_id;
!= boundary_ids.end())
{
const FiniteElement<dim> &fe = cell->get_fe ();
- typename DH<dim,spacedim>::face_iterator face = cell->face(face_no);
+ typename DoFHandlerType<dim,spacedim>::face_iterator face = cell->face(face_no);
// get the indices of the dofs on this cell...
face_dofs.resize (fe.dofs_per_face);
// contributed to the current set of vector dofs, add up the normal
// vectors. the values of the map are pairs of normal vectors and
// number of cells that have contributed
- typedef std::map<typename DH<dim,spacedim>::active_cell_iterator,
+ typedef std::map<typename DoFHandlerType<dim,spacedim>::active_cell_iterator,
std::pair<Tensor<1,dim>, unsigned int> >
CellToNormalsMap;
// std::list instead of a std::set (which would be more natural)
// because std::set requires that the stored elements are
// comparable with operator<
- typedef std::map<typename DH<dim,spacedim>::active_cell_iterator,
+ typedef std::map<typename DoFHandlerType<dim,spacedim>::active_cell_iterator,
std::list<Tensor<1,dim> > >
CellContributions;
CellContributions cell_contributions;
- template <int dim, template <int, int> class DH, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, int spacedim>
void
- compute_normal_flux_constraints (const DH<dim,spacedim> &dof_handler,
- const unsigned int first_vector_component,
+ compute_normal_flux_constraints (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const unsigned int first_vector_component,
const std::set<types::boundary_id> &boundary_ids,
- ConstraintMatrix &constraints,
- const Mapping<dim, spacedim> &mapping)
+ ConstraintMatrix &constraints,
+ const Mapping<dim, spacedim> &mapping)
{
ZeroFunction<dim>zero_function(dim);
typename FunctionMap<spacedim>::type function_map;
mapping);
}
- template <int dim, template <int, int> class DH, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, int spacedim>
void
- compute_nonzero_tangential_flux_constraints (const DH<dim,spacedim> &dof_handler,
- const unsigned int first_vector_component,
- const std::set<types::boundary_id> &boundary_ids,
- typename FunctionMap<spacedim>::type &function_map,
- ConstraintMatrix &constraints,
- const Mapping<dim, spacedim> &mapping)
+ compute_nonzero_tangential_flux_constraints
+ (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const unsigned int first_vector_component,
+ const std::set<types::boundary_id> &boundary_ids,
+ typename FunctionMap<spacedim>::type &function_map,
+ ConstraintMatrix &constraints,
+ const Mapping<dim, spacedim> &mapping)
{
ConstraintMatrix no_normal_flux_constraints(constraints.get_local_lines());
compute_nonzero_normal_flux_constraints (dof_handler,
std::set<types::boundary_id>::iterator b_id;
std::vector<std_cxx11::array<types::global_dof_index,dim> > cell_vector_dofs;
- for (typename DH<dim,spacedim>::active_cell_iterator cell =
+ for (typename DoFHandlerType<dim,spacedim>::active_cell_iterator cell =
dof_handler.begin_active(); cell != dof_handler.end(); ++cell)
if (!cell->is_artificial())
for (unsigned int face_no=0; face_no < GeometryInfo<dim>::faces_per_cell;
!= boundary_ids.end())
{
const FiniteElement<dim> &fe = cell->get_fe();
- typename DH<dim,spacedim>::face_iterator face=cell->face(face_no);
+ typename DoFHandlerType<dim,spacedim>::face_iterator face=cell->face(face_no);
// get the indices of the dofs on this cell...
face_dofs.resize (fe.dofs_per_face);
- template <int dim, class InVector, class OutVector, class DH, int spacedim>
+ template <int dim, class InVector, class OutVector, typename DoFHandlerType, int spacedim>
static
void
do_integrate_difference (const dealii::hp::MappingCollection<dim,spacedim> &mapping,
- const DH &dof,
- const InVector &fe_function,
- const Function<spacedim> &exact_solution,
- OutVector &difference,
- const dealii::hp::QCollection<dim> &q,
- const NormType &norm,
- const Function<spacedim> *weight,
- const double exponent_1)
+ const DoFHandlerType &dof,
+ const InVector &fe_function,
+ const Function<spacedim> &exact_solution,
+ OutVector &difference,
+ const dealii::hp::QCollection<dim> &q,
+ const NormType &norm,
+ const Function<spacedim> *weight,
+ const double exponent_1)
{
typedef typename InVector::value_type Number;
// we mark the "exponent" parameter to this function "const" since it is
IDScratchData<dim,spacedim, Number> data(mapping, fe_collection, q, update_flags);
// loop over all cells
- for (typename DH::active_cell_iterator cell = dof.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell = dof.begin_active();
cell != dof.end(); ++cell)
if (cell->is_locally_owned())
{
}
- template<class DH, typename VectorType>
- void get_position_vector(const DH &dh,
- VectorType &vector,
- const ComponentMask &mask)
+ template<typename DoFHandlerType, typename VectorType>
+ void get_position_vector(const DoFHandlerType &dh,
+ VectorType &vector,
+ const ComponentMask &mask)
{
AssertDimension(vector.size(), dh.n_dofs());
- const unsigned int dim=DH::dimension;
- const unsigned int spacedim=DH::space_dimension;
+ const unsigned int dim=DoFHandlerType::dimension;
+ const unsigned int spacedim=DoFHandlerType::space_dimension;
const FiniteElement<dim, spacedim> &fe = dh.get_fe();
if ( fe.has_support_points() )
{
- typename DH::active_cell_iterator cell;
+ typename DoFHandlerType::active_cell_iterator cell;
const Quadrature<dim> quad(fe.get_unit_support_points());
MappingQ<dim,spacedim> map_q(fe.degree);
// carefully selecting the right components.
FESystem<dim,spacedim> feq(FE_Q<dim,spacedim>(degree), spacedim);
- DH dhq(dh.get_tria());
+ DoFHandlerType dhq(dh.get_tria());
dhq.distribute_dofs(feq);
Vector<double> eulerq(dhq.n_dofs());
const ComponentMask maskq(spacedim, true);
namespace distributed
{
- template<int dim, typename VectorType, class DH>
- SolutionTransfer<dim, VectorType, DH>::SolutionTransfer (const DH &dof)
+ template<int dim, typename VectorType, typename DoFHandlerType>
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::SolutionTransfer (const DoFHandlerType &dof)
:
dof_handler(&dof, typeid(*this).name())
{
- template<int dim, typename VectorType, class DH>
- SolutionTransfer<dim, VectorType, DH>::~SolutionTransfer ()
+ template<int dim, typename VectorType, typename DoFHandlerType>
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::~SolutionTransfer ()
{}
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::
prepare_for_coarsening_and_refinement (const std::vector<const VectorType *> &all_in)
{
input_vectors = all_in;
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::register_data_attach (const std::size_t size)
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::register_data_attach (const std::size_t size)
{
Assert(size > 0, ExcMessage("Please transfer at least one vector!"));
offset
= tria->register_data_attach(size,
- std_cxx11::bind(&SolutionTransfer<dim, VectorType, DH>::pack_callback,
+ std_cxx11::bind(&SolutionTransfer<dim, VectorType,
+ DoFHandlerType>::pack_callback,
this,
std_cxx11::_1,
std_cxx11::_2,
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::
prepare_for_coarsening_and_refinement (const VectorType &in)
{
std::vector<const VectorType *> all_in(1, &in);
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::prepare_serialization (const VectorType &in)
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::prepare_serialization (const VectorType &in)
{
std::vector<const VectorType *> all_in(1, &in);
prepare_serialization(all_in);
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::prepare_serialization
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::prepare_serialization
(const std::vector<const VectorType *> &all_in)
{
prepare_for_coarsening_and_refinement (all_in);
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::deserialize (VectorType &in)
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::deserialize (VectorType &in)
{
std::vector<VectorType *> all_in(1, &in);
deserialize(all_in);
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::deserialize (std::vector<VectorType *> &all_in)
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::deserialize (std::vector<VectorType *> &all_in)
{
register_data_attach( get_data_size() * all_in.size() );
}
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::interpolate (std::vector<VectorType *> &all_out)
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate (std::vector<VectorType *> &all_out)
{
Assert(input_vectors.size()==all_out.size(),
ExcDimensionMismatch(input_vectors.size(), all_out.size()) );
Assert (tria != 0, ExcInternalError());
tria->notify_ready_to_unpack(offset,
- std_cxx11::bind(&SolutionTransfer<dim, VectorType, DH>::unpack_callback,
+ std_cxx11::bind(&SolutionTransfer<dim, VectorType,
+ DoFHandlerType>::unpack_callback,
this,
std_cxx11::_1,
std_cxx11::_2,
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::interpolate (VectorType &out)
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate (VectorType &out)
{
std::vector<VectorType *> all_out(1, &out);
interpolate(all_out);
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
unsigned int
- SolutionTransfer<dim, VectorType, DH>::get_data_size() const
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::get_data_size() const
{
return sizeof(double)* DoFTools::max_dofs_per_cell(*dof_handler);
}
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::
pack_callback(const typename Triangulation<dim,dim>::cell_iterator &cell_,
const typename Triangulation<dim,dim>::CellStatus /*status*/,
void *data)
{
typename VectorType::value_type *data_store = reinterpret_cast<typename VectorType::value_type *>(data);
- typename DH::cell_iterator cell(*cell_, dof_handler);
+ typename DoFHandlerType::cell_iterator cell(*cell_, dof_handler);
const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell;
::dealii::Vector<typename VectorType::value_type> dofvalues(dofs_per_cell);
}
- template<int dim, typename VectorType, class DH>
+ template<int dim, typename VectorType, typename DoFHandlerType>
void
- SolutionTransfer<dim, VectorType, DH>::unpack_callback
+ SolutionTransfer<dim, VectorType, DoFHandlerType>::unpack_callback
(const typename Triangulation<dim,dim>::cell_iterator &cell_,
const typename Triangulation<dim,dim>::CellStatus /*status*/,
const void *data,
std::vector<VectorType *> &all_out)
{
- typename DH::cell_iterator
+ typename DoFHandlerType::cell_iterator
cell(*cell_, dof_handler);
const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell;
/*------------------------- Static variables: DoFAccessor -----------------------*/
-template <int structdim, class DH, bool level_dof_access>
-const unsigned int DoFAccessor<structdim,DH,level_dof_access>::dimension;
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
+const unsigned int DoFAccessor<structdim,DoFHandlerType,level_dof_access>::dimension;
-template <int structdim, class DH, bool level_dof_access>
-const unsigned int DoFAccessor<structdim,DH,level_dof_access>::space_dimension;
+template <int structdim, typename DoFHandlerType, bool level_dof_access>
+const unsigned int DoFAccessor<structdim,DoFHandlerType,level_dof_access>::space_dimension;
-template <class DH, bool lda>
+template <typename DoFHandlerType, bool lda>
void
-DoFCellAccessor<DH,lda>::update_cell_dof_indices_cache () const
+DoFCellAccessor<DoFHandlerType,lda>::update_cell_dof_indices_cache () const
{
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
-template <class DH, bool lda>
+template <typename DoFHandlerType, bool lda>
void
-DoFCellAccessor<DH,lda>::set_dof_indices (const std::vector<types::global_dof_index> &local_dof_indices)
+DoFCellAccessor<DoFHandlerType,lda>::set_dof_indices (const std::vector<types::global_dof_index> &local_dof_indices)
{
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
-template <class DH, bool lda>
-TriaIterator<DoFCellAccessor<DH,lda> >
-DoFCellAccessor<DH,lda>::neighbor_child_on_subface (const unsigned int face,
- const unsigned int subface) const
+template <typename DoFHandlerType, bool lda>
+TriaIterator<DoFCellAccessor<DoFHandlerType,lda> >
+DoFCellAccessor<DoFHandlerType,lda>::neighbor_child_on_subface (const unsigned int face,
+ const unsigned int subface) const
{
const TriaIterator<CellAccessor<dim,spacedim> > q
= CellAccessor<dim,spacedim>::neighbor_child_on_subface (face, subface);
- return TriaIterator<DoFCellAccessor<DH,lda> > (*q, this->dof_handler);
+ return TriaIterator<DoFCellAccessor<DoFHandlerType,lda> > (*q, this->dof_handler);
}
DEAL_II_NAMESPACE_OPEN
-template <class DH, bool lda>
+template <typename DoFHandlerType, bool lda>
template <class InputVector, typename number>
void
-DoFCellAccessor<DH,lda>::
+DoFCellAccessor<DoFHandlerType,lda>::
get_interpolated_dof_values (const InputVector &values,
Vector<number> &interpolated_values,
const unsigned int fe_index) const
// cell unless the finite element we need to interpolate to is different than
// the one we have on the current cell
{
- if ((dynamic_cast<DoFHandler<DH::dimension,DH::space_dimension>*>
+ if ((dynamic_cast<DoFHandler<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(this->dof_handler)
!= 0)
||
// or that you specify the correct one
(fe_index == this->active_fe_index())
||
- (fe_index == DH::default_fe_index))
+ (fe_index == DoFHandlerType::default_fe_index))
this->get_dof_values (values, interpolated_values);
else
{
// mesh). consequently, we cannot interpolate from children's FE
// space to this cell's (unknown) FE space unless an explicit
// fe_index is given
- Assert ((dynamic_cast<DoFHandler<DH::dimension,DH::space_dimension>*>
+ Assert ((dynamic_cast<DoFHandler<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(this->dof_handler)
!= 0)
||
- (fe_index != DH::default_fe_index),
+ (fe_index != DoFHandlerType::default_fe_index),
ExcMessage ("You cannot call this function on non-active cells "
"of hp::DoFHandler objects unless you provide an explicit "
"finite element index because they do not have naturally "
DEAL_II_NAMESPACE_OPEN
-template <class DH, bool lda>
+template <typename DoFHandlerType, bool lda>
template <class OutputVector, typename number>
void
-DoFCellAccessor<DH,lda>::
+DoFCellAccessor<DoFHandlerType,lda>::
set_dof_values_by_interpolation (const Vector<number> &local_values,
OutputVector &values,
const unsigned int fe_index) const
{
if (!this->has_children() && !this->is_artificial ())
{
- if ((dynamic_cast<DoFHandler<DH::dimension,DH::space_dimension>*>
+ if ((dynamic_cast<DoFHandler<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(this->dof_handler)
!= 0)
||
// or that you specify the correct one
(fe_index == this->active_fe_index())
||
- (fe_index == DH::default_fe_index))
+ (fe_index == DoFHandlerType::default_fe_index))
// simply set the values on this cell
this->set_dof_values (local_values, values);
else
else
// otherwise distribute them to the children
{
- Assert ((dynamic_cast<DoFHandler<DH::dimension,DH::space_dimension>*>
+ Assert ((dynamic_cast<DoFHandler<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(this->dof_handler)
!= 0)
||
- (fe_index != DH::default_fe_index),
+ (fe_index != DoFHandlerType::default_fe_index),
ExcMessage ("You cannot call this function on non-active cells "
"of hp::DoFHandler objects unless you provide an explicit "
"finite element index because they do not have naturally "
namespace internal
{
- template <class DH>
- void create_graph (const DH &dof_handler,
- const bool use_constraints,
- boosttypes::Graph &graph,
- boosttypes::property_map<boosttypes::Graph,boosttypes::vertex_degree_t>::type &graph_degree)
+ template <typename DoFHandlerType>
+ void create_graph
+ (const DoFHandlerType &dof_handler,
+ const bool use_constraints,
+ boosttypes::Graph &graph,
+ boosttypes::property_map<boosttypes::Graph,boosttypes::vertex_degree_t>::type &graph_degree)
{
{
// create intermediate sparsity pattern
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- Cuthill_McKee (DH &dof_handler,
+ Cuthill_McKee (DoFHandlerType &dof_handler,
const bool reversed_numbering,
const bool use_constraints)
{
std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
compute_Cuthill_McKee(renumbering, dof_handler, reversed_numbering,
use_constraints);
}
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler,
- const bool reversed_numbering,
- const bool use_constraints)
+ const DoFHandlerType &dof_handler,
+ const bool reversed_numbering,
+ const bool use_constraints)
{
boosttypes::Graph
graph(dof_handler.n_dofs());
new_dof_indices[index_map[inv_perm[c]]] = c;
Assert (std::find (new_dof_indices.begin(), new_dof_indices.end(),
- DH::invalid_dof_index) == new_dof_indices.end(),
+ DoFHandlerType::invalid_dof_index) == new_dof_indices.end(),
ExcInternalError());
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- king_ordering (DH &dof_handler,
+ king_ordering (DoFHandlerType &dof_handler,
const bool reversed_numbering,
const bool use_constraints)
{
std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
compute_king_ordering(renumbering, dof_handler, reversed_numbering,
use_constraints);
}
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_king_ordering (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler,
- const bool reversed_numbering,
- const bool use_constraints)
+ const DoFHandlerType &dof_handler,
+ const bool reversed_numbering,
+ const bool use_constraints)
{
boosttypes::Graph
graph(dof_handler.n_dofs());
new_dof_indices[index_map[inv_perm[c]]] = c;
Assert (std::find (new_dof_indices.begin(), new_dof_indices.end(),
- DH::invalid_dof_index) == new_dof_indices.end(),
+ DoFHandlerType::invalid_dof_index) == new_dof_indices.end(),
ExcInternalError());
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- minimum_degree (DH &dof_handler,
+ minimum_degree (DoFHandlerType &dof_handler,
const bool reversed_numbering,
const bool use_constraints)
{
std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
compute_minimum_degree(renumbering, dof_handler, reversed_numbering,
use_constraints);
}
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_minimum_degree (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler,
- const bool reversed_numbering,
- const bool use_constraints)
+ const DoFHandlerType &dof_handler,
+ const bool reversed_numbering,
+ const bool use_constraints)
{
(void)use_constraints;
Assert (use_constraints == false, ExcNotImplemented());
std::vector<dealii::types::global_dof_index> dofs_on_this_cell;
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell!=endc; ++cell)
{
- template <class DH>
+ template <typename DoFHandlerType>
void
- Cuthill_McKee (DH &dof_handler,
- const bool reversed_numbering,
- const bool use_constraints,
+ Cuthill_McKee (DoFHandlerType &dof_handler,
+ const bool reversed_numbering,
+ const bool use_constraints,
const std::vector<types::global_dof_index> &starting_indices)
{
std::vector<types::global_dof_index> renumbering(dof_handler.locally_owned_dofs().n_elements(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
compute_Cuthill_McKee(renumbering, dof_handler, reversed_numbering,
use_constraints, starting_indices);
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_indices,
- const DH &dof_handler,
- const bool reversed_numbering,
- const bool use_constraints,
+ compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_indices,
+ const DoFHandlerType &dof_handler,
+ const bool reversed_numbering,
+ const bool use_constraints,
const std::vector<types::global_dof_index> &starting_indices)
{
// see if there is anything to do at all or whether we can skip the work on this processor
- template <class DH>
- void Cuthill_McKee (DH &dof_handler,
- const unsigned int level,
- const bool reversed_numbering,
+ template <typename DoFHandlerType>
+ void Cuthill_McKee (DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const bool reversed_numbering,
const std::vector<types::global_dof_index> &starting_indices)
{
Assert(dof_handler.n_dofs(level) != numbers::invalid_dof_index,
- template <class DH>
+ template <typename DoFHandlerType>
void
- component_wise (DH &dof_handler,
- const unsigned int level,
+ component_wise (DoFHandlerType &dof_handler,
+ const unsigned int level,
const std::vector<unsigned int> &component_order_arg)
{
Assert(dof_handler.n_dofs(level) != numbers::invalid_dof_index,
ExcNotInitialized());
std::vector<types::global_dof_index> renumbering (dof_handler.n_dofs(level),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
- typename DH::level_cell_iterator start =dof_handler.begin(level);
- typename DH::level_cell_iterator end = dof_handler.end(level);
+ typename DoFHandlerType::level_cell_iterator start =dof_handler.begin(level);
+ typename DoFHandlerType::level_cell_iterator end = dof_handler.end(level);
const types::global_dof_index result =
- compute_component_wise<DH::dimension, DH::space_dimension,
- typename DH::level_cell_iterator, typename DH::level_cell_iterator>
+ compute_component_wise<DoFHandlerType::dimension, DoFHandlerType::space_dimension,
+ typename DoFHandlerType::level_cell_iterator, typename DoFHandlerType::level_cell_iterator>
(renumbering, start, end, component_order_arg, true);
if (result == 0) return;
- template <class DH>
+ template <typename DoFHandlerType>
void
- sort_selected_dofs_back (DH &dof_handler,
+ sort_selected_dofs_back (DoFHandlerType &dof_handler,
const std::vector<bool> &selected_dofs)
{
std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
compute_sort_selected_dofs_back(renumbering, dof_handler, selected_dofs);
dof_handler.renumber_dofs(renumbering);
- template <class DH>
+ template <typename DoFHandlerType>
void
- sort_selected_dofs_back (DH &dof_handler,
+ sort_selected_dofs_back (DoFHandlerType &dof_handler,
const std::vector<bool> &selected_dofs,
const unsigned int level)
{
ExcNotInitialized());
std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(level),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
compute_sort_selected_dofs_back(renumbering, dof_handler, selected_dofs, level);
dof_handler.renumber_dofs(level, renumbering);
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_sort_selected_dofs_back (std::vector<types::global_dof_index> &new_indices,
- const DH &dof_handler,
- const std::vector<bool> &selected_dofs)
+ const DoFHandlerType &dof_handler,
+ const std::vector<bool> &selected_dofs)
{
const types::global_dof_index n_dofs = dof_handler.n_dofs();
Assert (selected_dofs.size() == n_dofs,
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_sort_selected_dofs_back (std::vector<types::global_dof_index> &new_indices,
- const DH &dof_handler,
- const std::vector<bool> &selected_dofs,
- const unsigned int level)
+ const DoFHandlerType &dof_handler,
+ const std::vector<bool> &selected_dofs,
+ const unsigned int level)
{
Assert(dof_handler.n_dofs(level) != numbers::invalid_dof_index,
ExcNotInitialized());
- template <class DH>
+ template <typename DoFHandlerType>
void
- cell_wise (DH &dof, const std::vector<typename DH::active_cell_iterator> &cells)
+ cell_wise (DoFHandlerType &dof,
+ const std::vector<typename DoFHandlerType::active_cell_iterator> &cells)
{
std::vector<types::global_dof_index> renumbering(dof.n_dofs());
std::vector<types::global_dof_index> reverse(dof.n_dofs());
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_cell_wise (
- std::vector<types::global_dof_index> &new_indices,
- std::vector<types::global_dof_index> &reverse,
- const DH &dof,
- const typename std::vector<typename DH::active_cell_iterator> &cells)
+ compute_cell_wise
+ (std::vector<types::global_dof_index> &new_indices,
+ std::vector<types::global_dof_index> &reverse,
+ const DoFHandlerType &dof,
+ const typename std::vector<typename DoFHandlerType::active_cell_iterator> &cells)
{
Assert(cells.size() == dof.get_tria().n_active_cells(),
ExcDimensionMismatch(cells.size(),
unsigned int global_index = 0;
- typename std::vector<typename DH::active_cell_iterator>::const_iterator cell;
+ typename std::vector<typename DoFHandlerType::active_cell_iterator>::const_iterator cell;
for (cell = cells.begin(); cell != cells.end(); ++cell)
{
- template <class DH>
- void cell_wise (
- DH &dof,
- const unsigned int level,
- const typename std::vector<typename DH::level_cell_iterator> &cells)
+ template <typename DoFHandlerType>
+ void cell_wise
+ (DoFHandlerType &dof,
+ const unsigned int level,
+ const typename std::vector<typename DoFHandlerType::level_cell_iterator> &cells)
{
Assert(dof.n_dofs(level) != numbers::invalid_dof_index,
ExcNotInitialized());
- template <class DH>
- void compute_cell_wise (
- std::vector<types::global_dof_index> &new_order,
- std::vector<types::global_dof_index> &reverse,
- const DH &dof,
- const unsigned int level,
- const typename std::vector<typename DH::level_cell_iterator> &cells)
+ template <typename DoFHandlerType>
+ void compute_cell_wise
+ (std::vector<types::global_dof_index> &new_order,
+ std::vector<types::global_dof_index> &reverse,
+ const DoFHandlerType &dof,
+ const unsigned int level,
+ const typename std::vector<typename DoFHandlerType::level_cell_iterator> &cells)
{
Assert(cells.size() == dof.get_tria().n_cells(level),
ExcDimensionMismatch(cells.size(),
unsigned int global_index = 0;
- typename std::vector<typename DH::level_cell_iterator>::const_iterator cell;
+ typename std::vector<typename DoFHandlerType::level_cell_iterator>::const_iterator cell;
for (cell = cells.begin(); cell != cells.end(); ++cell)
{
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_downstream (
- std::vector<types::global_dof_index> &new_indices,
- std::vector<types::global_dof_index> &reverse,
- const DH &dof,
- const Point<DH::space_dimension> &direction,
- const bool dof_wise_renumbering)
+ compute_downstream
+ (std::vector<types::global_dof_index> &new_indices,
+ std::vector<types::global_dof_index> &reverse,
+ const DoFHandlerType &dof,
+ const Point<DoFHandlerType::space_dimension> &direction,
+ const bool dof_wise_renumbering)
{
if (dof_wise_renumbering == false)
{
- std::vector<typename DH::active_cell_iterator> ordered_cells;
+ std::vector<typename DoFHandlerType::active_cell_iterator> ordered_cells;
ordered_cells.reserve(dof.get_tria().n_active_cells());
- const CompareDownstream<typename DH::active_cell_iterator, DH::space_dimension> comparator(direction);
+ const CompareDownstream<typename DoFHandlerType::active_cell_iterator,
+ DoFHandlerType::space_dimension> comparator(direction);
- typename DH::active_cell_iterator p = dof.begin_active();
- typename DH::active_cell_iterator end = dof.end();
+ typename DoFHandlerType::active_cell_iterator p = dof.begin_active();
+ typename DoFHandlerType::active_cell_iterator end = dof.end();
while (p!=end)
{
{
// similar code as for
// DoFTools::map_dofs_to_support_points, but
- // need to do this for general DH classes and
+ // need to do this for general DoFHandlerType classes and
// want to be able to sort the result
// (otherwise, could use something like
// DoFTools::map_support_points_to_dofs)
const unsigned int n_dofs = dof.n_dofs();
- std::vector<std::pair<Point<DH::space_dimension>,unsigned int> > support_point_list
+ std::vector<std::pair<Point<DoFHandlerType::space_dimension>,unsigned int> > support_point_list
(n_dofs);
- const hp::FECollection<DH::dimension> fe_collection (dof.get_fe ());
+ const hp::FECollection<DoFHandlerType::dimension> fe_collection (dof.get_fe ());
Assert (fe_collection[0].has_support_points(),
- typename FiniteElement<DH::dimension>::ExcFEHasNoSupportPoints());
- hp::QCollection<DH::dimension> quadrature_collection;
+ typename FiniteElement<DoFHandlerType::dimension>::ExcFEHasNoSupportPoints());
+ hp::QCollection<DoFHandlerType::dimension> quadrature_collection;
for (unsigned int comp=0; comp<fe_collection.size(); ++comp)
{
Assert (fe_collection[comp].has_support_points(),
- typename FiniteElement<DH::dimension>::ExcFEHasNoSupportPoints());
+ typename FiniteElement<DoFHandlerType::dimension>::ExcFEHasNoSupportPoints());
quadrature_collection.push_back
- (Quadrature<DH::dimension> (fe_collection[comp].
- get_unit_support_points()));
+ (Quadrature<DoFHandlerType::dimension> (fe_collection[comp].
+ get_unit_support_points()));
}
- hp::FEValues<DH::dimension,DH::space_dimension>
+ hp::FEValues<DoFHandlerType::dimension,DoFHandlerType::space_dimension>
hp_fe_values (fe_collection, quadrature_collection,
update_quadrature_points);
std::vector<bool> already_touched (n_dofs, false);
std::vector<types::global_dof_index> local_dof_indices;
- typename DH::active_cell_iterator begin = dof.begin_active();
- typename DH::active_cell_iterator end = dof.end();
+ typename DoFHandlerType::active_cell_iterator begin = dof.begin_active();
+ typename DoFHandlerType::active_cell_iterator end = dof.end();
for ( ; begin != end; ++begin)
{
const unsigned int dofs_per_cell = begin->get_fe().dofs_per_cell;
local_dof_indices.resize (dofs_per_cell);
hp_fe_values.reinit (begin);
- const FEValues<DH::dimension> &fe_values =
+ const FEValues<DoFHandlerType::dimension> &fe_values =
hp_fe_values.get_present_fe_values ();
begin->get_active_or_mg_dof_indices(local_dof_indices);
- const std::vector<Point<DH::space_dimension> > &points
+ const std::vector<Point<DoFHandlerType::space_dimension> > &points
= fe_values.get_quadrature_points ();
for (unsigned int i=0; i<dofs_per_cell; ++i)
if (!already_touched[local_dof_indices[i]])
}
}
- ComparePointwiseDownstream<DH::space_dimension> comparator (direction);
+ ComparePointwiseDownstream<DoFHandlerType::space_dimension> comparator (direction);
std::sort (support_point_list.begin(), support_point_list.end(),
comparator);
for (types::global_dof_index i=0; i<n_dofs; ++i)
- template <class DH>
- void downstream (DH &dof,
- const unsigned int level,
- const Point<DH::space_dimension> &direction,
- const bool dof_wise_renumbering)
+ template <typename DoFHandlerType>
+ void downstream (DoFHandlerType &dof,
+ const unsigned int level,
+ const Point<DoFHandlerType::space_dimension> &direction,
+ const bool dof_wise_renumbering)
{
std::vector<types::global_dof_index> renumbering(dof.n_dofs(level));
std::vector<types::global_dof_index> reverse(dof.n_dofs(level));
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_downstream (
- std::vector<types::global_dof_index> &new_indices,
- std::vector<types::global_dof_index> &reverse,
- const DH &dof,
- const unsigned int level,
- const Point<DH::space_dimension> &direction,
- const bool dof_wise_renumbering)
+ compute_downstream
+ (std::vector<types::global_dof_index> &new_indices,
+ std::vector<types::global_dof_index> &reverse,
+ const DoFHandlerType &dof,
+ const unsigned int level,
+ const Point<DoFHandlerType::space_dimension> &direction,
+ const bool dof_wise_renumbering)
{
if (dof_wise_renumbering == false)
{
- std::vector<typename DH::level_cell_iterator> ordered_cells;
+ std::vector<typename DoFHandlerType::level_cell_iterator> ordered_cells;
ordered_cells.reserve (dof.get_tria().n_cells(level));
- const CompareDownstream<typename DH::level_cell_iterator, DH::space_dimension> comparator(direction);
+ const CompareDownstream<typename DoFHandlerType::level_cell_iterator,
+ DoFHandlerType::space_dimension> comparator(direction);
- typename DH::level_cell_iterator p = dof.begin(level);
- typename DH::level_cell_iterator end = dof.end(level);
+ typename DoFHandlerType::level_cell_iterator p = dof.begin(level);
+ typename DoFHandlerType::level_cell_iterator end = dof.end(level);
while (p!=end)
{
else
{
Assert (dof.get_fe().has_support_points(),
- typename FiniteElement<DH::dimension>::ExcFEHasNoSupportPoints());
+ typename FiniteElement<DoFHandlerType::dimension>::ExcFEHasNoSupportPoints());
const unsigned int n_dofs = dof.n_dofs(level);
- std::vector<std::pair<Point<DH::space_dimension>,unsigned int> > support_point_list
+ std::vector<std::pair<Point<DoFHandlerType::space_dimension>,unsigned int> > support_point_list
(n_dofs);
- Quadrature<DH::dimension> q_dummy(dof.get_fe().get_unit_support_points());
- FEValues<DH::dimension,DH::space_dimension> fe_values (dof.get_fe(), q_dummy,
- update_quadrature_points);
+ Quadrature<DoFHandlerType::dimension> q_dummy(dof.get_fe().get_unit_support_points());
+ FEValues<DoFHandlerType::dimension,DoFHandlerType::space_dimension> fe_values (dof.get_fe(), q_dummy,
+ update_quadrature_points);
std::vector<bool> already_touched (dof.n_dofs(), false);
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
- typename DH::level_cell_iterator begin = dof.begin(level);
- typename DH::level_cell_iterator end = dof.end(level);
+ typename DoFHandlerType::level_cell_iterator begin = dof.begin(level);
+ typename DoFHandlerType::level_cell_iterator end = dof.end(level);
for ( ; begin != end; ++begin)
{
- const typename Triangulation<DH::dimension,DH::space_dimension>::cell_iterator &begin_tria = begin;
+ const typename Triangulation<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>::cell_iterator &begin_tria = begin;
begin->get_active_or_mg_dof_indices(local_dof_indices);
fe_values.reinit (begin_tria);
- const std::vector<Point<DH::space_dimension> > &points
+ const std::vector<Point<DoFHandlerType::space_dimension> > &points
= fe_values.get_quadrature_points ();
for (unsigned int i=0; i<dofs_per_cell; ++i)
if (!already_touched[local_dof_indices[i]])
}
}
- ComparePointwiseDownstream<DH::space_dimension> comparator (direction);
+ ComparePointwiseDownstream<DoFHandlerType::space_dimension> comparator (direction);
std::sort (support_point_list.begin(), support_point_list.end(),
comparator);
for (types::global_dof_index i=0; i<n_dofs; ++i)
- template <class DH>
+ template <typename DoFHandlerType>
void
clockwise_dg (
- DH &dof,
- const Point<DH::space_dimension> ¢er,
+ DoFHandlerType &dof,
+ const Point<DoFHandlerType::space_dimension> ¢er,
const bool counter)
{
std::vector<types::global_dof_index> renumbering(dof.n_dofs());
- template <class DH>
+ template <typename DoFHandlerType>
void
- compute_clockwise_dg (
- std::vector<types::global_dof_index> &new_indices,
- const DH &dof,
- const Point<DH::space_dimension> ¢er,
- const bool counter)
+ compute_clockwise_dg
+ (std::vector<types::global_dof_index> &new_indices,
+ const DoFHandlerType &dof,
+ const Point<DoFHandlerType::space_dimension> ¢er,
+ const bool counter)
{
- std::vector<typename DH::active_cell_iterator> ordered_cells;
+ std::vector<typename DoFHandlerType::active_cell_iterator> ordered_cells;
ordered_cells.reserve (dof.get_tria().n_active_cells());
- internal::ClockCells<DH::space_dimension> comparator(center, counter);
+ internal::ClockCells<DoFHandlerType::space_dimension> comparator(center, counter);
- typename DH::active_cell_iterator p = dof.begin_active();
- typename DH::active_cell_iterator end = dof.end();
+ typename DoFHandlerType::active_cell_iterator p = dof.begin_active();
+ typename DoFHandlerType::active_cell_iterator end = dof.end();
while (p!=end)
{
- template <class DH>
- void clockwise_dg (DH &dof,
- const unsigned int level,
- const Point<DH::space_dimension> ¢er,
- const bool counter)
+ template <typename DoFHandlerType>
+ void clockwise_dg (DoFHandlerType &dof,
+ const unsigned int level,
+ const Point<DoFHandlerType::space_dimension> ¢er,
+ const bool counter)
{
- std::vector<typename DH::level_cell_iterator> ordered_cells;
+ std::vector<typename DoFHandlerType::level_cell_iterator> ordered_cells;
ordered_cells.reserve(dof.get_tria().n_active_cells());
- internal::ClockCells<DH::space_dimension> comparator(center, counter);
+ internal::ClockCells<DoFHandlerType::space_dimension> comparator(center, counter);
- typename DH::level_cell_iterator p = dof.begin(level);
- typename DH::level_cell_iterator end = dof.end(level);
+ typename DoFHandlerType::level_cell_iterator p = dof.begin(level);
+ typename DoFHandlerType::level_cell_iterator end = dof.end(level);
while (p!=end)
{
- template <class DH>
+ template <typename DoFHandlerType>
void
- random (DH &dof_handler)
+ random (DoFHandlerType &dof_handler)
{
std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
compute_random(renumbering, dof_handler);
dof_handler.renumber_dofs(renumbering);
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_random (
std::vector<types::global_dof_index> &new_indices,
- const DH &dof_handler)
+ const DoFHandlerType &dof_handler)
{
const types::global_dof_index n_dofs = dof_handler.n_dofs();
Assert(new_indices.size() == n_dofs,
- template <class DH>
+ template <typename DoFHandlerType>
void
- subdomain_wise (DH &dof_handler)
+ subdomain_wise (DoFHandlerType &dof_handler)
{
std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
compute_subdomain_wise(renumbering, dof_handler);
dof_handler.renumber_dofs(renumbering);
- template <class DH>
+ template <typename DoFHandlerType>
void
compute_subdomain_wise (std::vector<types::global_dof_index> &new_dof_indices,
- const DH &dof_handler)
+ const DoFHandlerType &dof_handler)
{
const types::global_dof_index n_dofs = dof_handler.n_dofs();
Assert (new_dof_indices.size() == n_dofs,
// shape function
// - otherwise, the shape function is assigned the first component selected
// in the component_mask that corresponds to this shape function
- template <class DH>
+ template <typename DoFHandlerType>
void
- get_component_association (const DH &dof,
+ get_component_association (const DoFHandlerType &dof,
const ComponentMask &component_mask,
std::vector<unsigned char> &dofs_by_component)
{
- const dealii::hp::FECollection<DH::dimension,DH::space_dimension>
+ const dealii::hp::FECollection<DoFHandlerType::dimension,DoFHandlerType::space_dimension>
fe_collection (dof.get_fe());
Assert (fe_collection.n_components() < 256, ExcNotImplemented());
Assert (dofs_by_component.size() == dof.n_locally_owned_dofs(),
local_component_association (fe_collection.size());
for (unsigned int f=0; f<fe_collection.size(); ++f)
{
- const FiniteElement<DH::dimension,DH::space_dimension> &fe =
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe =
fe_collection[f];
local_component_association[f]
= get_local_component_association (fe, component_mask);
// then loop over all cells and do the work
std::vector<types::global_dof_index> indices;
- for (typename DH::active_cell_iterator c=dof.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator c=dof.begin_active();
c!=dof.end(); ++ c)
if (c->is_locally_owned())
{
// vector block. if the DoFHandler is based on a parallel distributed
// triangulation then the output array is index by
// dof.locally_owned_dofs().index_within_set(indices[i])
- template <class DH>
+ template <typename DoFHandlerType>
inline
void
- get_block_association (const DH &dof,
+ get_block_association (const DoFHandlerType &dof,
std::vector<unsigned char> &dofs_by_block)
{
- const dealii::hp::FECollection<DH::dimension,DH::space_dimension>
+ const dealii::hp::FECollection<DoFHandlerType::dimension,DoFHandlerType::space_dimension>
fe_collection (dof.get_fe());
Assert (fe_collection.n_components() < 256, ExcNotImplemented());
Assert (dofs_by_block.size() == dof.n_locally_owned_dofs(),
(fe_collection.size());
for (unsigned int f=0; f<fe_collection.size(); ++f)
{
- const FiniteElement<DH::dimension,DH::space_dimension> &fe =
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe =
fe_collection[f];
local_block_association[f].resize(fe.dofs_per_cell,
(unsigned char)(-1));
// then loop over all cells and do the work
std::vector<types::global_dof_index> indices;
- for (typename DH::active_cell_iterator c=dof.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator c=dof.begin_active();
c!=dof.end(); ++ c)
if (c->is_locally_owned())
{
- template <class DH, typename Number>
- void distribute_cell_to_dof_vector (
- const DH &dof_handler,
- const Vector<Number> &cell_data,
- Vector<double> &dof_data,
- const unsigned int component)
+ template <typename DoFHandlerType, typename Number>
+ void distribute_cell_to_dof_vector (const DoFHandlerType &dof_handler,
+ const Vector<Number> &cell_data,
+ Vector<double> &dof_data,
+ const unsigned int component)
{
- const unsigned int dim = DH::dimension;
- const unsigned int spacedim = DH::space_dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
const Triangulation<dim,spacedim> &tria = dof_handler.get_tria();
(void)tria;
// count how often we have added a value in the sum for each dof
std::vector<unsigned char> touch_count (dof_handler.n_dofs(), 0);
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
std::vector<types::global_dof_index> dof_indices;
dof_indices.reserve (max_dofs_per_cell(dof_handler));
template <int dim, int spacedim>
void
- extract_dofs (const DoFHandler<dim,spacedim> &dof,
- const ComponentMask &component_mask,
- std::vector<bool> &selected_dofs)
+ extract_dofs (const DoFHandler<dim,spacedim> &dof,
+ const ComponentMask &component_mask,
+ std::vector<bool> &selected_dofs)
{
const FiniteElement<dim,spacedim> &fe = dof.get_fe();
(void)fe;
template <int dim, int spacedim>
void
- extract_dofs (const hp::DoFHandler<dim,spacedim> &dof,
- const ComponentMask &component_mask,
- std::vector<bool> &selected_dofs)
+ extract_dofs (const hp::DoFHandler<dim,spacedim> &dof,
+ const ComponentMask &component_mask,
+ std::vector<bool> &selected_dofs)
{
const FiniteElement<dim,spacedim> &fe = dof.begin_active()->get_fe();
(void)fe;
- template<class DH>
+ template<typename DoFHandlerType>
void
- extract_level_dofs(const unsigned int level,
- const DH &dof,
- const ComponentMask &component_mask,
- std::vector<bool> &selected_dofs)
+ extract_level_dofs (const unsigned int level,
+ const DoFHandlerType &dof,
+ const ComponentMask &component_mask,
+ std::vector<bool> &selected_dofs)
{
- const FiniteElement<DH::dimension,DH::space_dimension> &fe = dof.get_fe();
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof.get_fe();
Assert(component_mask.represents_n_components(n_components(dof)),
ExcMessage ("The given component mask is not sized correctly to represent the "
// then loop over all cells and do work
std::vector<types::global_dof_index> indices(fe.dofs_per_cell);
- typename DH::level_cell_iterator c;
+ typename DoFHandlerType::level_cell_iterator c;
for (c = dof.begin(level) ; c != dof.end(level) ; ++ c)
{
c->get_mg_dof_indices(indices);
- template<class DH>
+ template<typename DoFHandlerType>
void
- extract_level_dofs(const unsigned int level,
- const DH &dof,
- const BlockMask &block_mask,
- std::vector<bool> &selected_dofs)
+ extract_level_dofs (const unsigned int level,
+ const DoFHandlerType &dof,
+ const BlockMask &block_mask,
+ std::vector<bool> &selected_dofs)
{
// simply defer to the other extract_level_dofs() function
extract_level_dofs (level, dof, dof.get_fe().component_mask(block_mask),
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_boundary_dofs (const DH &dof_handler,
- const ComponentMask &component_mask,
- std::vector<bool> &selected_dofs,
+ extract_boundary_dofs (const DoFHandlerType &dof_handler,
+ const ComponentMask &component_mask,
+ std::vector<bool> &selected_dofs,
const std::set<types::boundary_id> &boundary_ids)
{
- Assert ((dynamic_cast<const parallel::distributed::Triangulation<DH::dimension,DH::space_dimension>*>
+ Assert ((dynamic_cast<const parallel::distributed::Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(&dof_handler.get_tria())
== 0),
ExcMessage ("This function can not be used with distributed triangulations."
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_boundary_dofs (const DH &dof_handler,
- const ComponentMask &component_mask,
- IndexSet &selected_dofs,
+ extract_boundary_dofs (const DoFHandlerType &dof_handler,
+ const ComponentMask &component_mask,
+ IndexSet &selected_dofs,
const std::set<types::boundary_id> &boundary_ids)
{
Assert (component_mask.represents_n_components(n_components(dof_handler)),
ExcMessage ("Component mask has invalid size."));
Assert (boundary_ids.find (numbers::internal_face_boundary_id) == boundary_ids.end(),
ExcInvalidBoundaryIndicator());
- const unsigned int dim=DH::dimension;
+ const unsigned int dim=DoFHandlerType::dimension;
// first reset output argument
selected_dofs.clear ();
// do not support boundaries of dimension dim-2, and so every isolated
// boundary line is also part of a boundary face which we will be
// visiting sooner or later
- for (typename DH::active_cell_iterator cell=dof_handler.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell=dof_handler.begin_active();
cell!=dof_handler.end(); ++cell)
// only work on cells that are either locally owned or at least ghost
// cells
if (cell->is_artificial() == false)
for (unsigned int face=0;
- face<GeometryInfo<DH::dimension>::faces_per_cell; ++face)
+ face<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++face)
if (cell->at_boundary(face))
if (! check_boundary_id ||
(boundary_ids.find (cell->face(face)->boundary_id())
!= boundary_ids.end()))
{
- const FiniteElement<DH::dimension, DH::space_dimension> &fe = cell->get_fe();
+ const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
+ &fe = cell->get_fe();
const unsigned int dofs_per_face = fe.dofs_per_face;
face_dof_indices.resize (dofs_per_face);
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_dofs_with_support_on_boundary (const DH &dof_handler,
- const ComponentMask &component_mask,
- std::vector<bool> &selected_dofs,
+ extract_dofs_with_support_on_boundary (const DoFHandlerType &dof_handler,
+ const ComponentMask &component_mask,
+ std::vector<bool> &selected_dofs,
const std::set<types::boundary_id> &boundary_ids)
{
Assert (component_mask.represents_n_components (n_components(dof_handler)),
// do not support boundaries of dimension dim-2, and so every isolated
// boundary line is also part of a boundary face which we will be
// visiting sooner or later
- for (typename DH::active_cell_iterator cell=dof_handler.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell=dof_handler.begin_active();
cell!=dof_handler.end(); ++cell)
for (unsigned int face=0;
- face<GeometryInfo<DH::dimension>::faces_per_cell; ++face)
+ face<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++face)
if (cell->at_boundary(face))
if (! check_boundary_id ||
(boundary_ids.find (cell->face(face)->boundary_id())
!= boundary_ids.end()))
{
- const FiniteElement<DH::dimension, DH::space_dimension> &fe = cell->get_fe();
+ const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
+ = cell->get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
cell_dof_indices.resize (dofs_per_cell);
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_subdomain_dofs (const DH &dof_handler,
- const types::subdomain_id subdomain_id,
- std::vector<bool> &selected_dofs)
+ extract_subdomain_dofs (const DoFHandlerType &dof_handler,
+ const types::subdomain_id subdomain_id,
+ std::vector<bool> &selected_dofs)
{
Assert(selected_dofs.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(selected_dofs.size(), dof_handler.n_dofs()));
// this function is similar to the make_sparsity_pattern function, see
// there for more information
- typename DH::active_cell_iterator
+ typename DoFHandlerType::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_locally_owned_dofs (const DH &dof_handler,
- IndexSet &dof_set)
+ extract_locally_owned_dofs (const DoFHandlerType &dof_handler,
+ IndexSet &dof_set)
{
// collect all the locally owned dofs
dof_set = dof_handler.locally_owned_dofs();
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_locally_active_dofs (const DH &dof_handler,
- IndexSet &dof_set)
+ extract_locally_active_dofs (const DoFHandlerType &dof_handler,
+ IndexSet &dof_set)
{
// collect all the locally owned dofs
dof_set = dof_handler.locally_owned_dofs();
std::vector<types::global_dof_index> dof_indices;
std::set<types::global_dof_index> global_dof_indices;
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell!=endc; ++cell)
if (cell->is_locally_owned())
{
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_locally_relevant_dofs (const DH &dof_handler,
- IndexSet &dof_set)
+ extract_locally_relevant_dofs (const DoFHandlerType &dof_handler,
+ IndexSet &dof_set)
{
// collect all the locally owned dofs
dof_set = dof_handler.locally_owned_dofs();
// are contiguous. - Timo Heister
std::vector<types::global_dof_index> dof_indices;
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell!=endc; ++cell)
if (cell->is_ghost())
{
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_locally_relevant_level_dofs (const DH &dof_handler,
- const unsigned int level,
- IndexSet &dof_set)
+ extract_locally_relevant_level_dofs (const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ IndexSet &dof_set)
{
// collect all the locally owned dofs
dof_set = dof_handler.locally_owned_mg_dofs(level);
// are contiguous. - Timo Heister
std::vector<types::global_dof_index> dof_indices;
- typename DH::cell_iterator cell = dof_handler.begin(level),
- endc = dof_handler.end(level);
+ typename DoFHandlerType::cell_iterator cell = dof_handler.begin(level),
+ endc = dof_handler.end(level);
for (; cell!=endc; ++cell)
{
const types::subdomain_id id = cell->level_subdomain_id();
dof_set.compress();
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- extract_constant_modes (const DH &dof_handler,
+ extract_constant_modes (const DoFHandlerType &dof_handler,
const ComponentMask &component_mask,
std::vector<std::vector<bool> > &constant_modes)
{
//
// TODO: We might be able to extend this also for elements which do not
// have the same constant modes, but that is messy...
- const dealii::hp::FECollection<DH::dimension,DH::space_dimension>
+ const dealii::hp::FECollection<DoFHandlerType::dimension,DoFHandlerType::space_dimension>
fe_collection (dof_handler.get_fe());
std::vector<Table<2,bool> > element_constant_modes;
std::vector<std::vector<std::pair<unsigned int, unsigned int> > >
// Loop over all owned cells and ask the element for the constant modes
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
std::vector<types::global_dof_index> dof_indices;
for (; cell!=endc; ++cell)
if (cell->is_locally_owned())
- template <class DH>
+ template <typename DoFHandlerType>
void
- get_active_fe_indices (const DH &dof_handler,
+ get_active_fe_indices (const DoFHandlerType &dof_handler,
std::vector<unsigned int> &active_fe_indices)
{
AssertDimension (active_fe_indices.size(), dof_handler.get_tria().n_active_cells());
- typename DH::active_cell_iterator
+ typename DoFHandlerType::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
}
- template <class DH>
+ template <typename DoFHandlerType>
std::vector<IndexSet>
- locally_owned_dofs_per_subdomain (const DH &dof_handler)
+ locally_owned_dofs_per_subdomain (const DoFHandlerType &dof_handler)
{
// If the Triangulation is distributed, the only thing we can usefully
// ask is for its locally owned subdomain
Assert ((dynamic_cast<const parallel::distributed::
- Triangulation<DH::dimension,DH::space_dimension> *>
+ Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *>
(&dof_handler.get_tria()) == 0),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any information "
return index_sets;
}
- template <class DH>
+ template <typename DoFHandlerType>
std::vector<IndexSet>
- locally_relevant_dofs_per_subdomain (const DH &dof_handler)
+ locally_relevant_dofs_per_subdomain (const DoFHandlerType &dof_handler)
{
// If the Triangulation is distributed, the only thing we can usefully
// ask is for its locally owned subdomain
Assert ((dynamic_cast<const parallel::distributed::
- Triangulation<DH::dimension,DH::space_dimension> *>
+ Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *>
(&dof_handler.get_tria()) == 0),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any information "
subdomain_id < n_subdomains; ++subdomain_id)
{
// Extract the layer of cells around this subdomain
- std_cxx11::function<bool (const typename DH::active_cell_iterator &)> predicate
+ std_cxx11::function<bool (const typename DoFHandlerType::active_cell_iterator &)> predicate
= IteratorFilters::SubdomainEqualTo(subdomain_id);
- const std::vector<typename DH::active_cell_iterator>
+ const std::vector<typename DoFHandlerType::active_cell_iterator>
active_halo_layer = GridTools::compute_active_cell_halo_layer (dof_handler,
predicate);
// Extract DoFs associated with halo layer
std::vector<types::global_dof_index> local_dof_indices;
std::set<types::global_dof_index> subdomain_halo_global_dof_indices;
- for (typename std::vector<typename DH::active_cell_iterator>::const_iterator
+ for (typename std::vector<typename DoFHandlerType::active_cell_iterator>::const_iterator
it_cell = active_halo_layer.begin(); it_cell!=active_halo_layer.end(); ++it_cell)
{
- const typename DH::active_cell_iterator &cell = *it_cell;
+ const typename DoFHandlerType::active_cell_iterator &cell = *it_cell;
Assert(cell->subdomain_id() != subdomain_id,
ExcMessage("The subdomain ID of the halo cell should not match that of the vector entry."));
return dof_set;
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- get_subdomain_association (const DH &dof_handler,
+ get_subdomain_association (const DoFHandlerType &dof_handler,
std::vector<types::subdomain_id> &subdomain_association)
{
// if the Triangulation is distributed, the only thing we can usefully
// ask is for its locally owned subdomain
Assert ((dynamic_cast<const parallel::distributed::
- Triangulation<DH::dimension,DH::space_dimension> *>
+ Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *>
(&dof_handler.get_tria()) == 0),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any subdomain other "
// artificial cells). Otherwise we are good to use subdomain_id as stored
// in cell->subdomain_id().
std::vector<types::subdomain_id> cell_owners (dof_handler.get_tria().n_active_cells());
- if (const parallel::shared::Triangulation<DH::dimension, DH::space_dimension> *tr =
- (dynamic_cast<const parallel::shared::Triangulation<DH::dimension, DH::space_dimension>*> (&dof_handler.get_tria ())))
+ if (const parallel::shared::Triangulation<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
+ *tr = (dynamic_cast<const parallel::shared::Triangulation<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>*> (&dof_handler.get_tria ())))
{
cell_owners = tr->get_true_subdomain_ids_of_cells();
Assert (tr->get_true_subdomain_ids_of_cells().size() == tr->n_active_cells(),
}
else
{
- for (typename DH::active_cell_iterator cell = dof_handler.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active();
cell!= dof_handler.end(); cell++)
if (cell->is_locally_owned())
cell_owners[cell->active_cell_index()] = cell->subdomain_id();
// loop over all cells and record which subdomain a DoF belongs to.
// toss a coin in case it is on an interface
- typename DH::active_cell_iterator
+ typename DoFHandlerType::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
- template <class DH>
+ template <typename DoFHandlerType>
unsigned int
- count_dofs_with_subdomain_association (const DH &dof_handler,
- const types::subdomain_id subdomain)
+ count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler,
+ const types::subdomain_id subdomain)
{
std::vector<types::subdomain_id> subdomain_association (dof_handler.n_dofs());
get_subdomain_association (dof_handler, subdomain_association);
- template <class DH>
+ template <typename DoFHandlerType>
IndexSet
- dof_indices_with_subdomain_association (const DH &dof_handler,
- const types::subdomain_id subdomain)
+ dof_indices_with_subdomain_association (const DoFHandlerType &dof_handler,
+ const types::subdomain_id subdomain)
{
// If we have a distributed::Triangulation only allow locally_owned
// more expensive than a vector
std::vector<types::global_dof_index> subdomain_indices;
- typename DH::active_cell_iterator
+ typename DoFHandlerType::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
- template <class DH>
+ template <typename DoFHandlerType>
void
- count_dofs_with_subdomain_association (const DH &dof_handler,
- const types::subdomain_id subdomain,
+ count_dofs_with_subdomain_association (const DoFHandlerType &dof_handler,
+ const types::subdomain_id subdomain,
std::vector<unsigned int> &n_dofs_on_subdomain)
{
Assert (n_dofs_on_subdomain.size() == dof_handler.get_fe().n_components(),
#ifdef DEBUG
{
bool found = false;
- for (typename Triangulation<DH::dimension,DH::space_dimension>::active_cell_iterator
+ for (typename Triangulation<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>::active_cell_iterator
cell=dof_handler.get_tria().begin_active();
cell!=dof_handler.get_tria().end(); ++cell)
if (cell->subdomain_id() == subdomain)
}
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- count_dofs_per_component (
- const DH &dof_handler,
- std::vector<types::global_dof_index> &dofs_per_component,
- bool only_once,
- std::vector<unsigned int> target_component)
+ count_dofs_per_component (const DoFHandlerType &dof_handler,
+ std::vector<types::global_dof_index> &dofs_per_component,
+ bool only_once,
+ std::vector<unsigned int> target_component)
{
const unsigned int n_components = dof_handler.get_fe().n_components();
// reduce information from all CPUs
#ifdef DEAL_II_WITH_MPI
- const unsigned int dim = DH::dimension;
- const unsigned int spacedim = DH::space_dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
if (const parallel::Triangulation<dim,spacedim> *tria
= (dynamic_cast<const parallel::Triangulation<dim,spacedim>*>
- template <class DH>
+ template <typename DoFHandlerType>
void
- count_dofs_per_block (const DH &dof_handler,
+ count_dofs_per_block (const DoFHandlerType &dof_handler,
std::vector<types::global_dof_index> &dofs_per_block,
- const std::vector<unsigned int> &target_block_)
+ const std::vector<unsigned int> &target_block_)
{
std::vector<unsigned int> target_block = target_block_;
- const dealii::hp::FECollection<DH::dimension,DH::space_dimension>
+ const dealii::hp::FECollection<DoFHandlerType::dimension,DoFHandlerType::space_dimension>
fe_collection (dof_handler.get_fe());
Assert (fe_collection.size() < 256, ExcNotImplemented());
for (unsigned int this_fe=0; this_fe<fe_collection.size(); ++this_fe)
{
- const FiniteElement<DH::dimension,DH::space_dimension> &fe = fe_collection[this_fe];
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = fe_collection[this_fe];
std::fill (dofs_per_block.begin(), dofs_per_block.end(),
types::global_dof_index(0));
#ifdef DEAL_II_WITH_MPI
// if we are working on a parallel mesh, we now need to collect
// this information from all processors
- if (const parallel::Triangulation<DH::dimension,DH::space_dimension> *tria
- = (dynamic_cast<const parallel::Triangulation<DH::dimension,DH::space_dimension>*>
+ if (const parallel::Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *tria
+ = (dynamic_cast<const parallel::Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
(&dof_handler.get_tria())))
{
std::vector<types::global_dof_index> local_dof_count = dofs_per_block;
- template <class DH>
+ template <typename DoFHandlerType>
void
- map_dof_to_boundary_indices (const DH &dof_handler,
+ map_dof_to_boundary_indices (const DoFHandlerType &dof_handler,
std::vector<types::global_dof_index> &mapping)
{
mapping.clear ();
mapping.insert (mapping.end(), dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
std::vector<types::global_dof_index> dofs_on_face;
dofs_on_face.reserve (max_dofs_per_face(dof_handler));
// do not support boundaries of dimension dim-2, and so every isolated
// boundary line is also part of a boundary face which we will be
// visiting sooner or later
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell!=endc; ++cell)
- for (unsigned int f=0; f<GeometryInfo<DH::dimension>::faces_per_cell; ++f)
+ for (unsigned int f=0; f<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++f)
if (cell->at_boundary(f))
{
const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
cell->face(f)->get_dof_indices (dofs_on_face,
cell->active_fe_index());
for (unsigned int i=0; i<dofs_per_face; ++i)
- if (mapping[dofs_on_face[i]] == DH::invalid_dof_index)
+ if (mapping[dofs_on_face[i]] == DoFHandlerType::invalid_dof_index)
mapping[dofs_on_face[i]] = next_boundary_index++;
}
- template <class DH>
- void map_dof_to_boundary_indices (
- const DH &dof_handler,
- const std::set<types::boundary_id> &boundary_ids,
- std::vector<types::global_dof_index> &mapping)
+ template <typename DoFHandlerType>
+ void map_dof_to_boundary_indices
+ (const DoFHandlerType &dof_handler,
+ const std::set<types::boundary_id> &boundary_ids,
+ std::vector<types::global_dof_index> &mapping)
{
Assert (boundary_ids.find (numbers::internal_face_boundary_id) == boundary_ids.end(),
ExcInvalidBoundaryIndicator());
mapping.clear ();
mapping.insert (mapping.end(), dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ DoFHandlerType::invalid_dof_index);
// return if there is nothing to do
if (boundary_ids.size() == 0)
dofs_on_face.reserve (max_dofs_per_face(dof_handler));
types::global_dof_index next_boundary_index = 0;
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell!=endc; ++cell)
- for (unsigned int f=0; f<GeometryInfo<DH::dimension>::faces_per_cell; ++f)
+ for (unsigned int f=0; f<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++f)
if (boundary_ids.find (cell->face(f)->boundary_id()) !=
boundary_ids.end())
{
dofs_on_face.resize (dofs_per_face);
cell->face(f)->get_dof_indices (dofs_on_face, cell->active_fe_index());
for (unsigned int i=0; i<dofs_per_face; ++i)
- if (mapping[dofs_on_face[i]] == DH::invalid_dof_index)
+ if (mapping[dofs_on_face[i]] == DoFHandlerType::invalid_dof_index)
mapping[dofs_on_face[i]] = next_boundary_index++;
}
{
namespace
{
- template <class DH>
+ template <typename DoFHandlerType>
void
- map_dofs_to_support_points(const hp::MappingCollection<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof_handler,
- std::map<types::global_dof_index,Point<DH::space_dimension> > &support_points)
+ map_dofs_to_support_points
+ (const hp::MappingCollection<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof_handler,
+ std::map<types::global_dof_index,Point<DoFHandlerType::space_dimension> > &support_points)
{
- const unsigned int dim = DH::dimension;
- const unsigned int spacedim = DH::space_dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
hp::FECollection<dim, spacedim> fe_collection(dof_handler.get_fe());
hp::QCollection<dim> q_coll_dummy;
// values by the used constructor.
hp::FEValues<dim, spacedim> hp_fe_values(mapping, fe_collection,
q_coll_dummy, update_quadrature_points);
- typename DH::active_cell_iterator cell =
+ typename DoFHandlerType::active_cell_iterator cell =
dof_handler.begin_active(), endc = dof_handler.end();
std::vector<types::global_dof_index> local_dof_indices;
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- map_dofs_to_support_points(const hp::MappingCollection<DH::dimension, DH::space_dimension> &mapping,
- const DH &dof_handler,
- std::vector<Point<DH::space_dimension> > &support_points)
+ map_dofs_to_support_points
+ (const hp::MappingCollection<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &mapping,
+ const DoFHandlerType &dof_handler,
+ std::vector<Point<DoFHandlerType::space_dimension> > &support_points)
{
// get the data in the form of the map as above
- std::map<types::global_dof_index,Point<DH::space_dimension> > x_support_points;
+ std::map<types::global_dof_index,Point<DoFHandlerType::space_dimension> > x_support_points;
map_dofs_to_support_points(mapping, dof_handler, x_support_points);
// now convert from the map to the linear vector. make sure every
template <int dim, int spacedim>
void
- map_dofs_to_support_points (const Mapping<dim,spacedim> &mapping,
- const DoFHandler<dim,spacedim> &dof_handler,
- std::vector<Point<spacedim> > &support_points)
+ map_dofs_to_support_points (const Mapping<dim,spacedim> &mapping,
+ const DoFHandler<dim,spacedim> &dof_handler,
+ std::vector<Point<spacedim> > &support_points)
{
AssertDimension(support_points.size(), dof_handler.n_dofs());
Assert ((dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
template<int dim, int spacedim>
void
map_dofs_to_support_points(const hp::MappingCollection<dim, spacedim> &mapping,
- const hp::DoFHandler<dim, spacedim> &dof_handler,
- std::vector<Point<spacedim> > &support_points)
+ const hp::DoFHandler<dim, spacedim> &dof_handler,
+ std::vector<Point<spacedim> > &support_points)
{
AssertDimension(support_points.size(), dof_handler.n_dofs());
Assert ((dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
template <int dim, int spacedim>
void
- map_dofs_to_support_points (const Mapping<dim,spacedim> &mapping,
- const DoFHandler<dim,spacedim> &dof_handler,
+ map_dofs_to_support_points (const Mapping<dim,spacedim> &mapping,
+ const DoFHandler<dim,spacedim> &dof_handler,
std::map<types::global_dof_index, Point<spacedim> > &support_points)
{
support_points.clear();
template<int dim, int spacedim>
void
map_dofs_to_support_points(const hp::MappingCollection<dim, spacedim> &mapping,
- const hp::DoFHandler<dim, spacedim> &dof_handler,
+ const hp::DoFHandler<dim, spacedim> &dof_handler,
std::map<types::global_dof_index, Point<spacedim> > &support_points)
{
support_points.clear();
template<int dim, int spacedim>
void
- convert_couplings_to_blocks (
- const DoFHandler<dim,spacedim> &dof_handler,
- const Table<2, Coupling> &table,
- std::vector<Table<2,Coupling> > &tables_by_block)
+ convert_couplings_to_blocks
+ (const DoFHandler<dim,spacedim> &dof_handler,
+ const Table<2, Coupling> &table,
+ std::vector<Table<2,Coupling> > &tables_by_block)
{
const FiniteElement<dim,spacedim> &fe = dof_handler.get_fe();
const unsigned int nb = fe.n_blocks();
template<int dim, int spacedim>
void
- convert_couplings_to_blocks (
- const hp::DoFHandler<dim,spacedim> &dof_handler,
- const Table<2, Coupling> &table,
- std::vector<Table<2,Coupling> > &tables_by_block)
+ convert_couplings_to_blocks (const hp::DoFHandler<dim,spacedim> &dof_handler,
+ const Table<2, Coupling> &table,
+ std::vector<Table<2,Coupling> > &tables_by_block)
{
const hp::FECollection<dim> &fe_collection = dof_handler.get_fe();
tables_by_block.resize(fe_collection.size());
- template <class DH, class Sparsity>
- void make_cell_patches(
- Sparsity &block_list,
- const DH &dof_handler,
- const unsigned int level,
- const std::vector<bool> &selected_dofs,
- types::global_dof_index offset)
+ template <typename DoFHandlerType, class Sparsity>
+ void make_cell_patches(Sparsity &block_list,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const std::vector<bool> &selected_dofs,
+ types::global_dof_index offset)
{
- typename DH::level_cell_iterator cell;
- typename DH::level_cell_iterator endc = dof_handler.end(level);
+ typename DoFHandlerType::level_cell_iterator cell;
+ typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level);
std::vector<types::global_dof_index> indices;
unsigned int i=0;
}
- template <class DH>
- void make_single_patch(
- SparsityPattern &block_list,
- const DH &dof_handler,
- const unsigned int level,
- const bool interior_only)
+ template <typename DoFHandlerType>
+ void make_single_patch(SparsityPattern &block_list,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const bool interior_only)
{
- const FiniteElement<DH::dimension> &fe = dof_handler.get_fe();
+ const FiniteElement<DoFHandlerType::dimension> &fe = dof_handler.get_fe();
block_list.reinit(1, dof_handler.n_dofs(level), dof_handler.n_dofs(level));
- typename DH::level_cell_iterator cell;
- typename DH::level_cell_iterator endc = dof_handler.end(level);
+ typename DoFHandlerType::level_cell_iterator cell;
+ typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level);
std::vector<types::global_dof_index> indices;
std::vector<bool> exclude;
std::fill(exclude.begin(), exclude.end(), false);
const unsigned int dpf = fe.dofs_per_face;
- for (unsigned int face=0; face<GeometryInfo<DH::dimension>::faces_per_cell; ++face)
+ for (unsigned int face=0; face<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++face)
if (cell->at_boundary(face) || cell->neighbor(face)->level() != cell->level())
for (unsigned int i=0; i<dpf; ++i)
exclude[fe.face_to_cell_index(i,face)] = true;
}
- template <class DH>
- void make_child_patches(
- SparsityPattern &block_list,
- const DH &dof_handler,
- const unsigned int level,
- const bool interior_dofs_only,
- const bool boundary_dofs)
+ template <typename DoFHandlerType>
+ void make_child_patches (SparsityPattern &block_list,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const bool interior_dofs_only,
+ const bool boundary_dofs)
{
Assert(level > 0 && level < dof_handler.get_tria().n_levels(),
ExcIndexRange(level, 1, dof_handler.get_tria().n_levels()));
- typename DH::level_cell_iterator pcell = dof_handler.begin(level-1);
- typename DH::level_cell_iterator endc = dof_handler.end(level-1);
+ typename DoFHandlerType::level_cell_iterator pcell = dof_handler.begin(level-1);
+ typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level-1);
std::vector<types::global_dof_index> indices;
std::vector<bool> exclude;
for (unsigned int child=0; child<pcell->n_children(); ++child)
{
- const typename DH::level_cell_iterator cell = pcell->child(child);
+ const typename DoFHandlerType::level_cell_iterator cell = pcell->child(child);
// For hp, only this line here would have to be replaced.
- const FiniteElement<DH::dimension> &fe = dof_handler.get_fe();
+ const FiniteElement<DoFHandlerType::dimension> &fe = dof_handler.get_fe();
const unsigned int n_dofs = fe.dofs_per_cell;
indices.resize(n_dofs);
exclude.resize(n_dofs);
// of the parent
const unsigned int dpf = fe.dofs_per_face;
- for (unsigned int d=0; d<DH::dimension; ++d)
+ for (unsigned int d=0; d<DoFHandlerType::dimension; ++d)
{
- const unsigned int face = GeometryInfo<DH::dimension>::vertex_to_face[child][d];
+ const unsigned int face = GeometryInfo<DoFHandlerType::dimension>::vertex_to_face[child][d];
for (unsigned int i=0; i<dpf; ++i)
exclude[fe.face_to_cell_index(i,face)] = true;
}
// Now remove all degrees of freedom on the domain boundary
// from the exclusion list
if (boundary_dofs)
- for (unsigned int face=0; face< GeometryInfo<DH::dimension>::faces_per_cell; ++face)
+ for (unsigned int face=0; face< GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++face)
if (cell->at_boundary(face))
for (unsigned int i=0; i<dpf; ++i)
exclude[fe.face_to_cell_index(i,face)] = false;
- template <class DH>
- void make_vertex_patches(
- SparsityPattern &block_list,
- const DH &dof_handler,
- const unsigned int level,
- const bool interior_only,
- const bool boundary_patches,
- const bool level_boundary_patches,
- const bool single_cell_patches)
+ template <typename DoFHandlerType>
+ void make_vertex_patches (SparsityPattern &block_list,
+ const DoFHandlerType &dof_handler,
+ const unsigned int level,
+ const bool interior_only,
+ const bool boundary_patches,
+ const bool level_boundary_patches,
+ const bool single_cell_patches)
{
- typename DH::level_cell_iterator cell;
- typename DH::level_cell_iterator endc = dof_handler.end(level);
+ typename DoFHandlerType::level_cell_iterator cell;
+ typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level);
// Vector mapping from vertex index in the triangulation to consecutive
// block indices on this level The number of cells at a vertex
// Identify all vertices active on this level and remember some data
// about them
for (cell=dof_handler.begin(level); cell != endc; ++cell)
- for (unsigned int v=0; v<GeometryInfo<DH::dimension>::vertices_per_cell; ++v)
+ for (unsigned int v=0; v<GeometryInfo<DoFHandlerType::dimension>::vertices_per_cell; ++v)
{
const unsigned int vg = cell->vertex_index(v);
vertex_dof_count[vg] += cell->get_fe().dofs_per_cell;
++vertex_cell_count[vg];
- for (unsigned int d=0; d<DH::dimension; ++d)
+ for (unsigned int d=0; d<DoFHandlerType::dimension; ++d)
{
- const unsigned int face = GeometryInfo<DH::dimension>::vertex_to_face[v][d];
+ const unsigned int face = GeometryInfo<DoFHandlerType::dimension>::vertex_to_face[v][d];
if (cell->at_boundary(face))
vertex_boundary[vg] = true;
else if ((!level_boundary_patches)
for (cell=dof_handler.begin(level); cell != endc; ++cell)
{
- const FiniteElement<DH::dimension> &fe = cell->get_fe();
+ const FiniteElement<DoFHandlerType::dimension> &fe = cell->get_fe();
indices.resize(fe.dofs_per_cell);
cell->get_mg_dof_indices(indices);
- for (unsigned int v=0; v<GeometryInfo<DH::dimension>::vertices_per_cell; ++v)
+ for (unsigned int v=0; v<GeometryInfo<DoFHandlerType::dimension>::vertices_per_cell; ++v)
{
const unsigned int vg = cell->vertex_index(v);
const unsigned int block = vertex_mapping[vg];
std::fill(exclude.begin(), exclude.end(), false);
const unsigned int dpf = fe.dofs_per_face;
- for (unsigned int d=0; d<DH::dimension; ++d)
+ for (unsigned int d=0; d<DoFHandlerType::dimension; ++d)
{
- const unsigned int a_face = GeometryInfo<DH::dimension>::vertex_to_face[v][d];
- const unsigned int face = GeometryInfo<DH::dimension>::opposite_face[a_face];
+ const unsigned int a_face = GeometryInfo<DoFHandlerType::dimension>::vertex_to_face[v][d];
+ const unsigned int face = GeometryInfo<DoFHandlerType::dimension>::opposite_face[a_face];
for (unsigned int i=0; i<dpf; ++i)
exclude[fe.face_to_cell_index(i,face)] = true;
}
- template <class DH>
+ template <typename DoFHandlerType>
unsigned int
- count_dofs_on_patch (const std::vector<typename DH::active_cell_iterator> &patch)
+ count_dofs_on_patch (const std::vector<typename DoFHandlerType::active_cell_iterator> &patch)
{
std::set<types::global_dof_index> dofs_on_patch;
std::vector<types::global_dof_index> local_dof_indices;
// all duplicates are ignored
for (unsigned int i=0; i<patch.size(); ++i)
{
- const typename DH::active_cell_iterator cell = patch[i];
+ const typename DoFHandlerType::active_cell_iterator cell = patch[i];
Assert (cell->is_artificial() == false,
ExcMessage("This function can not be called with cells that are "
"not either locally owned or ghost cells."));
- template <class DH>
+ template <typename DoFHandlerType>
std::vector<types::global_dof_index>
- get_dofs_on_patch (const std::vector<typename DH::active_cell_iterator> &patch)
+ get_dofs_on_patch (const std::vector<typename DoFHandlerType::active_cell_iterator> &patch)
{
std::set<types::global_dof_index> dofs_on_patch;
std::vector<types::global_dof_index> local_dof_indices;
// all duplicates are ignored
for (unsigned int i=0; i<patch.size(); ++i)
{
- const typename DH::active_cell_iterator cell = patch[i];
+ const typename DoFHandlerType::active_cell_iterator cell = patch[i];
Assert (cell->is_artificial() == false,
ExcMessage("This function can not be called with cells that are "
"not either locally owned or ghost cells."));
local_dof_indices.end());
}
- Assert (dofs_on_patch.size() == count_dofs_on_patch<DH>(patch),
+ Assert (dofs_on_patch.size() == count_dofs_on_patch<DoFHandlerType>(patch),
ExcInternalError());
// return a vector with the content of the set above. copying
}
- template <class DH>
+ template <typename DoFHandlerType>
unsigned int
- n_finite_elements (const DH &)
+ n_finite_elements (const DoFHandlerType &)
{
return 1;
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- make_oldstyle_hanging_node_constraints (const DH &dof_handler,
- ConstraintMatrix &constraints,
+ make_oldstyle_hanging_node_constraints (const DoFHandlerType &dof_handler,
+ ConstraintMatrix &constraints,
dealii::internal::int2type<2>)
{
const unsigned int dim = 2;
- const unsigned int spacedim = DH::space_dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
std::vector<types::global_dof_index> dofs_on_mother;
std::vector<types::global_dof_index> dofs_on_children;
// note that even though we may visit a face twice if the neighboring
// cells are equally refined, we can only visit each face with
// hanging nodes once
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell!=endc; ++cell)
{
// artificial cells can at best neighbor ghost cells, but we're not
ExcDimensionMismatch(n_dofs_on_children,
fe.constraints().m()));
- const typename DH::line_iterator this_face = cell->face(face);
+ const typename DoFHandlerType::line_iterator this_face = cell->face(face);
// fill the dofs indices. Use same enumeration scheme as in
// @p{FiniteElement::constraints()}
- template <class DH>
+ template <typename DoFHandlerType>
void
- make_oldstyle_hanging_node_constraints (const DH &dof_handler,
- ConstraintMatrix &constraints,
+ make_oldstyle_hanging_node_constraints (const DoFHandlerType &dof_handler,
+ ConstraintMatrix &constraints,
dealii::internal::int2type<3>)
{
const unsigned int dim = 3;
// note that even though we may visit a face twice if the neighboring
// cells are equally refined, we can only visit each face with
// hanging nodes once
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell!=endc; ++cell)
{
// artificial cells can at best neighbor ghost cells, but we're not
ExcDimensionMismatch(n_dofs_on_children,
fe.constraints().m()));
- const typename DH::face_iterator this_face = cell->face(face);
+ const typename DoFHandlerType::face_iterator this_face = cell->face(face);
// fill the dofs indices. Use same enumeration scheme as in
// @p{FiniteElement::constraints()}
}
- template <class DH>
+ template <typename DoFHandlerType>
void
- make_hp_hanging_node_constraints (const DH &dof_handler,
- ConstraintMatrix &constraints)
+ make_hp_hanging_node_constraints (const DoFHandlerType &dof_handler,
+ ConstraintMatrix &constraints)
{
// note: this function is going to be hard to understand if you
// haven't read the hp paper. however, we try to follow the notation
// laid out there, so go read the paper before you try to understand
// what is going on here
- const unsigned int dim = DH::dimension;
+ const unsigned int dim = DoFHandlerType::dimension;
- const unsigned int spacedim = DH::space_dimension;
+ const unsigned int spacedim = DoFHandlerType::space_dimension;
// a matrix to be used for constraints below. declared here and
// note that even though we may visit a face twice if the neighboring
// cells are equally refined, we can only visit each face with
// hanging nodes once
- typename DH::active_cell_iterator cell = dof_handler.begin_active(),
- endc = dof_handler.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active(),
+ endc = dof_handler.end();
for (; cell!=endc; ++cell)
{
// artificial cells can at best neighbor ghost cells, but we're not
std::set<unsigned int> fe_ind_face_subface;
fe_ind_face_subface.insert(cell->active_fe_index());
- if (DoFHandlerSupportsDifferentFEs<DH>::value == true)
+ if (DoFHandlerSupportsDifferentFEs<DoFHandlerType>::value == true)
for (unsigned int c=0; c<cell->face(face)->number_of_children(); ++c)
if (!cell->neighbor_child_on_subface (face, c)->is_artificial())
{
if (cell->neighbor_child_on_subface (face, c)->is_artificial())
continue;
- const typename DH::active_face_iterator
+ const typename DoFHandlerType::active_face_iterator
subface = cell->face(face)->child(c);
Assert (subface->n_active_fe_indices() == 1,
//
// since this is something that can only happen for hp
// dof handlers, add a check here...
- Assert (DoFHandlerSupportsDifferentFEs<DH>::value == true,
+ Assert (DoFHandlerSupportsDifferentFEs<DoFHandlerType>::value == true,
ExcInternalError());
const dealii::hp::FECollection<dim,spacedim> &fe_collection =
// Only if there is a neighbor with a different
// active_fe_index and the same h-level, some action has to
// be taken.
- if ((DoFHandlerSupportsDifferentFEs<DH>::value == true)
+ if ((DoFHandlerSupportsDifferentFEs<DoFHandlerType>::value == true)
&&
!cell->face(face)->at_boundary ()
&&
(!cell->face(face)->has_children() &&
!cell->neighbor_is_coarser(face) ))
{
- const typename DH::level_cell_iterator neighbor = cell->neighbor (face);
+ const typename DoFHandlerType::level_cell_iterator neighbor = cell->neighbor (face);
// see which side of the face we have to constrain
switch (cell->get_fe().compare_for_face_domination (neighbor->get_fe ()))
- template <class DH>
+ template <typename DoFHandlerType>
void
- make_hanging_node_constraints (const DH &dof_handler,
- ConstraintMatrix &constraints)
+ make_hanging_node_constraints (const DoFHandlerType &dof_handler,
+ ConstraintMatrix &constraints)
{
// Decide whether to use the new or old make_hanging_node_constraints
// function. If all the FiniteElement or all elements in a FECollection
internal::
make_oldstyle_hanging_node_constraints (dof_handler,
constraints,
- dealii::internal::int2type<DH::dimension>());
+ dealii::internal::int2type<DoFHandlerType::dimension>());
}
- template<typename DH>
+ template<typename DoFHandlerType>
void
make_periodicity_constraints
- (const std::vector<GridTools::PeriodicFacePair<typename DH::cell_iterator> >
+ (const std::vector<GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator> >
&periodic_faces,
dealii::ConstraintMatrix &constraint_matrix,
const ComponentMask &component_mask,
const std::vector<unsigned int> &first_vector_components)
{
- typedef std::vector<GridTools::PeriodicFacePair<typename DH::cell_iterator> >
+ typedef std::vector<GridTools::PeriodicFacePair<typename DoFHandlerType::cell_iterator> >
FaceVector;
typename FaceVector::const_iterator it, end_periodic;
it = periodic_faces.begin();
// Loop over all periodic faces...
for (; it!=end_periodic; ++it)
{
- typedef typename DH::face_iterator FaceIterator;
+ typedef typename DoFHandlerType::face_iterator FaceIterator;
const FaceIterator face_1 = it->cell[0]->face(it->face_idx[0]);
const FaceIterator face_2 = it->cell[1]->face(it->face_idx[1]);
// High level interface variants:
- template<typename DH>
+ template<typename DoFHandlerType>
void
- make_periodicity_constraints (const DH &dof_handler,
- const types::boundary_id b_id1,
- const types::boundary_id b_id2,
- const int direction,
- dealii::ConstraintMatrix &constraint_matrix,
- const ComponentMask &component_mask)
+ make_periodicity_constraints (const DoFHandlerType &dof_handler,
+ const types::boundary_id b_id1,
+ const types::boundary_id b_id2,
+ const int direction,
+ dealii::ConstraintMatrix &constraint_matrix,
+ const ComponentMask &component_mask)
{
- static const int space_dim = DH::space_dimension;
+ static const int space_dim = DoFHandlerType::space_dimension;
(void)space_dim;
Assert (0<=direction && direction<space_dim,
ExcIndexRange (direction, 0, space_dim));
"different to denote different boundaries."));
std::vector<GridTools::PeriodicFacePair
- <typename DH::cell_iterator> > matched_faces;
+ <typename DoFHandlerType::cell_iterator> > matched_faces;
// Collect matching periodic cells on the coarsest level:
GridTools::collect_periodic_faces(dof_handler, b_id1, b_id2, direction,
matched_faces);
- make_periodicity_constraints<DH>
+ make_periodicity_constraints<DoFHandlerType>
(matched_faces, constraint_matrix, component_mask);
}
- template<typename DH>
+ template<typename DoFHandlerType>
void
- make_periodicity_constraints (const DH &dof_handler,
+ make_periodicity_constraints (const DoFHandlerType &dof_handler,
const types::boundary_id b_id,
const int direction,
dealii::ConstraintMatrix &constraint_matrix,
const ComponentMask &component_mask)
{
- static const int dim = DH::dimension;
- static const int space_dim = DH::space_dimension;
+ static const int dim = DoFHandlerType::dimension;
+ static const int space_dim = DoFHandlerType::space_dimension;
(void)dim;
(void)space_dim;
ExcNotImplemented());
std::vector<GridTools::PeriodicFacePair
- <typename DH::cell_iterator> > matched_faces;
+ <typename DoFHandlerType::cell_iterator> > matched_faces;
// Collect matching periodic cells on the coarsest level:
GridTools::collect_periodic_faces(dof_handler, b_id, direction,
matched_faces);
- make_periodicity_constraints<DH>
+ make_periodicity_constraints<DoFHandlerType>
(matched_faces, constraint_matrix, component_mask);
}
- template <int dim, int spacedim, template <int,int> class DH>
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType>
void
- make_zero_boundary_constraints (const DH<dim, spacedim> &dof,
- const types::boundary_id boundary_id,
- ConstraintMatrix &zero_boundary_constraints,
- const ComponentMask &component_mask)
+ make_zero_boundary_constraints (const DoFHandlerType<dim, spacedim> &dof,
+ const types::boundary_id boundary_id,
+ ConstraintMatrix &zero_boundary_constraints,
+ const ComponentMask &component_mask)
{
Assert (component_mask.represents_n_components(dof.get_fe().n_components()),
ExcMessage ("The number of components in the mask has to be either "
std::vector<types::global_dof_index> cell_dofs;
cell_dofs.reserve (max_dofs_per_cell(dof));
- typename DH<dim,spacedim>::active_cell_iterator
+ typename DoFHandlerType<dim,spacedim>::active_cell_iterator
cell = dof.begin_active(),
endc = dof.end();
for (; cell!=endc; ++cell)
for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
++face_no)
{
- const typename DH<dim,spacedim>::face_iterator face = cell->face(face_no);
+ const typename DoFHandlerType<dim,spacedim>::face_iterator face = cell->face(face_no);
// if face is on the boundary and satisfies the correct
// boundary id property
- template <int dim, int spacedim, template <int,int> class DH>
+ template <int dim, int spacedim, template <int, int> class DoFHandlerType>
void
- make_zero_boundary_constraints (const DH<dim, spacedim> &dof,
- ConstraintMatrix &zero_boundary_constraints,
- const ComponentMask &component_mask)
+ make_zero_boundary_constraints (const DoFHandlerType<dim, spacedim> &dof,
+ ConstraintMatrix &zero_boundary_constraints,
+ const ComponentMask &component_mask)
{
make_zero_boundary_constraints(dof, numbers::invalid_boundary_id,
zero_boundary_constraints, component_mask);
namespace DoFTools
{
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_sparsity_pattern (const DH &dof,
+ make_sparsity_pattern (const DoFHandlerType &dof,
SP &sparsity,
const ConstraintMatrix &constraints,
const bool keep_constrained_dofs,
std::vector<types::global_dof_index> dofs_on_this_cell;
dofs_on_this_cell.reserve (max_dofs_per_cell(dof));
- typename DH::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
+ endc = dof.end();
// In case we work with a distributed sparsity pattern of Trilinos
// type, we only have to do the work if the current cell is owned by
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_sparsity_pattern (const DH &dof,
+ make_sparsity_pattern (const DoFHandlerType &dof,
const Table<2,Coupling> &couplings,
SP &sparsity,
const ConstraintMatrix &constraints,
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
- const hp::FECollection<DH::dimension,DH::space_dimension> fe_collection (dof.get_fe());
+ const hp::FECollection<DoFHandlerType::dimension,DoFHandlerType::space_dimension> fe_collection (dof.get_fe());
// first, for each finite element, build a mask for each dof, not like
// the one given which represents components. make sure we do the right
std::vector<types::global_dof_index> dofs_on_this_cell(fe_collection.max_dofs_per_cell());
- typename DH::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
+ endc = dof.end();
// In case we work with a distributed sparsity pattern of Trilinos
// type, we only have to do the work if the current cell is owned by
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_sparsity_pattern (const DH &dof_row,
- const DH &dof_col,
+ make_sparsity_pattern (const DoFHandlerType &dof_row,
+ const DoFHandlerType &dof_col,
SP &sparsity)
{
const types::global_dof_index n_dofs_row = dof_row.n_dofs();
//TODO: Looks like wasteful memory management here
- const std::list<std::pair<typename DH::cell_iterator,
- typename DH::cell_iterator> >
+ const std::list<std::pair<typename DoFHandlerType::cell_iterator,
+ typename DoFHandlerType::cell_iterator> >
cell_list
= GridTools::get_finest_common_cells (dof_row, dof_col);
- typename std::list<std::pair<typename DH::cell_iterator,
- typename DH::cell_iterator> >::const_iterator
+ typename std::list<std::pair<typename DoFHandlerType::cell_iterator,
+ typename DoFHandlerType::cell_iterator> >::const_iterator
cell_iter = cell_list.begin();
for (; cell_iter!=cell_list.end(); ++cell_iter)
{
- const typename DH::cell_iterator cell_row = cell_iter->first;
- const typename DH::cell_iterator cell_col = cell_iter->second;
+ const typename DoFHandlerType::cell_iterator cell_row = cell_iter->first;
+ const typename DoFHandlerType::cell_iterator cell_col = cell_iter->second;
if (!cell_row->has_children() && !cell_col->has_children())
{
}
else if (cell_row->has_children())
{
- const std::vector<typename DH::active_cell_iterator >
- child_cells = GridTools::get_active_child_cells<DH> (cell_row);
+ const std::vector<typename DoFHandlerType::active_cell_iterator >
+ child_cells = GridTools::get_active_child_cells<DoFHandlerType> (cell_row);
for (unsigned int i=0; i<child_cells.size(); i++)
{
- const typename DH::cell_iterator
+ const typename DoFHandlerType::cell_iterator
cell_row_child = child_cells[i];
const unsigned int dofs_per_cell_row =
cell_row_child->get_fe().dofs_per_cell;
}
else
{
- std::vector<typename DH::active_cell_iterator>
- child_cells = GridTools::get_active_child_cells<DH> (cell_col);
+ std::vector<typename DoFHandlerType::active_cell_iterator>
+ child_cells = GridTools::get_active_child_cells<DoFHandlerType> (cell_col);
for (unsigned int i=0; i<child_cells.size(); i++)
{
- const typename DH::active_cell_iterator
+ const typename DoFHandlerType::active_cell_iterator
cell_col_child = child_cells[i];
const unsigned int dofs_per_cell_row =
cell_row->get_fe().dofs_per_cell;
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
make_boundary_sparsity_pattern
- (const DH &dof,
+ (const DoFHandlerType &dof,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SP &sparsity)
{
- if (DH::dimension == 1)
+ if (DoFHandlerType::dimension == 1)
{
// there are only 2 boundary indicators in 1d, so it is no
// performance problem to call the other function
- typename DH::FunctionMap boundary_ids;
+ typename DoFHandlerType::FunctionMap boundary_ids;
boundary_ids[0] = 0;
boundary_ids[1] = 0;
- make_boundary_sparsity_pattern<DH, SP> (dof,
- boundary_ids,
- dof_to_boundary_mapping,
- sparsity);
+ make_boundary_sparsity_pattern<DoFHandlerType, SP> (dof,
+ boundary_ids,
+ dof_to_boundary_mapping,
+ sparsity);
return;
}
types::global_dof_index max_element = 0;
for (std::vector<types::global_dof_index>::const_iterator i=dof_to_boundary_mapping.begin();
i!=dof_to_boundary_mapping.end(); ++i)
- if ((*i != DH::invalid_dof_index) &&
+ if ((*i != DoFHandlerType::invalid_dof_index) &&
(*i > max_element))
max_element = *i;
AssertDimension (max_element, sparsity.n_rows()-1);
// @p{cell->has_boundary_lines}), since we do not support boundaries of
// dimension dim-2, and so every boundary line is also part of a
// boundary face.
- typename DH::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
+ endc = dof.end();
for (; cell!=endc; ++cell)
- for (unsigned int f=0; f<GeometryInfo<DH::dimension>::faces_per_cell; ++f)
+ for (unsigned int f=0; f<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++f)
if (cell->at_boundary(f))
{
const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void make_boundary_sparsity_pattern
- (const DH &dof,
- const typename FunctionMap<DH::space_dimension>::type &boundary_ids,
+ (const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &boundary_ids,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SP &sparsity)
{
- if (DH::dimension == 1)
+ if (DoFHandlerType::dimension == 1)
{
// first check left, then right boundary point
for (unsigned int direction=0; direction<2; ++direction)
// find active cell at that boundary: first go to left/right,
// then to children
- typename DH::level_cell_iterator cell = dof.begin(0);
+ typename DoFHandlerType::level_cell_iterator cell = dof.begin(0);
while (!cell->at_boundary(direction))
cell = cell->neighbor(direction);
while (!cell->active())
AssertDimension (dof_to_boundary_mapping.size(), n_dofs);
Assert (boundary_ids.find(numbers::internal_face_boundary_id) == boundary_ids.end(),
- typename DH::ExcInvalidBoundaryIndicator());
+ typename DoFHandlerType::ExcInvalidBoundaryIndicator());
Assert (sparsity.n_rows() == dof.n_boundary_dofs (boundary_ids),
ExcDimensionMismatch (sparsity.n_rows(), dof.n_boundary_dofs (boundary_ids)));
Assert (sparsity.n_cols() == dof.n_boundary_dofs (boundary_ids),
types::global_dof_index max_element = 0;
for (std::vector<types::global_dof_index>::const_iterator i=dof_to_boundary_mapping.begin();
i!=dof_to_boundary_mapping.end(); ++i)
- if ((*i != DH::invalid_dof_index) &&
+ if ((*i != DoFHandlerType::invalid_dof_index) &&
(*i > max_element))
max_element = *i;
AssertDimension (max_element, sparsity.n_rows()-1);
std::vector<types::global_dof_index> dofs_on_this_face;
dofs_on_this_face.reserve (max_dofs_per_face(dof));
- typename DH::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
+ endc = dof.end();
for (; cell!=endc; ++cell)
- for (unsigned int f=0; f<GeometryInfo<DH::dimension>::faces_per_cell; ++f)
+ for (unsigned int f=0; f<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++f)
if (boundary_ids.find(cell->face(f)->boundary_id()) !=
boundary_ids.end())
{
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_flux_sparsity_pattern (const DH &dof,
+ make_flux_sparsity_pattern (const DoFHandlerType &dof,
SP &sparsity,
const ConstraintMatrix &constraints,
const bool keep_constrained_dofs,
std::vector<types::global_dof_index> dofs_on_other_cell;
dofs_on_this_cell.reserve (max_dofs_per_cell(dof));
dofs_on_other_cell.reserve (max_dofs_per_cell(dof));
- typename DH::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
+ endc = dof.end();
// TODO: in an old implementation, we used user flags before to tag
// faces that were already touched. this way, we could reduce the work
keep_constrained_dofs);
for (unsigned int face = 0;
- face < GeometryInfo<DH::dimension>::faces_per_cell;
+ face < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
++face)
{
- typename DH::face_iterator cell_face = cell->face(face);
+ typename DoFHandlerType::face_iterator cell_face = cell->face(face);
if (! cell->at_boundary(face) )
{
- typename DH::level_cell_iterator neighbor = cell->neighbor(face);
+ typename DoFHandlerType::level_cell_iterator neighbor = cell->neighbor(face);
// in 1d, we do not need to worry whether the neighbor
// might have children and then loop over those children.
// rather, we may as well go straight to to cell behind
// this particular cell's most terminal child
- if (DH::dimension==1)
+ if (DoFHandlerType::dimension==1)
while (neighbor->has_children())
neighbor = neighbor->child(face==0 ? 1 : 0);
sub_nr != cell_face->number_of_children();
++sub_nr)
{
- const typename DH::level_cell_iterator
+ const typename DoFHandlerType::level_cell_iterator
sub_neighbor
= cell->neighbor_child_on_subface (face, sub_nr);
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_flux_sparsity_pattern (const DH &dof,
+ make_flux_sparsity_pattern (const DoFHandlerType &dof,
SP &sparsity)
{
ConstraintMatrix constraints;
// implementation of the same function in namespace DoFTools for
// non-hp DoFHandlers
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_flux_sparsity_pattern (const DH &dof,
+ make_flux_sparsity_pattern (const DoFHandlerType &dof,
SP &sparsity,
const Table<2,Coupling> &int_mask,
const Table<2,Coupling> &flux_mask)
{
- const FiniteElement<DH::dimension,DH::space_dimension> &fe = dof.get_fe();
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof.get_fe();
std::vector<types::global_dof_index> dofs_on_this_cell(fe.dofs_per_cell);
std::vector<types::global_dof_index> dofs_on_other_cell(fe.dofs_per_cell);
flux_dof_mask = dof_couplings_from_component_couplings(fe, flux_mask);
Table<2,bool> support_on_face(fe.dofs_per_cell,
- GeometryInfo<DH::dimension>::faces_per_cell);
+ GeometryInfo<DoFHandlerType::dimension>::faces_per_cell);
for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
- for (unsigned int f=0; f<GeometryInfo<DH::dimension>::faces_per_cell; ++f)
+ for (unsigned int f=0; f<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++f)
support_on_face(i,f) = fe.has_support_on_face(i,f);
- typename DH::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
+ endc = dof.end();
for (; cell!=endc; ++cell)
if (cell->is_locally_owned())
{
// Loop over all interior neighbors
for (unsigned int face = 0;
- face < GeometryInfo<DH::dimension>::faces_per_cell;
+ face < GeometryInfo<DoFHandlerType::dimension>::faces_per_cell;
++face)
{
- const typename DH::face_iterator
+ const typename DoFHandlerType::face_iterator
cell_face = cell->face(face);
if (cell_face->user_flag_set ())
continue;
}
else
{
- typename DH::level_cell_iterator
+ typename DoFHandlerType::level_cell_iterator
neighbor = cell->neighbor(face);
// Refinement edges are taken care of by coarser
// cells
sub_nr != cell_face->n_children();
++sub_nr)
{
- const typename DH::level_cell_iterator
+ const typename DoFHandlerType::level_cell_iterator
sub_neighbor
= cell->neighbor_child_on_subface (face, sub_nr);
- template <class DH, class SP>
+ template <typename DoFHandlerType, class SP>
void
- make_flux_sparsity_pattern (const DH &dof,
+ make_flux_sparsity_pattern (const DoFHandlerType &dof,
SP &sparsity,
const Table<2,Coupling> &int_mask,
const Table<2,Coupling> &flux_mask)
// at the beginning of this function.
std::vector<bool> user_flags;
dof.get_tria().save_user_flags(user_flags);
- const_cast<Triangulation<DH::dimension,DH::space_dimension> &>(dof.get_tria()).clear_user_flags ();
+ const_cast<Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &>
+ (dof.get_tria()).clear_user_flags ();
internal::make_flux_sparsity_pattern (dof, sparsity,
int_mask, flux_mask);
// finally restore the user flags
- const_cast<Triangulation<DH::dimension,DH::space_dimension> &>(dof.get_tria()).load_user_flags(user_flags);
+ const_cast<Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &>
+ (dof.get_tria()).load_user_flags(user_flags);
}
namespace FETools
{
template <int dim, int spacedim,
- template <int, int> class DH1,
- template <int, int> class DH2,
+ template <int, int> class DoFHandlerType1,
+ template <int, int> class DoFHandlerType2,
class InVector, class OutVector>
void
- interpolate(const DH1<dim, spacedim> &dof1,
- const InVector &u1,
- const DH2<dim, spacedim> &dof2,
- OutVector &u2)
+ interpolate(const DoFHandlerType1<dim, spacedim> &dof1,
+ const InVector &u1,
+ const DoFHandlerType2<dim, spacedim> &dof2,
+ OutVector &u2)
{
ConstraintMatrix dummy;
dummy.close();
template <int dim, int spacedim,
- template <int, int> class DH1,
- template <int, int> class DH2,
+ template <int, int> class DoFHandlerType1,
+ template <int, int> class DoFHandlerType2,
class InVector, class OutVector>
void
- interpolate (const DH1<dim, spacedim> &dof1,
- const InVector &u1,
- const DH2<dim, spacedim> &dof2,
- const ConstraintMatrix &constraints,
- OutVector &u2)
+ interpolate (const DoFHandlerType1<dim, spacedim> &dof1,
+ const InVector &u1,
+ const DoFHandlerType2<dim, spacedim> &dof2,
+ const ConstraintMatrix &constraints,
+ OutVector &u2)
{
Assert(&dof1.get_tria()==&dof2.get_tria(), ExcTriangulationMismatch());
std_cxx11::shared_ptr<FullMatrix<double> > > >
interpolation_matrices;
- typename DH1<dim,spacedim>::active_cell_iterator cell1 = dof1.begin_active(),
- endc1 = dof1.end();
- typename DH2<dim,spacedim>::active_cell_iterator cell2 = dof2.begin_active(),
- endc2 = dof2.end();
+ typename DoFHandlerType1<dim,spacedim>::active_cell_iterator cell1 = dof1.begin_active(),
+ endc1 = dof1.end();
+ typename DoFHandlerType2<dim,spacedim>::active_cell_iterator cell2 = dof2.begin_active(),
+ endc2 = dof2.end();
(void)endc2;
std::vector<types::global_dof_index> dofs;
template <int dim,
- template <int> class DH,
+ template <int> class DoFHandlerType,
class InVector, class OutVector, int spacedim>
void
- back_interpolate(const DH<dim> &dof1,
- const InVector &u1,
+ back_interpolate(const DoFHandlerType<dim> &dof1,
+ const InVector &u1,
const FiniteElement<dim,spacedim> &fe2,
- OutVector &u1_interpolated)
+ OutVector &u1_interpolated)
{
Assert(u1.size() == dof1.n_dofs(),
ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
const types::subdomain_id subdomain_id =
dof1.get_tria().locally_owned_subdomain();
- typename DH<dim>::active_cell_iterator cell = dof1.begin_active(),
- endc = dof1.end();
+ typename DoFHandlerType<dim>::active_cell_iterator cell = dof1.begin_active(),
+ endc = dof1.end();
// map from possible fe objects in
// dof1 to the back_interpolation
template <int dim, int spacedim>
-template <template <int,int> class DH, bool lda>
+template <template <int, int> class DoFHandlerType, bool lda>
void
-FEValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DH<dim,spacedim>, lda> > &cell)
+FEValues<dim,spacedim>::reinit
+(const TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>, lda> > &cell)
{
// assert that the finite elements
// passed to the constructor and
this->maybe_invalidate_previous_present_cell (cell);
this->check_cell_similarity(cell);
- reset_pointer_in_place_if_possible<typename FEValuesBase<dim,spacedim>::template CellIterator<TriaIterator<DoFCellAccessor<DH<dim,spacedim>, lda> > > >
+ reset_pointer_in_place_if_possible<typename FEValuesBase<dim,spacedim>::template
+ CellIterator<TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>,
+ lda> > > >
(this->present_cell, cell);
// this was the part of the work
template <int dim, int spacedim>
-template <template <int,int> class DH, bool lda>
+template <template <int, int> class DoFHandlerType, bool lda>
void
-FEFaceValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DH<dim,spacedim>, lda> > &cell,
- const unsigned int face_no)
+FEFaceValues<dim,spacedim>::reinit
+(const TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>, lda> > &cell,
+ const unsigned int face_no)
{
// assert that the finite elements
// passed to the constructor and
ExcIndexRange (face_no, 0, GeometryInfo<dim>::faces_per_cell));
this->maybe_invalidate_previous_present_cell (cell);
- reset_pointer_in_place_if_possible<typename FEValuesBase<dim,spacedim>::template CellIterator<TriaIterator<DoFCellAccessor<DH<dim,spacedim>, lda> > > >
+ reset_pointer_in_place_if_possible<typename FEValuesBase<dim,spacedim>::template
+ CellIterator<TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>,
+ lda> > > >
(this->present_cell, cell);
// this was the part of the work
template <int dim, int spacedim>
-template <template <int,int> class DH, bool lda>
-void FESubfaceValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DH<dim,spacedim>, lda> > &cell,
- const unsigned int face_no,
- const unsigned int subface_no)
+template <template <int, int> class DoFHandlerType, bool lda>
+void FESubfaceValues<dim,spacedim>::reinit
+(const TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>, lda> > &cell,
+ const unsigned int face_no,
+ const unsigned int subface_no)
{
// assert that the finite elements
// passed to the constructor and
"instead in these cases."));
this->maybe_invalidate_previous_present_cell (cell);
- reset_pointer_in_place_if_possible<typename FEValuesBase<dim,spacedim>::template CellIterator<TriaIterator<DoFCellAccessor<DH<dim,spacedim>, lda> > > >
+ reset_pointer_in_place_if_possible<typename FEValuesBase<dim,spacedim>::template
+ CellIterator<TriaIterator<DoFCellAccessor<DoFHandlerType<dim,spacedim>,
+ lda> > > >
(this->present_cell, cell);
// this was the part of the work
DEAL_II_NAMESPACE_OPEN
-template<int dim, int spacedim, typename VectorType, class DH>
-MappingFEField<dim,spacedim,VectorType,DH>::InternalData::InternalData
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData::InternalData
(const FiniteElement<dim,spacedim> &fe,
const ComponentMask mask)
:
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
std::size_t
-MappingFEField<dim,spacedim,VectorType,DH>::InternalData::memory_consumption () const
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData::memory_consumption () const
{
Assert (false, ExcNotImplemented());
return 0;
-template<int dim, int spacedim, class DH, typename VectorType>
+template<int dim, int spacedim, typename DoFHandlerType, typename VectorType>
double &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::shape
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::shape
(const unsigned int qpoint,
const unsigned int shape_nr)
{
}
-template<int dim, int spacedim, class DH, typename VectorType>
+template<int dim, int spacedim, typename DoFHandlerType, typename VectorType>
const Tensor<1,dim> &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::derivative
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::derivative
(const unsigned int qpoint,
const unsigned int shape_nr) const
{
-template<int dim, int spacedim, class DH, typename VectorType>
+template<int dim, int spacedim, typename DoFHandlerType, typename VectorType>
Tensor<1,dim> &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::derivative
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::derivative
(const unsigned int qpoint,
const unsigned int shape_nr)
{
}
-template <int dim, int spacedim, class DH, typename VectorType>
+template <int dim, int spacedim, typename DoFHandlerType, typename VectorType>
const Tensor<2,dim> &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::second_derivative
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::second_derivative
(const unsigned int qpoint,
const unsigned int shape_nr) const
{
-template <int dim, int spacedim, class DH, typename VectorType>
+template <int dim, int spacedim, typename DoFHandlerType, typename VectorType>
Tensor<2,dim> &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::second_derivative
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::second_derivative
(const unsigned int qpoint,
const unsigned int shape_nr)
{
}
-template <int dim, int spacedim, class DH, typename VectorType>
+template <int dim, int spacedim, typename DoFHandlerType, typename VectorType>
const Tensor<3,dim> &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::third_derivative
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::third_derivative
(const unsigned int qpoint,
const unsigned int shape_nr) const
{
-template <int dim, int spacedim, class DH, typename VectorType>
+template <int dim, int spacedim, typename DoFHandlerType, typename VectorType>
Tensor<3,dim> &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::third_derivative
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::third_derivative
(const unsigned int qpoint,
const unsigned int shape_nr)
{
}
-template <int dim, int spacedim, class DH, typename VectorType>
+template <int dim, int spacedim, typename DoFHandlerType, typename VectorType>
const Tensor<4,dim> &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::fourth_derivative
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::fourth_derivative
(const unsigned int qpoint,
const unsigned int shape_nr) const
{
-template <int dim, int spacedim, class DH, typename VectorType>
+template <int dim, int spacedim, typename DoFHandlerType, typename VectorType>
Tensor<4,dim> &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::fourth_derivative
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::fourth_derivative
(const unsigned int qpoint,
const unsigned int shape_nr)
{
-template<int dim, int spacedim, typename VectorType, class DH>
-MappingFEField<dim,spacedim,VectorType,DH>::MappingFEField
-(const DH &euler_dof_handler,
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::MappingFEField
+(const DoFHandlerType &euler_dof_handler,
const VectorType &euler_vector,
const ComponentMask mask)
:
}
-template<int dim, int spacedim, typename VectorType, class DH>
-MappingFEField<dim,spacedim,VectorType,DH>::MappingFEField
-(const MappingFEField<dim,spacedim,VectorType,DH> &mapping)
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::MappingFEField
+(const MappingFEField<dim,spacedim,VectorType,DoFHandlerType> &mapping)
:
euler_vector(mapping.euler_vector),
fe(mapping.fe),
-template<int dim, int spacedim, class DH, typename VectorType>
+template<int dim, int spacedim, typename DoFHandlerType, typename VectorType>
inline
const double &
-MappingFEField<dim,spacedim,DH,VectorType>::InternalData::shape
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::InternalData::shape
(const unsigned int qpoint,
const unsigned int shape_nr) const
{
-template <int dim, int spacedim, class DH, typename VectorType>
+template <int dim, int spacedim, typename DoFHandlerType, typename VectorType>
bool
-MappingFEField<dim,spacedim,DH,VectorType>::preserves_vertex_locations () const
+MappingFEField<dim,spacedim,DoFHandlerType,VectorType>::preserves_vertex_locations () const
{
return false;
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
compute_shapes_virtual (const std::vector<Point<dim> > &unit_points,
typename MappingFEField<dim, spacedim>::InternalData &data) const
{
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
UpdateFlags
-MappingFEField<dim,spacedim,VectorType,DH>::requires_update_flags (const UpdateFlags in) const
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::requires_update_flags (const UpdateFlags in) const
{
// add flags if the respective quantities are necessary to compute
// what we need. note that some flags appear in both conditions and
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::compute_data
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::compute_data
(const UpdateFlags update_flags,
const Quadrature<dim> &q,
const unsigned int n_original_q_points,
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::compute_face_data
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::compute_face_data
(const UpdateFlags update_flags,
const Quadrature<dim> &q,
const unsigned int n_original_q_points,
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
typename
-MappingFEField<dim,spacedim,VectorType,DH>::InternalData *
-MappingFEField<dim,spacedim,VectorType,DH>::get_data (const UpdateFlags update_flags,
- const Quadrature<dim> &quadrature) const
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData *
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::get_data (const UpdateFlags update_flags,
+ const Quadrature<dim> &quadrature) const
{
InternalData *data = new InternalData(*fe, fe_mask);
this->compute_data (update_flags, quadrature,
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
typename Mapping<dim,spacedim>::InternalDataBase *
-MappingFEField<dim,spacedim,VectorType,DH>::get_face_data
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::get_face_data
(const UpdateFlags update_flags,
const Quadrature<dim-1> &quadrature) const
{
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
typename Mapping<dim,spacedim>::InternalDataBase *
-MappingFEField<dim,spacedim,VectorType,DH>::get_subface_data
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::get_subface_data
(const UpdateFlags update_flags,
const Quadrature<dim-1> &quadrature) const
{
// Note that the CellSimilarity flag is modifiable, since MappingFEField can need to
// recalculate data even when cells are similar.
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
CellSimilarity::Similarity
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const CellSimilarity::Similarity cell_similarity,
const Quadrature<dim> &quadrature,
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const Quadrature<dim-1> &quadrature,
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
namespace
{
- template<int dim, int spacedim, int rank, typename VectorType, class DH>
+ template<int dim, int spacedim, int rank, typename VectorType, typename DoFHandlerType>
void
transform_fields(const VectorSlice<const std::vector<Tensor<rank,dim> > > input,
const MappingType mapping_type,
VectorSlice<std::vector<Tensor<rank,spacedim> > > output)
{
AssertDimension (input.size(), output.size());
- Assert ((dynamic_cast<const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData *>(&mapping_data) != 0),
+ Assert ((dynamic_cast<const typename MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData *>(&mapping_data) != 0),
ExcInternalError());
- const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData
- &data = static_cast<const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData &>(mapping_data);
+ const typename MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData
+ &data = static_cast<const typename MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData &>(mapping_data);
switch (mapping_type)
{
}
- template<int dim, int spacedim, int rank, typename VectorType, class DH>
+ template<int dim, int spacedim, int rank, typename VectorType, typename DoFHandlerType>
void
- transform_differential_forms(const VectorSlice<const std::vector<DerivativeForm<rank, dim,spacedim> > > input,
- const MappingType mapping_type,
- const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
- VectorSlice<std::vector<Tensor<rank+1, spacedim> > > output)
+ transform_differential_forms
+ (const VectorSlice<const std::vector<DerivativeForm<rank, dim,spacedim> > > input,
+ const MappingType mapping_type,
+ const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
+ VectorSlice<std::vector<Tensor<rank+1, spacedim> > > output)
{
AssertDimension (input.size(), output.size());
- Assert ((dynamic_cast<const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData *>(&mapping_data) != 0),
+ Assert ((dynamic_cast<const typename MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData *>(&mapping_data) != 0),
ExcInternalError());
- const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData
- &data = static_cast<const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData &>(mapping_data);
+ const typename MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData
+ &data = static_cast<const typename MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData &>(mapping_data);
switch (mapping_type)
{
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
transform (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
const MappingType mapping_type,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
{
AssertDimension (input.size(), output.size());
- transform_fields<dim,spacedim,1,VectorType,DH>(input, mapping_type, mapping_data, output);
+ transform_fields<dim,spacedim,1,VectorType,DoFHandlerType>(input, mapping_type, mapping_data, output);
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
transform (const VectorSlice<const std::vector<DerivativeForm<1, dim ,spacedim> > > input,
const MappingType mapping_type,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
{
AssertDimension (input.size(), output.size());
- transform_differential_forms<dim,spacedim,1,VectorType,DH>(input, mapping_type, mapping_data, output);
+ transform_differential_forms<dim,spacedim,1,VectorType,DoFHandlerType>(input, mapping_type, mapping_data, output);
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
transform (const VectorSlice<const std::vector<Tensor<2, dim> > > input,
const MappingType,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
transform (const VectorSlice<const std::vector< DerivativeForm<2, dim, spacedim> > > input,
const MappingType mapping_type,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
transform (const VectorSlice<const std::vector< Tensor<3,dim> > > input,
const MappingType /*mapping_type*/,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
Point<spacedim>
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
transform_unit_to_real_cell (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const Point<dim> &p) const
{
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
Point<spacedim>
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
do_transform_unit_to_real_cell (const InternalData &data) const
{
Point<spacedim> p_real;
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
Point<dim>
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
transform_real_to_unit_cell (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const Point<spacedim> &p) const
{
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
Point<dim>
-MappingFEField<dim,spacedim,VectorType,DH>::
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::
do_transform_real_to_unit_cell
(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const Point<spacedim> &p,
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
unsigned int
-MappingFEField<dim,spacedim,VectorType,DH>::get_degree() const
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::get_degree() const
{
return fe->degree;
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
ComponentMask
-MappingFEField<dim,spacedim,VectorType,DH>::get_component_mask() const
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::get_component_mask() const
{
return this->fe_mask;
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
Mapping<dim,spacedim> *
-MappingFEField<dim,spacedim,VectorType,DH>::clone () const
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::clone () const
{
- return new MappingFEField<dim,spacedim,VectorType,DH>(*this);
+ return new MappingFEField<dim,spacedim,VectorType,DoFHandlerType>(*this);
}
-template<int dim, int spacedim, typename VectorType, class DH>
+template<int dim, int spacedim, typename VectorType, typename DoFHandlerType>
void
-MappingFEField<dim,spacedim,VectorType,DH>::update_internal_dofs
+MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::update_internal_dofs
(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const typename MappingFEField<dim, spacedim>::InternalData &data) const
{
Assert(euler_dof_handler != 0, ExcMessage("euler_dof_handler is empty"));
- typename DH::cell_iterator dof_cell(*cell, euler_dof_handler);
+ typename DoFHandlerType::cell_iterator dof_cell(*cell, euler_dof_handler);
Assert (dof_cell->active() == true, ExcInactiveCell());
dof_cell->get_dof_indices(data.local_dof_indices);
template <int dim, int spacedim>
- template <class DH, bool lda>
+ template <typename DoFHandlerType, bool lda>
void
- FEValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DH,lda> > cell,
+ FEValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType,lda> > cell,
const unsigned int q_index,
const unsigned int mapping_index,
const unsigned int fe_index)
template <int dim, int spacedim>
- template <class DH, bool lda>
+ template <typename DoFHandlerType, bool lda>
void
- FEFaceValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DH,lda> > cell,
+ FEFaceValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType,lda> > cell,
const unsigned int face_no,
const unsigned int q_index,
const unsigned int mapping_index,
template <int dim, int spacedim>
- template <class DH, bool lda>
+ template <typename DoFHandlerType, bool lda>
void
- FESubfaceValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DH,lda> > cell,
+ FESubfaceValues<dim,spacedim>::reinit (const TriaIterator<DoFCellAccessor<DoFHandlerType,lda> > cell,
const unsigned int face_no,
const unsigned int subface_no,
const unsigned int q_index,
- template <class DH, class SP>
- void make_sparsity_pattern (const DH &dof,
- SP &sparsity,
- const unsigned int level)
+ template <typename DoFHandlerType, class SP>
+ void make_sparsity_pattern (const DoFHandlerType &dof,
+ SP &sparsity,
+ const unsigned int level)
{
const types::global_dof_index n_dofs = dof.n_dofs(level);
(void)n_dofs;
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
- typename DH::cell_iterator cell = dof.begin(level),
- endc = dof.end(level);
+ typename DoFHandlerType::cell_iterator cell = dof.begin(level),
+ endc = dof.end(level);
for (; cell!=endc; ++cell)
if (dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id
|| cell->level_subdomain_id()==dof.get_tria().locally_owned_subdomain())
- template <class DH>
+ template <typename DoFHandlerType>
void
- count_dofs_per_block (
- const DH &dof_handler,
- std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
- std::vector<unsigned int> target_block)
+ count_dofs_per_block
+ (const DoFHandlerType &dof_handler,
+ std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
+ std::vector<unsigned int> target_block)
{
- const FiniteElement<DH::dimension,DH::space_dimension> &fe = dof_handler.get_fe();
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof_handler.get_fe();
const unsigned int n_blocks = fe.n_blocks();
const unsigned int n_levels = dof_handler.get_tria().n_global_levels();
for (unsigned int i=0; i<n_blocks; ++i)
{
void (*fun_ptr) (const unsigned int level,
- const DH &,
+ const DoFHandlerType &,
const BlockMask &,
std::vector<bool> &)
- = &DoFTools::extract_level_dofs<DH>;
+ = &DoFTools::extract_level_dofs<DoFHandlerType>;
std::vector<bool> tmp(n_blocks, false);
tmp[i] = true;
-template <int dim, class DH>
+template <int dim, typename DoFHandlerType>
void
-DataOut<dim,DH>::
-build_one_patch (const std::pair<cell_iterator, unsigned int> *cell_and_index,
- internal::DataOut::ParallelData<DH::dimension, DH::space_dimension> &scratch_data,
- const unsigned int n_subdivisions,
- const CurvedCellRegion curved_cell_region,
- std::vector<DataOutBase::Patch<DH::dimension, DH::space_dimension> > &patches)
+DataOut<dim,DoFHandlerType>::
+build_one_patch
+(const std::pair<cell_iterator, unsigned int> *cell_and_index,
+ internal::DataOut::ParallelData<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &scratch_data,
+ const unsigned int n_subdivisions,
+ const CurvedCellRegion curved_cell_region,
+ std::vector<DataOutBase::Patch<DoFHandlerType::dimension, DoFHandlerType::space_dimension> > &patches)
{
// first create the output object that we will write into
- ::dealii::DataOutBase::Patch<DH::dimension, DH::space_dimension> patch;
+ ::dealii::DataOutBase::Patch<DoFHandlerType::dimension, DoFHandlerType::space_dimension> patch;
patch.n_subdivisions = n_subdivisions;
// use ucd_to_deal map as patch vertices are in the old, unnatural
// ordering. if the mapping does not preserve locations
// (e.g. MappingQEulerian), we need to compute the offset of the vertex for
// the graphical output. Otherwise, we can just use the vertex info.
- for (unsigned int vertex=0; vertex<GeometryInfo<DH::dimension>::vertices_per_cell; ++vertex)
+ for (unsigned int vertex=0; vertex<GeometryInfo<DoFHandlerType::dimension>::vertices_per_cell; ++vertex)
if (scratch_data.mapping_collection[0].preserves_vertex_locations())
patch.vertices[vertex] = cell_and_index->first->vertex(vertex);
else
patch.vertices[vertex] = scratch_data.mapping_collection[0].transform_unit_to_real_cell
(cell_and_index->first,
- GeometryInfo<DH::dimension>::unit_cell_vertex (vertex));
+ GeometryInfo<DoFHandlerType::dimension>::unit_cell_vertex (vertex));
if (scratch_data.n_datasets > 0)
{
- // create DH::active_cell_iterator and initialize FEValues
+ // create DoFHandlerType::active_cell_iterator and initialize FEValues
scratch_data.reinit_all_fe_values(this->dof_data, cell_and_index->first);
- const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values
+ const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values
= scratch_data.get_present_fe_values (0);
const unsigned int n_q_points = fe_patch_values.n_quadrature_points;
&&
(cell_and_index->first->at_boundary()
||
- (DH::dimension != DH::space_dimension))))
+ (DoFHandlerType::dimension != DoFHandlerType::space_dimension))))
{
- Assert(patch.space_dim==DH::space_dimension, ExcInternalError());
- const std::vector<Point<DH::space_dimension> > &q_points=fe_patch_values.get_quadrature_points();
+ Assert(patch.space_dim==DoFHandlerType::space_dimension, ExcInternalError());
+ const std::vector<Point<DoFHandlerType::space_dimension> > &q_points=fe_patch_values.get_quadrature_points();
// resize the patch.data member in order to have enough memory for
// the quadrature points as well
- patch.data.reinit (scratch_data.n_datasets+DH::space_dimension, n_q_points);
+ patch.data.reinit (scratch_data.n_datasets+DoFHandlerType::space_dimension, n_q_points);
// set the flag indicating that for this cell the points are
// explicitly given
patch.points_are_available=true;
// copy points to patch.data
- for (unsigned int i=0; i<DH::space_dimension; ++i)
+ for (unsigned int i=0; i<DoFHandlerType::space_dimension; ++i)
for (unsigned int q=0; q<n_q_points; ++q)
- patch.data(patch.data.size(0)-DH::space_dimension+i,q)=q_points[q][i];
+ patch.data(patch.data.size(0)-DoFHandlerType::space_dimension+i,q)=q_points[q][i];
}
else
{
// first fill dof_data
for (unsigned int dataset=0; dataset<this->dof_data.size(); ++dataset)
{
- const FEValuesBase<DH::dimension,DH::space_dimension> &this_fe_patch_values
+ const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &this_fe_patch_values
= scratch_data.get_present_fe_values (dataset);
const unsigned int n_components =
this_fe_patch_values.get_fe().n_components();
- const DataPostprocessor<DH::space_dimension> *postprocessor=this->dof_data[dataset]->postprocessor;
+ const DataPostprocessor<DoFHandlerType::space_dimension> *postprocessor=this->dof_data[dataset]->postprocessor;
if (postprocessor != 0)
{
scratch_data.patch_evaluation_points = this_fe_patch_values.get_quadrature_points();
- std::vector<Point<DH::space_dimension> > dummy_normals;
+ std::vector<Point<DoFHandlerType::space_dimension> > dummy_normals;
postprocessor->
compute_derived_quantities_scalar(scratch_data.patch_values,
scratch_data.patch_gradients,
if (update_flags & update_quadrature_points)
scratch_data.patch_evaluation_points = this_fe_patch_values.get_quadrature_points();
- std::vector<Point<DH::space_dimension> > dummy_normals;
+ std::vector<Point<DoFHandlerType::space_dimension> > dummy_normals;
postprocessor->
compute_derived_quantities_vector(scratch_data.patch_values_system,
}
- for (unsigned int f=0; f<GeometryInfo<DH::dimension>::faces_per_cell; ++f)
+ for (unsigned int f=0; f<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++f)
{
// let's look up whether the neighbor behind that face is noted in the
// table of cells which we treat. this can only happen if the neighbor
||
((*scratch_data.cell_to_patch_index_map)[neighbor->level()][neighbor->index()]
==
- dealii::DataOutBase::Patch<DH::dimension>::no_neighbor))
+ dealii::DataOutBase::Patch<DoFHandlerType::dimension>::no_neighbor))
{
patch.neighbors[f] = numbers::invalid_unsigned_int;
continue;
-template <int dim, class DH>
-void DataOut<dim,DH>::build_patches (const unsigned int n_subdivisions)
+template <int dim, typename DoFHandlerType>
+void DataOut<dim,DoFHandlerType>::build_patches (const unsigned int n_subdivisions)
{
- build_patches (StaticMappingQ1<DH::dimension,DH::space_dimension>::mapping,
+ build_patches (StaticMappingQ1<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::mapping,
n_subdivisions, no_curved_cells);
}
-template <int dim, class DH>
-void DataOut<dim,DH>::build_patches (const Mapping<DH::dimension,DH::space_dimension> &mapping,
- const unsigned int n_subdivisions_,
- const CurvedCellRegion curved_region)
+template <int dim, typename DoFHandlerType>
+void DataOut<dim,DoFHandlerType>::build_patches
+(const Mapping<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &mapping,
+ const unsigned int n_subdivisions_,
+ const CurvedCellRegion curved_region)
{
// Check consistency of redundant template parameter
- Assert (dim==DH::dimension, ExcDimensionMismatch(dim, DH::dimension));
+ Assert (dim==DoFHandlerType::dimension, ExcDimensionMismatch(dim, DoFHandlerType::dimension));
Assert (this->triangulation != 0,
Exceptions::DataOut::ExcNoTriangulationSelected());
static_cast<unsigned int>(cell->index()));
cell_to_patch_index_map[l].resize (max_index+1,
- dealii::DataOutBase::Patch<DH::dimension,DH::space_dimension>::no_neighbor);
+ dealii::DataOutBase::Patch<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension>::no_neighbor);
}
// will be all_cells[patch_index] = pair(cell, active_index)
ExcMessage("The update of normal vectors may not be requested for evaluation of "
"data on cells via DataPostprocessor."));
- internal::DataOut::ParallelData<DH::dimension, DH::space_dimension>
+ internal::DataOut::ParallelData<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
thread_data (n_datasets, n_subdivisions,
n_postprocessor_outputs,
mapping,
if (all_cells.size() > 0)
WorkStream::run (&all_cells[0],
&all_cells[0]+all_cells.size(),
- std_cxx11::bind(&DataOut<dim,DH>::build_one_patch,
+ std_cxx11::bind(&DataOut<dim,DoFHandlerType>::build_one_patch,
this,
std_cxx11::_1,
std_cxx11::_2,
-template <int dim, class DH>
-typename DataOut<dim,DH>::cell_iterator
-DataOut<dim,DH>::first_cell ()
+template <int dim, typename DoFHandlerType>
+typename DataOut<dim,DoFHandlerType>::cell_iterator
+DataOut<dim,DoFHandlerType>::first_cell ()
{
return this->triangulation->begin_active ();
}
-template <int dim, class DH>
-typename DataOut<dim,DH>::cell_iterator
-DataOut<dim,DH>::next_cell (const typename DataOut<dim,DH>::cell_iterator &cell)
+template <int dim, typename DoFHandlerType>
+typename DataOut<dim,DoFHandlerType>::cell_iterator
+DataOut<dim,DoFHandlerType>::next_cell
+(const typename DataOut<dim,DoFHandlerType>::cell_iterator &cell)
{
// convert the iterator to an active_iterator and advance this to the next
// active cell
- typename Triangulation<DH::dimension,DH::space_dimension>::
+ typename Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension>::
active_cell_iterator active_cell = cell;
++active_cell;
return active_cell;
-template <int dim, class DH>
-typename DataOut<dim,DH>::cell_iterator
-DataOut<dim,DH>::first_locally_owned_cell ()
+template <int dim, typename DoFHandlerType>
+typename DataOut<dim,DoFHandlerType>::cell_iterator
+DataOut<dim,DoFHandlerType>::first_locally_owned_cell ()
{
- typename DataOut<dim,DH>::cell_iterator
+ typename DataOut<dim,DoFHandlerType>::cell_iterator
cell = first_cell();
// skip cells if the current one has no children (is active) and is a ghost
-template <int dim, class DH>
-typename DataOut<dim,DH>::cell_iterator
-DataOut<dim,DH>::next_locally_owned_cell (const typename DataOut<dim,DH>::cell_iterator &old_cell)
+template <int dim, typename DoFHandlerType>
+typename DataOut<dim,DoFHandlerType>::cell_iterator
+DataOut<dim,DoFHandlerType>::next_locally_owned_cell
+(const typename DataOut<dim,DoFHandlerType>::cell_iterator &old_cell)
{
- typename DataOut<dim,DH>::cell_iterator
+ typename DataOut<dim,DoFHandlerType>::cell_iterator
cell = next_cell(old_cell);
while ((cell != this->triangulation->end()) &&
(cell->has_children() == false) &&
template <int dim, int spacedim>
- template <typename DH>
+ template <typename DoFHandlerType>
void
ParallelDataBase<dim,spacedim>::
- reinit_all_fe_values(std::vector<std_cxx11::shared_ptr<DataEntryBase<DH> > > &dof_data,
- const typename dealii::Triangulation<dim,spacedim>::cell_iterator &cell,
- const unsigned int face)
+ reinit_all_fe_values(std::vector<std_cxx11::shared_ptr<DataEntryBase<DoFHandlerType> > > &dof_data,
+ const typename dealii::Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int face)
{
for (unsigned int dataset=0; dataset<dof_data.size(); ++dataset)
{
duplicate = true;
if (duplicate == false)
{
- typename DH::active_cell_iterator dh_cell(&cell->get_triangulation(),
- cell->level(),
- cell->index(),
- dof_data[dataset]->dof_handler);
+ typename DoFHandlerType::active_cell_iterator dh_cell(&cell->get_triangulation(),
+ cell->level(),
+ cell->index(),
+ dof_data[dataset]->dof_handler);
if (x_fe_values.empty())
{
AssertIndexRange(face,
{
namespace DataOut
{
- template <class DH>
- DataEntryBase<DH>::DataEntryBase (const DH *dofs,
- const std::vector<std::string> &names_in,
- const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation)
+ template <typename DoFHandlerType>
+ DataEntryBase<DoFHandlerType>::DataEntryBase
+ (const DoFHandlerType *dofs,
+ const std::vector<std::string> &names_in,
+ const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation)
:
- dof_handler (dofs, typeid(dealii::DataOut_DoFData<DH,DH::dimension,DH::space_dimension>).name()),
+ dof_handler (dofs, typeid(dealii::DataOut_DoFData<DoFHandlerType,DoFHandlerType::dimension,DoFHandlerType::space_dimension>).name()),
names(names_in),
data_component_interpretation (data_component_interpretation),
postprocessor(0, typeid(*this).name()),
- template <class DH>
- DataEntryBase<DH>::DataEntryBase (const DH *dofs,
- const DataPostprocessor<DH::space_dimension> *data_postprocessor)
+ template <typename DoFHandlerType>
+ DataEntryBase<DoFHandlerType>::DataEntryBase
+ (const DoFHandlerType *dofs,
+ const DataPostprocessor<DoFHandlerType::space_dimension> *data_postprocessor)
:
- dof_handler (dofs, typeid(dealii::DataOut_DoFData<DH,DH::dimension,DH::space_dimension>).name()),
+ dof_handler (dofs, typeid(dealii::DataOut_DoFData<DoFHandlerType,DoFHandlerType::dimension,DoFHandlerType::space_dimension>).name()),
names(data_postprocessor->get_names()),
data_component_interpretation (data_postprocessor->get_data_component_interpretation()),
postprocessor(data_postprocessor, typeid(*this).name()),
- template <class DH>
- DataEntryBase<DH>::~DataEntryBase ()
+ template <typename DoFHandlerType>
+ DataEntryBase<DoFHandlerType>::~DataEntryBase ()
{}
*
* @author Wolfgang Bangerth, 2004
*/
- template <class DH, typename VectorType>
- class DataEntry : public DataEntryBase<DH>
+ template <typename DoFHandlerType, typename VectorType>
+ class DataEntry : public DataEntryBase<DoFHandlerType>
{
public:
/**
* the vector and their interpretation as scalar or vector data. This
* constructor assumes that no postprocessor is going to be used.
*/
- DataEntry (const DH *dofs,
- const VectorType *data,
- const std::vector<std::string> &names,
- const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation);
+ DataEntry
+ (const DoFHandlerType *dofs,
+ const VectorType *data,
+ const std::vector<std::string> &names,
+ const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation);
/**
* Constructor when a data postprocessor is going to be used. In that
* case, the names and vector declarations are going to be acquired from
* the postprocessor.
*/
- DataEntry (const DH *dofs,
- const VectorType *data,
- const DataPostprocessor<DH::space_dimension> *data_postprocessor);
+ DataEntry (const DoFHandlerType *dofs,
+ const VectorType *data,
+ const DataPostprocessor<DoFHandlerType::space_dimension> *data_postprocessor);
/**
* Assuming that the stored vector is a cell vector, extract the given
*/
virtual
void
- get_function_values (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<double> &patch_values) const;
+ get_function_values
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<double> &patch_values) const;
/**
* Given a FEValuesBase object, extract the values on the present cell
*/
virtual
void
- get_function_values (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<dealii::Vector<double> > &patch_values_system) const;
+ get_function_values
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<dealii::Vector<double> > &patch_values_system) const;
/**
* Given a FEValuesBase object, extract the gradients on the present
*/
virtual
void
- get_function_gradients (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<Tensor<1,DH::space_dimension> > &patch_gradients) const;
+ get_function_gradients
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<Tensor<1,DoFHandlerType::space_dimension> > &patch_gradients) const;
/**
* Given a FEValuesBase object, extract the gradients on the present
*/
virtual
void
- get_function_gradients (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<std::vector<Tensor<1,DH::space_dimension> > > &patch_gradients_system) const;
+ get_function_gradients
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<std::vector<Tensor<1,DoFHandlerType::space_dimension> > > &patch_gradients_system) const;
/**
* Given a FEValuesBase object, extract the second derivatives on the
*/
virtual
void
- get_function_hessians (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<Tensor<2,DH::space_dimension> > &patch_hessians) const;
+ get_function_hessians
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<Tensor<2,DoFHandlerType::space_dimension> > &patch_hessians) const;
/**
* Given a FEValuesBase object, extract the second derivatives on the
*/
virtual
void
- get_function_hessians (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<std::vector< Tensor<2,DH::space_dimension> > > &patch_hessians_system) const;
+ get_function_hessians
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<std::vector< Tensor<2,DoFHandlerType::space_dimension> > > &patch_hessians_system) const;
/**
* Clear all references to the vectors.
- template <class DH, typename VectorType>
- DataEntry<DH,VectorType>::
- DataEntry (const DH *dofs,
- const VectorType *data,
- const std::vector<std::string> &names,
+ template <typename DoFHandlerType, typename VectorType>
+ DataEntry<DoFHandlerType,VectorType>::
+ DataEntry (const DoFHandlerType *dofs,
+ const VectorType *data,
+ const std::vector<std::string> &names,
const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation)
:
- DataEntryBase<DH> (dofs, names, data_component_interpretation),
+ DataEntryBase<DoFHandlerType> (dofs, names, data_component_interpretation),
vector (data)
{}
- template <class DH, typename VectorType>
- DataEntry<DH,VectorType>::
- DataEntry (const DH *dofs,
- const VectorType *data,
- const DataPostprocessor<DH::space_dimension> *data_postprocessor)
+ template <typename DoFHandlerType, typename VectorType>
+ DataEntry<DoFHandlerType,VectorType>::
+ DataEntry (const DoFHandlerType *dofs,
+ const VectorType *data,
+ const DataPostprocessor<DoFHandlerType::space_dimension> *data_postprocessor)
:
- DataEntryBase<DH> (dofs, data_postprocessor),
+ DataEntryBase<DoFHandlerType> (dofs, data_postprocessor),
vector (data)
{}
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
double
- DataEntry<DH,VectorType>::
+ DataEntry<DoFHandlerType,VectorType>::
get_cell_data_value (const unsigned int cell_number) const
{
return get_vector_element(*vector, cell_number);
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
void
- DataEntry<DH,VectorType>::get_function_values
- (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
+ DataEntry<DoFHandlerType,VectorType>::get_function_values
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
std::vector<dealii::Vector<double> > &patch_values_system) const
{
// FIXME: FEValuesBase gives us data in types that match that of
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
void
- DataEntry<DH,VectorType>::get_function_values
- (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
+ DataEntry<DoFHandlerType,VectorType>::get_function_values
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
std::vector<double> &patch_values) const
{
// FIXME: FEValuesBase gives us data in types that match that of
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
void
- DataEntry<DH,VectorType>::get_function_gradients
- (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<std::vector<Tensor<1,DH::space_dimension> > > &patch_gradients_system) const
+ DataEntry<DoFHandlerType,VectorType>::get_function_gradients
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<std::vector<Tensor<1,DoFHandlerType::space_dimension> > > &patch_gradients_system) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
// identity cast whenever the code is
// executed, but the cast is necessary
// to allow compilation even if we don't get here
- reinterpret_cast<std::vector<std::vector<Tensor<1,DH::space_dimension,typename VectorType::value_type> > >&>
+ reinterpret_cast<std::vector<std::vector<Tensor<1,DoFHandlerType::space_dimension,typename VectorType::value_type> > >&>
(patch_gradients_system));
}
else
{
- std::vector<std::vector<Tensor<1,DH::space_dimension,typename VectorType::value_type> > > tmp(patch_gradients_system.size());
+ std::vector<std::vector<Tensor<1,DoFHandlerType::space_dimension,
+ typename VectorType::value_type> > >
+ tmp(patch_gradients_system.size());
for (unsigned int i = 0; i < tmp.size(); i++)
tmp[i].resize(patch_gradients_system[i].size());
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
void
- DataEntry<DH,VectorType>::get_function_gradients
- (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<Tensor<1,DH::space_dimension> > &patch_gradients) const
+ DataEntry<DoFHandlerType,VectorType>::get_function_gradients
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<Tensor<1,DoFHandlerType::space_dimension> > &patch_gradients) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
// identity cast whenever the code is
// executed, but the cast is necessary
// to allow compilation even if we don't get here
- reinterpret_cast<std::vector<Tensor<1,DH::space_dimension,typename VectorType::value_type> >&>
+ reinterpret_cast<std::vector<Tensor<1,DoFHandlerType::space_dimension,typename VectorType::value_type> >&>
(patch_gradients));
}
else
{
- std::vector<Tensor<1,DH::space_dimension,typename VectorType::value_type> > tmp;
+ std::vector<Tensor<1,DoFHandlerType::space_dimension,typename VectorType::value_type> > tmp;
tmp.resize(patch_gradients.size());
fe_patch_values.get_function_gradients (*vector, tmp);
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
void
- DataEntry<DH,VectorType>::get_function_hessians
- (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<std::vector<Tensor<2,DH::space_dimension> > > &patch_hessians_system) const
+ DataEntry<DoFHandlerType,VectorType>::get_function_hessians
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<std::vector<Tensor<2,DoFHandlerType::space_dimension> > > &patch_hessians_system) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
// identity cast whenever the code is
// executed, but the cast is necessary
// to allow compilation even if we don't get here
- reinterpret_cast<std::vector<std::vector<Tensor<2,DH::space_dimension,typename VectorType::value_type> > >&>
+ reinterpret_cast<std::vector<std::vector<Tensor<2,DoFHandlerType::space_dimension,typename VectorType::value_type> > >&>
(patch_hessians_system));
}
else
{
- std::vector<std::vector<Tensor<2,DH::space_dimension,typename VectorType::value_type> > > tmp(patch_hessians_system.size());
+ std::vector<std::vector<Tensor<2,DoFHandlerType::space_dimension,
+ typename VectorType::value_type> > >
+ tmp(patch_hessians_system.size());
for (unsigned int i = 0; i < tmp.size(); i++)
tmp[i].resize(patch_hessians_system[i].size());
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
void
- DataEntry<DH,VectorType>::get_function_hessians
- (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<Tensor<2,DH::space_dimension> > &patch_hessians) const
+ DataEntry<DoFHandlerType,VectorType>::get_function_hessians
+ (const FEValuesBase<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe_patch_values,
+ std::vector<Tensor<2,DoFHandlerType::space_dimension> > &patch_hessians) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
// identity cast whenever the code is
// executed, but the cast is necessary
// to allow compilation even if we don't get here
- reinterpret_cast<std::vector<Tensor<2,DH::space_dimension,typename VectorType::value_type> >&>
+ reinterpret_cast<std::vector<Tensor<2,DoFHandlerType
+ ::space_dimension,typename VectorType::value_type> >&>
(patch_hessians));
}
else
{
- std::vector<Tensor<2,DH::space_dimension,typename VectorType::value_type> > tmp(patch_hessians.size());
+ std::vector<Tensor<2,DoFHandlerType::space_dimension,typename VectorType::value_type> >
+ tmp(patch_hessians.size());
fe_patch_values.get_function_hessians (*vector, tmp);
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
std::size_t
- DataEntry<DH,VectorType>::memory_consumption () const
+ DataEntry<DoFHandlerType,VectorType>::memory_consumption () const
{
return (sizeof (vector) +
MemoryConsumption::memory_consumption (this->names));
- template <class DH, typename VectorType>
+ template <typename DoFHandlerType, typename VectorType>
void
- DataEntry<DH,VectorType>::clear ()
+ DataEntry<DoFHandlerType,VectorType>::clear ()
{
vector = 0;
this->dof_handler = 0;
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::DataOut_DoFData ()
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::DataOut_DoFData ()
:
triangulation(0,typeid(*this).name()),
dofs(0,typeid(*this).name())
-template <class DH, int patch_dim, int patch_space_dim>
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::~DataOut_DoFData ()
+template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::~DataOut_DoFData ()
{
clear ();
}
-template <class DH, int patch_dim, int patch_space_dim>
+template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-attach_dof_handler (const DH &d)
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
+attach_dof_handler (const DoFHandlerType &d)
{
Assert (dof_data.size() == 0,
Exceptions::DataOut::ExcOldDataStillPresent());
Assert (cell_data.size() == 0,
Exceptions::DataOut::ExcOldDataStillPresent());
- triangulation = SmartPointer<const Triangulation<DH::dimension,DH::space_dimension> >(&d.get_tria(), typeid(*this).name());
- dofs = SmartPointer<const DH>(&d, typeid(*this).name());
+ triangulation = SmartPointer<const Triangulation<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension> >
+ (&d.get_tria(), typeid(*this).name());
+ dofs = SmartPointer<const DoFHandlerType>(&d, typeid(*this).name());
}
-template <class DH, int patch_dim, int patch_space_dim>
+template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-attach_triangulation (const Triangulation<DH::dimension,DH::space_dimension> &tria)
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
+attach_triangulation (const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &tria)
{
Assert (dof_data.size() == 0,
Exceptions::DataOut::ExcOldDataStillPresent());
Assert (cell_data.size() == 0,
Exceptions::DataOut::ExcOldDataStillPresent());
- triangulation = SmartPointer<const Triangulation<DH::dimension,DH::space_dimension> >(&tria, typeid(*this).name());
+ triangulation = SmartPointer<const Triangulation<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension> >
+ (&tria, typeid(*this).name());
}
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
template <typename VectorType>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
add_data_vector (const VectorType &vec,
const std::string &name,
const DataVectorType type,
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
template <typename VectorType>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
add_data_vector (const VectorType &vec,
const std::vector<std::string> &names,
const DataVectorType type,
Assert (false, ExcInternalError());
}
- internal::DataOut::DataEntryBase<DH> *new_entry
- = new internal::DataOut::DataEntry<DH,VectorType>(dofs, &vec, names,
- data_component_interpretation);
+ internal::DataOut::DataEntryBase<DoFHandlerType> *new_entry
+ = new internal::DataOut::DataEntry<DoFHandlerType,VectorType>(dofs, &vec, names,
+ data_component_interpretation);
if (actual_type == type_dof_data)
- dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
+ dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> >(new_entry));
else
- cell_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
+ cell_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> >(new_entry));
}
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
template <typename VectorType>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
add_data_vector (const VectorType &vec,
- const DataPostprocessor<DH::space_dimension> &data_postprocessor)
+ const DataPostprocessor<DoFHandlerType::space_dimension> &data_postprocessor)
{
// this is a specialized version of the other function where we have a
// postprocessor. if we do, we know that we have type_dof_data, which makes
dofs->n_dofs(),
dofs->get_tria().n_active_cells()));
- internal::DataOut::DataEntryBase<DH> *new_entry
- = new internal::DataOut::DataEntry<DH,VectorType>(dofs, &vec, &data_postprocessor);
- dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
+ internal::DataOut::DataEntryBase<DoFHandlerType> *new_entry
+ = new internal::DataOut::DataEntry<DoFHandlerType,VectorType>(dofs, &vec, &data_postprocessor);
+ dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> >(new_entry));
}
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
template <typename VectorType>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-add_data_vector (const DH &dof_handler,
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
+add_data_vector (const DoFHandlerType &dof_handler,
const VectorType &vec,
- const DataPostprocessor<DH::space_dimension> &data_postprocessor)
+ const DataPostprocessor<DoFHandlerType::space_dimension> &data_postprocessor)
{
// this is a specialized version of the other function where we have a
// postprocessor. if we do, we know that we have type_dof_data, which makes
AssertDimension (vec.size(), dof_handler.n_dofs());
- internal::DataOut::DataEntryBase<DH> *new_entry
- = new internal::DataOut::DataEntry<DH,VectorType>(&dof_handler, &vec, &data_postprocessor);
- dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
+ internal::DataOut::DataEntryBase<DoFHandlerType> *new_entry
+ = new internal::DataOut::DataEntry<DoFHandlerType,VectorType>(&dof_handler, &vec, &data_postprocessor);
+ dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> >(new_entry));
}
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
template <typename VectorType>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-add_data_vector (const DH &dof_handler,
- const VectorType &data,
- const std::string &name,
- const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation)
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
+add_data_vector
+(const DoFHandlerType &dof_handler,
+ const VectorType &data,
+ const std::string &name,
+ const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation)
{
const unsigned int n_components = dof_handler.get_fe().n_components ();
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
template <typename VectorType>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-add_data_vector (const DH &dof_handler,
- const VectorType &data,
- const std::vector<std::string> &names,
- const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation_)
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
+add_data_vector
+(const DoFHandlerType &dof_handler,
+ const VectorType &data,
+ const std::vector<std::string> &names,
+ const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation_)
{
// this is an extended version of the other functions where we pass a vector
// together with its DoFHandler. if we do, we know that we have
// type_dof_data, which makes things a bit simpler
if (triangulation == 0)
- triangulation = SmartPointer<const Triangulation<DH::dimension,DH::space_dimension> >(&dof_handler.get_tria(), typeid(*this).name());
+ triangulation = SmartPointer<const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> >(&dof_handler.get_tria(), typeid(*this).name());
Assert (&dof_handler.get_tria() == triangulation,
ExcMessage("The triangulation attached to the DoFHandler does not "
std::vector<DataComponentInterpretation::DataComponentInterpretation>
(names.size(), DataComponentInterpretation::component_is_scalar));
- internal::DataOut::DataEntryBase<DH> *new_entry
- = new internal::DataOut::DataEntry<DH,VectorType>(&dof_handler, &data, names,
- data_component_interpretation);
- dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
+ internal::DataOut::DataEntryBase<DoFHandlerType> *new_entry
+ = new internal::DataOut::DataEntry<DoFHandlerType,VectorType>(&dof_handler, &data, names,
+ data_component_interpretation);
+ dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> >(new_entry));
}
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
-void DataOut_DoFData<DH,patch_dim,patch_space_dim>::clear_data_vectors ()
+void DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::clear_data_vectors ()
{
dof_data.erase (dof_data.begin(), dof_data.end());
cell_data.erase (cell_data.begin(), cell_data.end());
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
clear_input_data_references ()
{
for (unsigned int i=0; i<dof_data.size(); ++i)
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
void
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::clear ()
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::clear ()
{
dof_data.erase (dof_data.begin(), dof_data.end());
cell_data.erase (cell_data.begin(), cell_data.end());
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
std::vector<std::string>
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::
get_dataset_names () const
{
std::vector<std::string> names;
// collect the names of dof
// and cell data
typedef
- typename std::vector<std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> > >::const_iterator
+ typename std::vector<std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> > >::const_iterator
data_iterator;
for (data_iterator d=dof_data.begin();
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> >
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::get_vector_data_ranges () const
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::get_vector_data_ranges () const
{
std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> >
ranges;
// collect the ranges of dof
// and cell data
typedef
- typename std::vector<std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> > >::const_iterator
+ typename std::vector<std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DoFHandlerType> > >::const_iterator
data_iterator;
unsigned int output_component = 0;
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
const std::vector< dealii::DataOutBase::Patch<patch_dim, patch_space_dim> > &
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::get_patches () const
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::get_patches () const
{
return patches;
}
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
-std::vector<std_cxx11::shared_ptr<dealii::hp::FECollection<DH::dimension,DH::space_dimension> > >
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::get_finite_elements() const
+std::vector<std_cxx11::shared_ptr<dealii::hp::FECollection<DoFHandlerType::dimension,
+ DoFHandlerType::space_dimension> > >
+ DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::get_finite_elements() const
{
- const unsigned int dhdim = DH::dimension;
- const unsigned int dhspacedim = DH::space_dimension;
+ const unsigned int dhdim = DoFHandlerType::dimension;
+ const unsigned int dhspacedim = DoFHandlerType::space_dimension;
std::vector<std_cxx11::shared_ptr<dealii::hp::FECollection<dhdim,dhspacedim> > >
finite_elements(this->dof_data.size());
for (unsigned int i=0; i<this->dof_data.size(); ++i)
-template <class DH,
+template <typename DoFHandlerType,
int patch_dim, int patch_space_dim>
std::size_t
-DataOut_DoFData<DH,patch_dim,patch_space_dim>::memory_consumption () const
+DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::memory_consumption () const
{
return (DataOutInterface<patch_dim,patch_space_dim>::memory_consumption () +
MemoryConsumption::memory_consumption (dofs) +
-template <int dim, class DH>
-DataOutFaces<dim,DH>::DataOutFaces(const bool so)
+template <int dim, typename DoFHandlerType>
+DataOutFaces<dim,DoFHandlerType>::DataOutFaces(const bool so)
:
surface_only(so)
{
- Assert (dim == DH::dimension,
+ Assert (dim == DoFHandlerType::dimension,
ExcNotImplemented());
}
-template <int dim, class DH>
+template <int dim, typename DoFHandlerType>
void
-DataOutFaces<dim,DH>::
+DataOutFaces<dim,DoFHandlerType>::
build_one_patch (const FaceDescriptor *cell_and_face,
internal::DataOutFaces::ParallelData<dimension, dimension> &data,
DataOutBase::Patch<dimension-1,space_dimension> &patch)
-template <int dim, class DH>
-void DataOutFaces<dim,DH>::build_patches (const unsigned int n_subdivisions_)
+template <int dim, typename DoFHandlerType>
+void DataOutFaces<dim,DoFHandlerType>::build_patches (const unsigned int n_subdivisions_)
{
build_patches (StaticMappingQ1<dimension>::mapping, n_subdivisions_);
}
-template <int dim, class DH>
-void DataOutFaces<dim,DH>::build_patches (const Mapping<dimension> &mapping,
- const unsigned int n_subdivisions_)
+template <int dim, typename DoFHandlerType>
+void DataOutFaces<dim,DoFHandlerType>::build_patches (const Mapping<dimension> &mapping,
+ const unsigned int n_subdivisions_)
{
// Check consistency of redundant template parameter
Assert (dim==dimension, ExcDimensionMismatch(dim, dimension));
// now build the patches in parallel
WorkStream::run (&all_faces[0],
&all_faces[0]+all_faces.size(),
- std_cxx11::bind(&DataOutFaces<dim,DH>::build_one_patch,
+ std_cxx11::bind(&DataOutFaces<dim,DoFHandlerType>::build_one_patch,
this, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3),
std_cxx11::bind(&internal::DataOutFaces::
append_patch_to_list<dim,space_dimension>,
-template <int dim, class DH>
-typename DataOutFaces<dim,DH>::FaceDescriptor
-DataOutFaces<dim,DH>::first_face ()
+template <int dim, typename DoFHandlerType>
+typename DataOutFaces<dim,DoFHandlerType>::FaceDescriptor
+DataOutFaces<dim,DoFHandlerType>::first_face ()
{
// simply find first active cell
// with a face on the boundary
-template <int dim, class DH>
-typename DataOutFaces<dim,DH>::FaceDescriptor
-DataOutFaces<dim,DH>::next_face (const FaceDescriptor &old_face)
+template <int dim, typename DoFHandlerType>
+typename DataOutFaces<dim,DoFHandlerType>::FaceDescriptor
+DataOutFaces<dim,DoFHandlerType>::next_face (const FaceDescriptor &old_face)
{
FaceDescriptor face = old_face;
-template <int dim, class DH>
+template <int dim, typename DoFHandlerType>
void
-DataOutRotation<dim,DH>::
+DataOutRotation<dim,DoFHandlerType>::
build_one_patch (const cell_iterator *cell,
internal::DataOutRotation::ParallelData<dimension, space_dimension> &data,
std::vector<DataOutBase::Patch<dimension+1,space_dimension+1> > &patches)
-template <int dim, class DH>
-void DataOutRotation<dim,DH>::build_patches (const unsigned int n_patches_per_circle,
- const unsigned int nnnn_subdivisions)
+template <int dim, typename DoFHandlerType>
+void DataOutRotation<dim,DoFHandlerType>::build_patches (const unsigned int n_patches_per_circle,
+ const unsigned int nnnn_subdivisions)
{
// Check consistency of redundant
// template parameter
// now build the patches in parallel
WorkStream::run (&all_cells[0],
&all_cells[0]+all_cells.size(),
- std_cxx11::bind(&DataOutRotation<dim,DH>::build_one_patch,
+ std_cxx11::bind(&DataOutRotation<dim,DoFHandlerType>::build_one_patch,
this, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3),
std_cxx11::bind(&internal::DataOutRotation
::append_patch_to_list<dim,space_dimension>,
-template <int dim, class DH>
-typename DataOutRotation<dim,DH>::cell_iterator
-DataOutRotation<dim,DH>::first_cell ()
+template <int dim, typename DoFHandlerType>
+typename DataOutRotation<dim,DoFHandlerType>::cell_iterator
+DataOutRotation<dim,DoFHandlerType>::first_cell ()
{
return this->triangulation->begin_active ();
}
-template <int dim, class DH>
-typename DataOutRotation<dim,DH>::cell_iterator
-DataOutRotation<dim,DH>::next_cell (const cell_iterator &cell)
+template <int dim, typename DoFHandlerType>
+typename DataOutRotation<dim,DoFHandlerType>::cell_iterator
+DataOutRotation<dim,DoFHandlerType>::next_cell (const cell_iterator &cell)
{
// convert the iterator to an
// active_iterator and advance
DEAL_II_NAMESPACE_OPEN
-template <int dim, int spacedim, class DH>
+template <int dim, int spacedim, typename DoFHandlerType>
std::size_t
-DataOutStack<dim,spacedim,DH>::DataVector::memory_consumption () const
+DataOutStack<dim,spacedim,DoFHandlerType>::DataVector::memory_consumption () const
{
return (MemoryConsumption::memory_consumption (data) +
MemoryConsumption::memory_consumption (names));
-template <int dim, int spacedim, class DH>
-DataOutStack<dim,spacedim,DH>::~DataOutStack ()
+template <int dim, int spacedim, typename DoFHandlerType>
+DataOutStack<dim,spacedim,DoFHandlerType>::~DataOutStack ()
{}
-template <int dim, int spacedim, class DH>
-void DataOutStack<dim,spacedim,DH>::new_parameter_value (const double p,
- const double dp)
+template <int dim, int spacedim, typename DoFHandlerType>
+void DataOutStack<dim,spacedim,DoFHandlerType>::new_parameter_value (const double p,
+ const double dp)
{
parameter = p;
parameter_step = dp;
}
-template <int dim, int spacedim, class DH>
-void DataOutStack<dim,spacedim,DH>::attach_dof_handler (const DH &dof)
+template <int dim, int spacedim, typename DoFHandlerType>
+void DataOutStack<dim,spacedim,DoFHandlerType>::attach_dof_handler (const DoFHandlerType &dof)
{
// Check consistency of redundant
// template parameter
- Assert (dim==DH::dimension, ExcDimensionMismatch(dim, DH::dimension));
+ Assert (dim==DoFHandlerType::dimension, ExcDimensionMismatch(dim, DoFHandlerType::dimension));
dof_handler = &dof;
}
-template <int dim, int spacedim, class DH>
-void DataOutStack<dim,spacedim,DH>::declare_data_vector (const std::string &name,
- const VectorType vector_type)
+template <int dim, int spacedim, typename DoFHandlerType>
+void DataOutStack<dim,spacedim,DoFHandlerType>::declare_data_vector (const std::string &name,
+ const VectorType vector_type)
{
std::vector<std::string> names;
names.push_back (name);
}
-template <int dim, int spacedim, class DH>
-void DataOutStack<dim,spacedim,DH>::declare_data_vector (const std::vector<std::string> &names,
- const VectorType vector_type)
+template <int dim, int spacedim, typename DoFHandlerType>
+void DataOutStack<dim,spacedim,DoFHandlerType>::declare_data_vector (const std::vector<std::string> &names,
+ const VectorType vector_type)
{
// make sure this function is
// not called after some parameter
}
-template <int dim, int spacedim, class DH>
+template <int dim, int spacedim, typename DoFHandlerType>
template <typename number>
-void DataOutStack<dim,spacedim,DH>::add_data_vector (const Vector<number> &vec,
- const std::string &name)
+void DataOutStack<dim,spacedim,DoFHandlerType>::add_data_vector (const Vector<number> &vec,
+ const std::string &name)
{
const unsigned int n_components = dof_handler->get_fe().n_components ();
}
-template <int dim, int spacedim, class DH>
+template <int dim, int spacedim, typename DoFHandlerType>
template <typename number>
-void DataOutStack<dim,spacedim,DH>::add_data_vector (const Vector<number> &vec,
- const std::vector<std::string> &names)
+void DataOutStack<dim,spacedim,DoFHandlerType>::add_data_vector (const Vector<number> &vec,
+ const std::vector<std::string> &names)
{
Assert (dof_handler != 0,
Exceptions::DataOut::ExcNoDoFHandlerSelected ());
}
-template <int dim, int spacedim, class DH>
-void DataOutStack<dim,spacedim,DH>::build_patches (const unsigned int nnnn_subdivisions)
+template <int dim, int spacedim, typename DoFHandlerType>
+void DataOutStack<dim,spacedim,DoFHandlerType>::build_patches (const unsigned int nnnn_subdivisions)
{
// this is mostly copied from the
// DataOut class
// create patches of and make sure
// there is enough memory for that
unsigned int n_patches = 0;
- for (typename DH::active_cell_iterator
+ for (typename DoFHandlerType::active_cell_iterator
cell=dof_handler->begin_active();
cell != dof_handler->end(); ++cell)
++n_patches;
typename std::vector< dealii::DataOutBase::Patch<dim+1,dim+1> >::iterator
patch = patches.begin() + (patches.size()-n_patches);
unsigned int cell_number = 0;
- for (typename DH::active_cell_iterator cell=dof_handler->begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell=dof_handler->begin_active();
cell != dof_handler->end(); ++cell, ++patch, ++cell_number)
{
Assert (cell->is_locally_owned(),
}
-template <int dim, int spacedim, class DH>
-void DataOutStack<dim,spacedim,DH>::finish_parameter_value ()
+template <int dim, int spacedim, typename DoFHandlerType>
+void DataOutStack<dim,spacedim,DoFHandlerType>::finish_parameter_value ()
{
// release lock on dof handler
dof_handler = 0;
-template <int dim, int spacedim, class DH>
+template <int dim, int spacedim, typename DoFHandlerType>
std::size_t
-DataOutStack<dim,spacedim,DH>::memory_consumption () const
+DataOutStack<dim,spacedim,DoFHandlerType>::memory_consumption () const
{
return (DataOutInterface<dim+1>::memory_consumption () +
MemoryConsumption::memory_consumption (parameter) +
-template <int dim, int spacedim, class DH>
+template <int dim, int spacedim, typename DoFHandlerType>
const std::vector< dealii::DataOutBase::Patch<dim+1,dim+1> > &
-DataOutStack<dim,spacedim,DH>::get_patches () const
+DataOutStack<dim,spacedim,DoFHandlerType>::get_patches () const
{
return patches;
}
-template <int dim, int spacedim, class DH>
-std::vector<std::string> DataOutStack<dim,spacedim,DH>::get_dataset_names () const
+template <int dim, int spacedim, typename DoFHandlerType>
+std::vector<std::string> DataOutStack<dim,spacedim,DoFHandlerType>::get_dataset_names () const
{
std::vector<std::string> names;
for (typename std::vector<DataVector>::const_iterator dataset=dof_data.begin();
* Compute the derivative approximation on one cell. This computes the full
* derivative tensor.
*/
- template <class DerivativeDescription, int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <class DerivativeDescription, int dim, template <int, int> class DoFHandlerType,
+ class InputVector, int spacedim>
void
- approximate_cell (const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof_handler,
- const InputVector &solution,
- const unsigned int component,
- const TriaActiveIterator < dealii::DoFCellAccessor < DH < dim, spacedim >, false > > &cell,
+ approximate_cell (const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof_handler,
+ const InputVector &solution,
+ const unsigned int component,
+ const TriaActiveIterator<dealii::DoFCellAccessor<DoFHandlerType<dim, spacedim>,
+ false> > &cell,
typename DerivativeDescription::Derivative &derivative)
{
QMidpoint<dim> midpoint_rule;
// active neighbors of a cell
// reserve the maximal number of
// active neighbors
- std::vector<TriaActiveIterator < dealii::DoFCellAccessor < DH < dim, spacedim >, false > > > active_neighbors;
+ std::vector<TriaActiveIterator<dealii::DoFCellAccessor<DoFHandlerType<dim, spacedim>,
+ false> > > active_neighbors;
active_neighbors.reserve (GeometryInfo<dim>::faces_per_cell *
GeometryInfo<dim>::max_children_per_face);
// first collect all neighbor
// cells in a vector, and then
// collect the data from them
- GridTools::get_active_neighbors<DH<dim,spacedim> >(cell, active_neighbors);
+ GridTools::get_active_neighbors<DoFHandlerType<dim,spacedim> >(cell, active_neighbors);
// now loop over all active
// neighbors and collect the
// data we need
- typename std::vector<TriaActiveIterator < dealii::DoFCellAccessor < DH < dim, spacedim >, false > > >::const_iterator
- neighbor_ptr = active_neighbors.begin();
+ typename std::vector<TriaActiveIterator<dealii::DoFCellAccessor<DoFHandlerType<dim, spacedim>,
+ false> > >::const_iterator
+ neighbor_ptr = active_neighbors.begin();
for (; neighbor_ptr!=active_neighbors.end(); ++neighbor_ptr)
{
- const TriaActiveIterator < dealii::DoFCellAccessor < DH < dim, spacedim >, false > >
+ const TriaActiveIterator < dealii::DoFCellAccessor < DoFHandlerType < dim, spacedim >, false > >
neighbor = *neighbor_ptr;
// reinit fe values object...
* on the cell.
*/
template <class DerivativeDescription, int dim,
- template <int, int> class DH, class InputVector, int spacedim>
+ template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate(
- SynchronousIterators<std_cxx11::tuple<TriaActiveIterator < dealii::DoFCellAccessor < DH < dim, spacedim >, false > >, Vector<float>::iterator> > const &cell,
- const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof_handler,
- const InputVector &solution,
- const unsigned int component)
+ approximate
+ (SynchronousIterators<std_cxx11::tuple<TriaActiveIterator < dealii::DoFCellAccessor < DoFHandlerType < dim, spacedim >, false > >, Vector<float>::iterator> > const &cell,
+ const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof_handler,
+ const InputVector &solution,
+ const unsigned int component)
{
// if the cell is not locally owned, then there is nothing to do
if (std_cxx11::get<0>(cell.iterators)->is_locally_owned() == false)
typename DerivativeDescription::Derivative derivative;
// call the function doing the actual
// work on this cell
- approximate_cell<DerivativeDescription,dim,DH,InputVector, spacedim>
+ approximate_cell<DerivativeDescription,dim,DoFHandlerType,InputVector, spacedim>
(mapping,dof_handler,solution,component,std_cxx11::get<0>(cell.iterators),derivative);
// evaluate the norm and fill the vector
* we are to work on.
*/
template <class DerivativeDescription, int dim,
- template <int, int> class DH, class InputVector, int spacedim>
+ template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_derivative (const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof_handler,
- const InputVector &solution,
- const unsigned int component,
- Vector<float> &derivative_norm)
+ approximate_derivative (const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof_handler,
+ const InputVector &solution,
+ const unsigned int component,
+ Vector<float> &derivative_norm)
{
Assert (derivative_norm.size() == dof_handler.get_tria().n_active_cells(),
ExcVectorLengthVsNActiveCells (derivative_norm.size(),
Assert (component < dof_handler.get_fe().n_components(),
ExcIndexRange (component, 0, dof_handler.get_fe().n_components()));
- typedef std_cxx11::tuple<TriaActiveIterator < dealii::DoFCellAccessor < DH < dim, spacedim >, false > >, Vector<float>::iterator>
- Iterators;
+ typedef std_cxx11::tuple<TriaActiveIterator<dealii::DoFCellAccessor
+ <DoFHandlerType<dim, spacedim>, false> >,
+ Vector<float>::iterator> Iterators;
SynchronousIterators<Iterators> begin(Iterators(dof_handler.begin_active(),
derivative_norm.begin())),
end(Iterators(dof_handler.end(),
end,
static_cast<std_cxx11::function<void (SynchronousIterators<Iterators> const &,
Assembler::Scratch const &, Assembler::CopyData &)> >
- (std_cxx11::bind(&approximate<DerivativeDescription,dim,DH,InputVector,spacedim>,
+ (std_cxx11::bind(&approximate<DerivativeDescription,dim,DoFHandlerType,
+ InputVector,spacedim>,
std_cxx11::_1,
std_cxx11::cref(mapping),
std_cxx11::cref(dof_handler),
namespace DerivativeApproximation
{
- template <int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_gradient (const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof_handler,
- const InputVector &solution,
- Vector<float> &derivative_norm,
- const unsigned int component)
+ approximate_gradient (const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof_handler,
+ const InputVector &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component)
{
internal::approximate_derivative<internal::Gradient<dim>,dim> (mapping,
dof_handler,
}
- template <int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_gradient (const DH<dim,spacedim> &dof_handler,
- const InputVector &solution,
- Vector<float> &derivative_norm,
- const unsigned int component)
+ approximate_gradient (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const InputVector &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component)
{
internal::approximate_derivative<internal::Gradient<dim>,dim> (StaticMappingQ1<dim>::mapping,
dof_handler,
}
- template <int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_second_derivative (const Mapping<dim,spacedim> &mapping,
- const DH<dim,spacedim> &dof_handler,
- const InputVector &solution,
- Vector<float> &derivative_norm,
- const unsigned int component)
+ approximate_second_derivative (const Mapping<dim,spacedim> &mapping,
+ const DoFHandlerType<dim,spacedim> &dof_handler,
+ const InputVector &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component)
{
internal::approximate_derivative<internal::SecondDerivative<dim>,dim> (mapping,
dof_handler,
}
- template <int dim, template <int, int> class DH, class InputVector, int spacedim>
+ template <int dim, template <int, int> class DoFHandlerType, class InputVector, int spacedim>
void
- approximate_second_derivative (const DH<dim,spacedim> &dof_handler,
- const InputVector &solution,
- Vector<float> &derivative_norm,
- const unsigned int component)
+ approximate_second_derivative (const DoFHandlerType<dim,spacedim> &dof_handler,
+ const InputVector &solution,
+ Vector<float> &derivative_norm,
+ const unsigned int component)
{
internal::approximate_derivative<internal::SecondDerivative<dim>,dim> (StaticMappingQ1<dim>::mapping,
dof_handler,
}
- template <class DH, int dim, int spacedim, class InputVector, int order>
+ template <typename DoFHandlerType, int dim, int spacedim, class InputVector, int order>
void
- approximate_derivative_tensor(const Mapping<dim, spacedim> &mapping,
- const DH &dof,
- const InputVector &solution,
+ approximate_derivative_tensor
+ (const Mapping<dim, spacedim> &mapping,
+ const DoFHandlerType &dof,
+ const InputVector &solution,
#ifndef _MSC_VER
- const typename DH::active_cell_iterator &cell,
+ const typename DoFHandlerType::active_cell_iterator &cell,
#else
- const TriaActiveIterator < dealii::DoFCellAccessor < DH, false > > &cell,
+ const TriaActiveIterator < dealii::DoFCellAccessor < DoFHandlerType, false > > &cell,
#endif
- Tensor<order, dim> &derivative,
- const unsigned int component)
+ Tensor<order, dim> &derivative,
+ const unsigned int component)
{
- internal::approximate_cell<typename internal::DerivativeSelector<order,DH::dimension>::DerivDescr>
+ internal::approximate_cell<typename internal::DerivativeSelector<order,DoFHandlerType::dimension>::DerivDescr>
(mapping,
dof,
solution,
- template <class DH, int dim, int spacedim, class InputVector, int order>
+ template <typename DoFHandlerType, int dim, int spacedim, class InputVector, int order>
void
- approximate_derivative_tensor(const DH &dof,
- const InputVector &solution,
+ approximate_derivative_tensor
+ (const DoFHandlerType &dof,
+ const InputVector &solution,
#ifndef _MSC_VER
- const typename DH::active_cell_iterator &cell,
+ const typename DoFHandlerType::active_cell_iterator &cell,
#else
- const TriaActiveIterator < dealii::DoFCellAccessor < DH, false > > &cell,
+ const TriaActiveIterator < dealii::DoFCellAccessor < DoFHandlerType, false > > &cell,
#endif
- Tensor<order, dim> &derivative,
- const unsigned int component)
+ Tensor<order, dim> &derivative,
+ const unsigned int component)
{
// just call the respective function with Q1 mapping
- approximate_derivative_tensor<DH, dim, spacedim, InputVector, order>
+ approximate_derivative_tensor<DoFHandlerType, dim, spacedim, InputVector, order>
(StaticMappingQ1<dim, spacedim>::mapping,
dof,
solution,
template <int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<1,spacedim>::
-estimate (const Mapping<1,spacedim> &mapping,
- const DH &dof_handler,
- const Quadrature<0> &quadrature,
+estimate (const Mapping<1,spacedim> &mapping,
+ const DoFHandlerType &dof_handler,
+ const Quadrature<0> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id)
{
// just pass on to the other function
const std::vector<const InputVector *> solutions (1, &solution);
template <int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<1,spacedim>::
-estimate (const DH &dof_handler,
- const Quadrature<0> &quadrature,
+estimate (const DoFHandlerType &dof_handler,
+ const Quadrature<0> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id)
{
estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solution,
error, component_mask, coefficients, n_threads, subdomain_id, material_id);
template <int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<1,spacedim>::
-estimate (const DH &dof_handler,
- const Quadrature<0> &quadrature,
+estimate (const DoFHandlerType &dof_handler,
+ const Quadrature<0> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id)
{
estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solutions,
errors, component_mask, coefficients, n_threads, subdomain_id, material_id);
template <int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<1,spacedim>::
-estimate (const Mapping<1,spacedim> &mapping,
- const DH &dof_handler,
- const hp::QCollection<0> &quadrature,
+estimate (const Mapping<1,spacedim> &mapping,
+ const DoFHandlerType &dof_handler,
+ const hp::QCollection<0> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id)
{
// just pass on to the other function
const std::vector<const InputVector *> solutions (1, &solution);
template <int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<1,spacedim>::
-estimate (const DH &dof_handler,
- const hp::QCollection<0> &quadrature,
+estimate (const DoFHandlerType &dof_handler,
+ const hp::QCollection<0> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const InputVector &solution,
- Vector<float> &error,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const InputVector &solution,
+ Vector<float> &error,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id)
{
estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solution,
error, component_mask, coefficients, n_threads, subdomain_id, material_id);
template <int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void
KellyErrorEstimator<1,spacedim>::
-estimate (const DH &dof_handler,
- const hp::QCollection<0> &quadrature,
+estimate (const DoFHandlerType &dof_handler,
+ const hp::QCollection<0> &quadrature,
const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask,
- const Function<spacedim> *coefficients,
- const unsigned int n_threads,
- const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask,
+ const Function<spacedim> *coefficients,
+ const unsigned int n_threads,
+ const types::subdomain_id subdomain_id,
+ const types::material_id material_id)
{
estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solutions,
errors, component_mask, coefficients, n_threads, subdomain_id, material_id);
template <int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void KellyErrorEstimator<1,spacedim>::
-estimate (const Mapping<1,spacedim> &/*mapping*/,
- const DH &/*dof_handler*/,
+estimate (const Mapping<1,spacedim> &/*mapping*/,
+ const DoFHandlerType &/*dof_handler*/,
const hp::QCollection<0> &,
- const typename FunctionMap<spacedim>::type &/*neumann_bc*/,
- const std::vector<const InputVector *> &/*solutions*/,
- std::vector<Vector<float>*> &/*errors*/,
- const ComponentMask &/*component_mask_*/,
- const Function<spacedim> * /*coefficient*/,
+ const typename FunctionMap<spacedim>::type &/*neumann_bc*/,
+ const std::vector<const InputVector *> &/*solutions*/,
+ std::vector<Vector<float>*> &/*errors*/,
+ const ComponentMask &/*component_mask_*/,
+ const Function<spacedim> */*coefficient*/,
const unsigned int,
- const types::subdomain_id /*subdomain_id*/,
+ const types::subdomain_id /*subdomain_id*/,
const types::material_id /*material_id*/)
{
Assert (false, ExcInternalError());
template <int spacedim>
-template <typename InputVector, class DH>
+template <typename InputVector, typename DoFHandlerType>
void KellyErrorEstimator<1,spacedim>::
-estimate (const Mapping<1,spacedim> &mapping,
- const DH &dof_handler,
+estimate (const Mapping<1,spacedim> &mapping,
+ const DoFHandlerType &dof_handler,
const Quadrature<0> &,
- const typename FunctionMap<spacedim>::type &neumann_bc,
- const std::vector<const InputVector *> &solutions,
- std::vector<Vector<float>*> &errors,
- const ComponentMask &component_mask,
+ const typename FunctionMap<spacedim>::type &neumann_bc,
+ const std::vector<const InputVector *> &solutions,
+ std::vector<Vector<float>*> &errors,
+ const ComponentMask &component_mask,
const Function<spacedim> *coefficient,
const unsigned int,
- const types::subdomain_id subdomain_id_,
- const types::material_id material_id)
+ const types::subdomain_id subdomain_id_,
+ const types::material_id material_id)
{
#ifdef DEAL_II_WITH_P4EST
if (dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>*>
// loop over all cells and do something on the cells which we're told to
// work on. note that the error indicator is only a sum over the two
// contributions from the two vertices of each cell.
- for (typename DH::active_cell_iterator cell = dof_handler.begin_active();
+ for (typename DoFHandlerType::active_cell_iterator cell = dof_handler.begin_active();
cell != dof_handler.end();
++cell)
if (((subdomain_id == numbers::invalid_subdomain_id)
for (unsigned int n=0; n<2; ++n)
{
// find left or right active neighbor
- typename DH::cell_iterator neighbor = cell->neighbor(n);
+ typename DoFHandlerType::cell_iterator neighbor = cell->neighbor(n);
if (neighbor.state() == IteratorState::valid)
while (neighbor->has_children())
neighbor = neighbor->child(n==0 ? 1 : 0);
* but is templatized on the
* dof handler that should be used.
*/
- template <typename DH>
+ template <typename DoFHandlerType>
struct IteratorRange
{
/**
* Typedef for the iterator type.
*/
- typedef typename DH::active_cell_iterator active_cell_iterator;
+ typedef typename DoFHandlerType::active_cell_iterator active_cell_iterator;
/**
* Abbreviation for a pair of
- template <typename DH>
+ template <typename DoFHandlerType>
inline
- IteratorRange<DH>::
+ IteratorRange<DoFHandlerType>::
IteratorRange (const active_cell_iterator &first,
const active_cell_iterator &second)
:
- template <typename DH>
+ template <typename DoFHandlerType>
inline
- IteratorRange<DH>::IteratorRange (const iterator_pair &ip)
+ IteratorRange<DoFHandlerType>::IteratorRange (const iterator_pair &ip)
:
first (ip.first),
second (ip.second)
Scratch() {}
};
- template <typename DH>
+ template <typename DoFHandlerType>
struct CopyData
{
CopyData() {};
unsigned int dofs_per_cell;
std::vector<types::global_dof_index> dofs;
std::vector<std::vector<bool> > dof_is_on_face;
- typename DH::active_cell_iterator cell;
+ typename DoFHandlerType::active_cell_iterator cell;
std::vector<FullMatrix<double> > cell_matrix;
std::vector<Vector<double> > cell_vector;
};
- template <typename DH>
- CopyData<DH>::CopyData(CopyData const &data) :
+ template <typename DoFHandlerType>
+ CopyData<DoFHandlerType>::CopyData(CopyData const &data) :
dofs_per_cell(data.dofs_per_cell),
dofs(data.dofs),
dof_is_on_face(data.dof_is_on_face),
-template<int dim, typename VectorType, class DH>
-SolutionTransfer<dim, VectorType, DH>::SolutionTransfer(const DH &dof)
+template<int dim, typename VectorType, typename DoFHandlerType>
+SolutionTransfer<dim, VectorType, DoFHandlerType>::SolutionTransfer(const DoFHandlerType &dof)
:
dof_handler(&dof, typeid(*this).name()),
n_dofs_old(0),
-template<int dim, typename VectorType, class DH>
-SolutionTransfer<dim, VectorType, DH>::~SolutionTransfer()
+template<int dim, typename VectorType, typename DoFHandlerType>
+SolutionTransfer<dim, VectorType, DoFHandlerType>::~SolutionTransfer()
{
clear ();
}
-template<int dim, typename VectorType, class DH>
-void SolutionTransfer<dim, VectorType, DH>::clear ()
+template<int dim, typename VectorType, typename DoFHandlerType>
+void SolutionTransfer<dim, VectorType, DoFHandlerType>::clear ()
{
indices_on_cell.clear();
dof_values_on_cell.clear();
-template<int dim, typename VectorType, class DH>
-void SolutionTransfer<dim, VectorType, DH>::prepare_for_pure_refinement()
+template<int dim, typename VectorType, typename DoFHandlerType>
+void SolutionTransfer<dim, VectorType, DoFHandlerType>::prepare_for_pure_refinement()
{
Assert(prepared_for!=pure_refinement, ExcAlreadyPrepForRef());
Assert(prepared_for!=coarsening_and_refinement,
std::vector<std::vector<types::global_dof_index> > (n_active_cells)
.swap(indices_on_cell);
- typename DH::active_cell_iterator cell = dof_handler->begin_active(),
- endc = dof_handler->end();
+ typename DoFHandlerType::active_cell_iterator cell = dof_handler->begin_active(),
+ endc = dof_handler->end();
for (unsigned int i=0; cell!=endc; ++cell, ++i)
{
-template<int dim, typename VectorType, class DH>
+template<int dim, typename VectorType, typename DoFHandlerType>
void
-SolutionTransfer<dim, VectorType, DH>::refine_interpolate (const VectorType &in,
- VectorType &out) const
+SolutionTransfer<dim, VectorType, DoFHandlerType>::refine_interpolate
+(const VectorType &in,
+ VectorType &out) const
{
Assert(prepared_for==pure_refinement, ExcNotPrepared());
Assert(in.size()==n_dofs_old, ExcDimensionMismatch(in.size(),n_dofs_old));
Vector<typename VectorType::value_type> local_values(0);
- typename DH::cell_iterator cell = dof_handler->begin(),
- endc = dof_handler->end();
+ typename DoFHandlerType::cell_iterator cell = dof_handler->begin(),
+ endc = dof_handler->end();
typename std::map<std::pair<unsigned int, unsigned int>, Pointerstruct>::const_iterator
pointerstruct,
* which no such interpolation is
* implemented.
*/
- template <typename DH>
- void extract_interpolation_matrices (const DH &,
+ template <typename DoFHandlerType>
+ void extract_interpolation_matrices (const DoFHandlerType &,
dealii::Table<2,FullMatrix<double> > &)
{}
-template<int dim, typename VectorType, class DH>
+template<int dim, typename VectorType, typename DoFHandlerType>
void
-SolutionTransfer<dim, VectorType, DH>::
+SolutionTransfer<dim, VectorType, DoFHandlerType>::
prepare_for_coarsening_and_refinement(const std::vector<VectorType> &all_in)
{
Assert (prepared_for!=pure_refinement, ExcAlreadyPrepForRef());
// and that'll stay or be refined
unsigned int n_cells_to_coarsen=0;
unsigned int n_cells_to_stay_or_refine=0;
- for (typename DH::active_cell_iterator act_cell = dof_handler->begin_active();
+ for (typename DoFHandlerType::active_cell_iterator act_cell = dof_handler->begin_active();
act_cell!=dof_handler->end(); ++act_cell)
{
if (act_cell->coarsen_flag_set())
ExcInternalError());
unsigned int n_coarsen_fathers=0;
- for (typename DH::cell_iterator cell=dof_handler->begin();
+ for (typename DoFHandlerType::cell_iterator cell=dof_handler->begin();
cell!=dof_handler->end(); ++cell)
if (!cell->active() && cell->child(0)->coarsen_flag_set())
++n_coarsen_fathers;
// the 'to_stay_or_refine' cells 'n_sr' and
// the 'coarsen_fathers' cells 'n_cf',
unsigned int n_sr=0, n_cf=0;
- for (typename DH::cell_iterator cell=dof_handler->begin();
+ for (typename DoFHandlerType::cell_iterator cell=dof_handler->begin();
cell!=dof_handler->end(); ++cell)
{
// CASE 1: active cell that remains as it is
-template<int dim, typename VectorType, class DH>
+template<int dim, typename VectorType, typename DoFHandlerType>
void
-SolutionTransfer<dim, VectorType, DH>::prepare_for_coarsening_and_refinement (const VectorType &in)
+SolutionTransfer<dim, VectorType, DoFHandlerType>::prepare_for_coarsening_and_refinement
+(const VectorType &in)
{
std::vector<VectorType> all_in=std::vector<VectorType>(1, in);
prepare_for_coarsening_and_refinement(all_in);
-template<int dim, typename VectorType, class DH>
-void SolutionTransfer<dim, VectorType, DH>::
+template<int dim, typename VectorType, typename DoFHandlerType>
+void SolutionTransfer<dim, VectorType, DoFHandlerType>::
interpolate (const std::vector<VectorType> &all_in,
std::vector<VectorType> &all_out) const
{
internal::extract_interpolation_matrices (*dof_handler, interpolation_hp);
Vector<typename VectorType::value_type> tmp, tmp2;
- typename DH::cell_iterator cell = dof_handler->begin(),
- endc = dof_handler->end();
+ typename DoFHandlerType::cell_iterator cell = dof_handler->begin(),
+ endc = dof_handler->end();
for (; cell!=endc; ++cell)
{
pointerstruct=cell_map.find(std::make_pair(cell->level(),cell->index()));
-template<int dim, typename VectorType, class DH>
-void SolutionTransfer<dim, VectorType, DH>::interpolate (const VectorType &in,
- VectorType &out) const
+template<int dim, typename VectorType, typename DoFHandlerType>
+void SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate
+(const VectorType &in,
+ VectorType &out) const
{
Assert (in.size()==n_dofs_old,
ExcDimensionMismatch(in.size(), n_dofs_old));
-template<int dim, typename VectorType, class DH>
+template<int dim, typename VectorType, typename DoFHandlerType>
std::size_t
-SolutionTransfer<dim, VectorType, DH>::memory_consumption () const
+SolutionTransfer<dim, VectorType, DoFHandlerType>::memory_consumption () const
{
// at the moment we do not include the memory
// consumption of the cell_map as we have no
-template<int dim, typename VectorType, class DH>
+template<int dim, typename VectorType, typename DoFHandlerType>
std::size_t
-SolutionTransfer<dim, VectorType, DH>::Pointerstruct::memory_consumption () const
+SolutionTransfer<dim, VectorType, DoFHandlerType>::Pointerstruct::memory_consumption () const
{
return sizeof(*this);
}
const double eps = 1e-10;
-template <class DH>
+template <typename DoFHandlerType>
std::vector<dealii::IndexSet>
-locally_owned_dofs_per_subdomain (const DH &dof_handler)
+locally_owned_dofs_per_subdomain (const DoFHandlerType &dof_handler)
{
std::vector< dealii::types::subdomain_id > subdomain_association (dof_handler.n_dofs ());
dealii::DoFTools::get_subdomain_association (dof_handler, subdomain_association);
const double eps = 1e-10;
-template <class DH>
+template <typename DoFHandlerType>
std::vector<IndexSet>
-locally_owned_dofs_per_subdomain (const DH &dof_handler)
+locally_owned_dofs_per_subdomain (const DoFHandlerType &dof_handler)
{
std::vector< types::subdomain_id > subdomain_association (dof_handler.n_dofs ());
DoFTools::get_subdomain_association (dof_handler, subdomain_association);
/*
466: --------------------------------------------------------
466: An error occurred in line <306> of file </ssd/branch_port_the_testsuite/deal.II/source/numerics/data_out.cc> in function
-466: void dealii::DataOut<dim, DH>::build_one_patch(const std::pair<typename dealii::DataOut_DoFData<DH, DH:: dimension, DH:: space_dimension>::cell_iterator, unsigned int>*, dealii::internal::DataOut::ParallelData<DH:: dimension, DH:: space_dimension>&, dealii::DataOutBase::Patch<DH:: dimension, DH:: space_dimension>&, dealii::DataOut<dim, DH>::CurvedCellRegion, std::vector<dealii::DataOutBase::Patch<DH:: dimension, DH:: space_dimension> >&) [with int dim = 2, DH = dealii::DoFHandler<2>, typename dealii::DataOut_DoFData<DH, DH:: dimension, DH:: space_dimension>::cell_iterator = dealii::TriaIterator<dealii::CellAccessor<2, 2> >]
+466: void dealii::DataOut<dim, DoFHandlerType>::build_one_patch(const std::pair<typename dealii::DataOut_DoFData<DoFHandlerType, DoFHandlerType:: dimension, DoFHandlerType:: space_dimension>::cell_iterator, unsigned int>*, dealii::internal::DataOut::ParallelData<DoFHandlerType:: dimension, DoFHandlerType:: space_dimension>&, dealii::DataOutBase::Patch<DoFHandlerType:: dimension, DoFHandlerType:: space_dimension>&, dealii::DataOut<dim, DoFHandlerType>::CurvedCellRegion, std::vector<dealii::DataOutBase::Patch<DoFHandlerType:: dimension, DoFHandlerType:: space_dimension> >&) [with int dim = 2, DoFHandlerType = dealii::DoFHandler<2>, typename dealii::DataOut_DoFData<DoFHandlerType, DoFHandlerType:: dimension, DoFHandlerType:: space_dimension>::cell_iterator = dealii::TriaIterator<dealii::CellAccessor<2, 2> >]
466: The violated condition was:
466: cell_and_index->second < patches.size()
466: The name and call sequence of the exception was:
}
-template <class DH>
-void test_in_dim(const DH &d1, const DH &d2)
+template <typename DoFHandlerType>
+void test_in_dim(const DoFHandlerType &d1, const DoFHandlerType &d2)
{
- typename DH::active_cell_iterator a = d1.begin_active();
- typename DH::cell_iterator l = d1.begin(d1.get_tria().n_levels()-1);
+ typename DoFHandlerType::active_cell_iterator a = d1.begin_active();
+ typename DoFHandlerType::cell_iterator l = d1.begin(d1.get_tria().n_levels()-1);
deallog << "a " << a << std::endl
<< "l " << l << std::endl;
}
-template <class DH>
-void test_in_dim(const DH &d1, const DH &d2)
+template <typename DoFHandlerType>
+void test_in_dim(const DoFHandlerType &d1, const DoFHandlerType &d2)
{
- typename DH::active_cell_iterator a = d1.begin_active();
- typename DH::cell_iterator l = d1.begin(d1.get_tria().n_levels()-1);
+ typename DoFHandlerType::active_cell_iterator a = d1.begin_active();
+ typename DoFHandlerType::cell_iterator l = d1.begin(d1.get_tria().n_levels()-1);
deallog << "a " << a << std::endl
<< "l " << l << std::endl;
/*
--------------------------------------------------------
An error occurred in line <3349> of file </ssd/deal-trunk/deal.II/include/deal.II/dofs/dof_accessor.templates.h> in function
- void dealii::DoFCellAccessor<DH, lda>::get_dof_values(const InputVector&, ForwardIterator, ForwardIterator) const [with InputVector = dealii::TrilinosWrappers::MPI::Vector, ForwardIterator = double*, DH = dealii::DoFHandler<2>, bool level_dof_access = false]
+ void dealii::DoFCellAccessor<DoFHandlerType, lda>::get_dof_values(const InputVector&, ForwardIterator, ForwardIterator) const [with InputVector = dealii::TrilinosWrappers::MPI::Vector, ForwardIterator = double*, DoFHandlerType = dealii::DoFHandler<2>, bool level_dof_access = false]
The violated condition was:
this->is_artificial() == false
The name and call sequence of the exception was:
// we used to get this crash:
//
// An error occurred in line <4646> of file </w/heister/deal-trunk/deal.II/include/deal.II/numerics/vectors.templates.h> in function
-// static void dealii::VectorTools::compute_no_normal_flux_constraints(const DH<dim, spacedim>&, unsigned int, const std::set<types::boundary_id>&, dealii::ConstraintMatrix&, const dealii::Mapping<dim, spacedim>&) [with int dim = 3, DH = dealii::DoFHandler, int spacedim = 3]
+// static void dealii::VectorTools::compute_no_normal_flux_constraints(const DoFHandlerType<dim, spacedim>&, unsigned int, const std::set<types::boundary_id>&, dealii::ConstraintMatrix&, const dealii::Mapping<dim, spacedim>&) [with int dim = 3, DoFHandlerType = dealii::DoFHandler, int spacedim = 3]
// The violated condition was:
// std::fabs (tangent.norm()-1) < 1e-12
// The name and call sequence of the exception was:
/*
5: An error occurred in line <4586> of file </scratch/deal-trunk/deal.II/include/deal.II/numerics/vector_tools.templates.h> in function
-5: void dealii::VectorTools::compute_no_normal_flux_constraints(const DH<dim, spacedim>&, unsigned int, const std::set<unsigned char>&, dealii::ConstraintMatrix&, const dealii::Mapping<dim, spacedim>&) [with int dim = 3; DH = dealii::DoFHandler; int spacedim = 3]
+5: void dealii::VectorTools::compute_no_normal_flux_constraints(const DoFHandlerType<dim, spacedim>&, unsigned int, const std::set<unsigned char>&, dealii::ConstraintMatrix&, const dealii::Mapping<dim, spacedim>&) [with int dim = 3; DoFHandlerType = dealii::DoFHandler; int spacedim = 3]
5: The violated condition was:
5: contribution->second.size() == dim-1
5: The name and call sequence of the exception was: