16 #ifndef dealii_dof_accessor_h 17 #define dealii_dof_accessor_h 29 #include <boost/container/small_vector.hpp> 37 template <
typename number>
39 template <
typename number>
41 template <
typename number>
44 template <
typename Accessor>
52 namespace DoFCellAccessorImplementation
54 struct Implementation;
57 namespace DoFHandlerImplementation
59 struct Implementation;
62 struct Implementation;
68 namespace DoFHandlerImplementation
70 struct Implementation;
84 namespace DoFAccessorImplementation
102 template <
int structdim,
int dim,
int spacedim>
118 template <
int dim,
int spacedim>
128 struct Implementation;
208 template <
int structdim,
int dim,
int spacedim,
bool level_dof_access>
209 class DoFAccessor :
public ::internal::DoFAccessorImplementation::
217 static const unsigned int dimension = dim;
223 static const unsigned int space_dimension = spacedim;
229 using BaseClass = typename ::internal::DoFAccessorImplementation::
230 Inheritance<structdim, dimension, space_dimension>::BaseClass;
281 template <
int structdim2,
int dim2,
int spacedim2>
288 template <
int structdim2,
int dim2,
int spacedim2,
bool level_dof_access2>
295 template <
bool level_dof_access2>
319 get_dof_handler()
const;
324 template <
bool level_dof_access2>
353 child(
const unsigned int c)
const;
360 typename ::internal::DoFHandlerImplementation::
361 Iterators<dim, spacedim, level_dof_access>::line_iterator
362 line(
const unsigned int i)
const;
369 typename ::internal::DoFHandlerImplementation::
370 Iterators<dim, spacedim, level_dof_access>::quad_iterator
371 quad(
const unsigned int i)
const;
419 get_dof_indices(std::vector<types::global_dof_index> &dof_indices,
420 const unsigned int fe_index =
430 get_mg_dof_indices(
const int level,
431 std::vector<types::global_dof_index> &dof_indices,
432 const unsigned int fe_index =
441 const std::vector<types::global_dof_index> &dof_indices,
462 vertex_dof_index(
const unsigned int vertex,
463 const unsigned int i,
464 const unsigned int fe_index =
473 mg_vertex_dof_index(
const int level,
474 const unsigned int vertex,
475 const unsigned int i,
476 const unsigned int fe_index =
507 dof_index(
const unsigned int i,
508 const unsigned int fe_index =
515 mg_dof_index(
const int level,
const unsigned int i)
const;
539 n_active_fe_indices()
const;
549 nth_active_fe_index(
const unsigned int n)
const;
557 std::set<unsigned int>
570 fe_index_is_active(
const unsigned int fe_index)
const;
578 get_fe(
const unsigned int fe_index)
const;
590 "This accessor object has not been " 591 "associated with any DoFHandler object.");
645 template <
int structdim2,
int dim2,
int spacedim2,
bool level_dof_access2>
653 template <
int structdim2,
int dim2,
int spacedim2,
bool level_dof_access2>
684 set_dof_index(
const unsigned int i,
686 const unsigned int fe_index =
690 set_mg_dof_index(
const int level,
691 const unsigned int i,
713 set_vertex_dof_index(
const unsigned int vertex,
714 const unsigned int i,
716 const unsigned int fe_index =
720 set_mg_vertex_dof_index(
const int level,
721 const unsigned int vertex,
722 const unsigned int i,
724 const unsigned int fe_index =
731 template <
int,
int,
int,
bool>
740 friend struct ::internal::DoFHandlerImplementation::Policy::
742 friend struct ::internal::DoFHandlerImplementation::Implementation;
743 friend struct ::internal::hp::DoFHandlerImplementation::Implementation;
744 friend struct ::internal::DoFCellAccessorImplementation::Implementation;
745 friend struct ::internal::DoFAccessorImplementation::Implementation;
757 template <
int spacedim,
bool level_dof_access>
766 static const unsigned int dimension = 1;
772 static const unsigned int space_dimension = spacedim;
816 const unsigned int vertex_index,
841 template <
int structdim2,
int dim2,
int spacedim2>
848 template <
int structdim2,
int dim2,
int spacedim2,
bool level_dof_access2>
872 get_dof_handler()
const;
877 template <
bool level_dof_access2>
901 child(
const unsigned int c)
const;
909 typename ::internal::DoFHandlerImplementation::
910 Iterators<1, spacedim, level_dof_access>::line_iterator
911 line(
const unsigned int i)
const;
919 typename ::internal::DoFHandlerImplementation::
920 Iterators<1, spacedim, level_dof_access>::quad_iterator
921 quad(
const unsigned int i)
const;
968 std::vector<types::global_dof_index> &dof_indices,
969 const unsigned int fe_index = AccessorData::invalid_fe_index)
const;
980 std::vector<types::global_dof_index> &dof_indices,
981 const unsigned int fe_index = AccessorData::invalid_fe_index)
const;
1003 const unsigned int vertex,
1004 const unsigned int i,
1005 const unsigned int fe_index = AccessorData::invalid_fe_index)
const;
1025 dof_index(
const unsigned int i,
1026 const unsigned int fe_index = AccessorData::invalid_fe_index)
const;
1047 n_active_fe_indices()
const;
1057 nth_active_fe_index(
const unsigned int n)
const;
1068 fe_index_is_active(
const unsigned int fe_index)
const;
1076 get_fe(
const unsigned int fe_index)
const;
1088 "This accessor object has not been " 1089 "associated with any DoFHandler object.");
1132 template <
int structdim2,
int dim2,
int spacedim2,
bool level_dof_access2>
1140 template <
int structdim2,
int dim2,
int spacedim2,
bool level_dof_access2>
1170 const unsigned int i,
1172 const unsigned int fe_index = AccessorData::invalid_fe_index)
const;
1193 set_vertex_dof_index(
1194 const unsigned int vertex,
1195 const unsigned int i,
1197 const unsigned int fe_index = AccessorData::invalid_fe_index)
const;
1210 friend struct ::internal::DoFHandlerImplementation::Policy::
1212 friend struct ::internal::DoFHandlerImplementation::Implementation;
1213 friend struct ::internal::hp::DoFHandlerImplementation::Implementation;
1214 friend struct ::internal::DoFCellAccessorImplementation::Implementation;
1242 template <
int structdim,
int dim,
int spacedim = dim>
1260 const int level = -1,
1261 const int index = -1,
1277 template <
typename OtherAccessor>
1286 dof_index(
const unsigned int i,
1287 const unsigned int fe_index =
1296 set_dof_index(
const unsigned int i,
1298 const unsigned int fe_index =
1318 template <
int dimension_,
int space_dimension_,
bool level_dof_access>
1328 static const unsigned int dim = dimension_;
1333 static const unsigned int spacedim = space_dimension_;
1389 template <
int structdim2,
int dim2,
int spacedim2>
1396 template <
int structdim2,
int dim2,
int spacedim2,
bool level_dof_access2>
1443 neighbor(
const unsigned int i)
const;
1451 periodic_neighbor(
const unsigned int i)
const;
1459 neighbor_or_periodic_neighbor(
const unsigned int i)
const;
1467 child(
const unsigned int i)
const;
1472 boost::container::small_vector<
1476 child_iterators()
const;
1485 face(
const unsigned int i)
const;
1492 face_iterators()
const;
1501 neighbor_child_on_subface(
const unsigned int face_no,
1502 const unsigned int subface_no)
const;
1511 periodic_neighbor_child_on_subface(
const unsigned int face_no,
1512 const unsigned int subface_no)
const;
1542 template <
class InputVector,
typename number>
1563 template <
class InputVector,
typename ForwardIterator>
1565 get_dof_values(
const InputVector &
values,
1566 ForwardIterator local_values_begin,
1567 ForwardIterator local_values_end)
const;
1589 template <
class InputVector,
typename ForwardIterator>
1593 const InputVector &
values,
1594 ForwardIterator local_values_begin,
1595 ForwardIterator local_values_end)
const;
1621 template <
class OutputVector,
typename number>
1624 OutputVector &
values)
const;
1657 template <
class InputVector,
typename number>
1659 get_interpolated_dof_values(
1660 const InputVector &
values,
1662 const unsigned int fe_index =
1717 template <
class OutputVector,
typename number>
1719 set_dof_values_by_interpolation(
1722 const unsigned int fe_index =
1739 template <
typename number,
typename OutputVector>
1742 OutputVector & global_destination)
const;
1758 template <
typename ForwardIterator,
typename OutputVector>
1760 distribute_local_to_global(ForwardIterator local_source_begin,
1761 ForwardIterator local_source_end,
1762 OutputVector & global_destination)
const;
1777 template <
typename ForwardIterator,
typename OutputVector>
1779 distribute_local_to_global(
1781 ForwardIterator local_source_begin,
1782 ForwardIterator local_source_end,
1783 OutputVector & global_destination)
const;
1791 template <
typename number,
typename OutputMatrix>
1794 OutputMatrix &global_destination)
const;
1800 template <
typename number,
typename OutputMatrix,
typename OutputVector>
1804 OutputMatrix & global_matrix,
1805 OutputVector & global_vector)
const;
1832 get_active_or_mg_dof_indices(
1833 std::vector<types::global_dof_index> &dof_indices)
const;
1871 get_dof_indices(std::vector<types::global_dof_index> &dof_indices)
const;
1878 get_mg_dof_indices(std::vector<types::global_dof_index> &dof_indices)
const;
1933 active_fe_index()
const;
1962 set_active_fe_index(
const unsigned int i)
const;
1972 set_dof_indices(
const std::vector<types::global_dof_index> &dof_indices);
1978 set_mg_dof_indices(
const std::vector<types::global_dof_index> &dof_indices);
1984 update_cell_dof_indices_cache()
const;
2012 get_future_fe()
const;
2033 future_fe_index()
const;
2044 set_future_fe_index(
const unsigned int i)
const;
2053 future_fe_index_set()
const;
2064 clear_future_fe_index()
const;
2085 dominated_future_fe_on_children()
const;
2103 ExcNoDominatedFiniteElementOnChildren,
2104 "No FiniteElement has been found in your FECollection that is " 2105 "dominated by all children of a cell you are trying to coarsen!");
2116 friend struct ::internal::DoFCellAccessorImplementation::Implementation;
2120 template <
int structdim,
int dim,
int spacedim,
bool level_dof_access>
2124 return level_dof_access;
2129 template <
int structdim,
int dim,
int spacedim>
2130 template <
typename OtherAccessor>
2132 const OtherAccessor &)
2135 ExcMessage(
"You are attempting an illegal conversion between " 2136 "iterator/accessor types. The constructor you call " 2137 "only exists to make certain template constructs " 2138 "easier to write as dimension independent code but " 2139 "the conversion is not valid in the current context."));
2147 #include "dof_accessor.templates.h"
bool operator!=(const AlignedVector< T > &lhs, const AlignedVector< T > &rhs)
typename InvalidAccessor< structdim, dim, spacedim >::AccessorData AccessorData
typename ::internal::DoFAccessorImplementation::Inheritance< structdim, dimension, space_dimension >::BaseClass BaseClass
bool operator==(const AlignedVector< T > &lhs, const AlignedVector< T > &rhs)
typename TriaAccessorBase< structdim, dim, spacedim >::AccessorData AccessorData
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
#define DeclExceptionMsg(Exception, defaulttext)
#define DeclException0(Exception0)
#define DEAL_II_NAMESPACE_CLOSE
static bool is_level_cell()
DoFHandler< dim, spacedim > * dof_handler
DoFHandler< 1, spacedim > * dof_handler
DoFInvalidAccessor(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *local_data=0)
#define DEAL_II_NAMESPACE_OPEN
static ::ExceptionBase & ExcCantCompareIterators()