16 #ifndef dealii__dof_accessor_h 17 #define dealii__dof_accessor_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/grid/tria_accessor.h> 22 #include <deal.II/dofs/dof_handler.h> 23 #include <deal.II/hp/dof_handler.h> 27 DEAL_II_NAMESPACE_OPEN
30 template <
typename number>
class Vector;
42 struct Implementation;
47 struct Implementation;
50 struct Implementation;
58 struct Implementation;
90 template <
int structdim,
int dim,
int spacedim>
97 typedef ::TriaAccessor<structdim,dim,spacedim>
BaseClass;
106 template <
int dim,
int spacedim>
200 template <
int structdim,
typename DoFHandlerType,
bool level_dof_access>
209 static const unsigned int dimension=DoFHandlerType::dimension;
222 typename ::internal::DoFAccessor::Inheritance<structdim, dimension, space_dimension>::BaseClass
275 template <
int structdim2,
int dim2,
int spacedim2>
282 template <
int dim2,
class DoFHandlerType2,
bool level_dof_access2>
288 template <
bool level_dof_access2>
297 const DoFHandlerType &
303 template <
bool level_dof_access2>
329 child (
const unsigned int c)
const;
336 typename ::internal::DoFHandler::Iterators<DoFHandlerType, level_dof_access>::line_iterator
337 line (
const unsigned int i)
const;
344 typename ::internal::DoFHandler::Iterators<DoFHandlerType, level_dof_access>::quad_iterator
345 quad (
const unsigned int i)
const;
392 void get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
393 const unsigned int fe_index = DoFHandlerType::default_fe_index)
const;
402 std::vector<types::global_dof_index> &dof_indices,
403 const unsigned int fe_index = DoFHandlerType::default_fe_index)
const;
409 const std::vector<types::global_dof_index> &dof_indices,
410 const unsigned int fe_index = DoFHandlerType::default_fe_index);
430 (
const unsigned int vertex,
431 const unsigned int i,
432 const unsigned int fe_index = DoFHandlerType::default_fe_index)
const;
441 const unsigned int vertex,
442 const unsigned int i,
443 const unsigned int fe_index = DoFHandlerType::default_fe_index)
const;
473 (
const unsigned int i,
474 const unsigned int fe_index = DoFHandlerType::default_fe_index)
const;
532 get_fe (
const unsigned int fe_index)
const;
597 template <
int dim2,
class DoFHandlerType2,
bool level_dof_access2>
603 template <
int dim2,
class DoFHandlerType2,
bool level_dof_access2>
629 (
const unsigned int i,
631 const unsigned int fe_index = DoFHandlerType::default_fe_index)
const;
653 (
const unsigned int vertex,
654 const unsigned int i,
656 const unsigned int fe_index = DoFHandlerType::default_fe_index)
const;
658 void set_mg_vertex_dof_index
660 const unsigned int vertex,
661 const unsigned int i,
663 const unsigned int fe_index = DoFHandlerType::default_fe_index)
const;
670 template <
int,
class,
bool>
friend class DoFAccessor;
693 friend struct ::internal::DoFHandler::Policy::Implementation;
694 friend struct ::internal::DoFHandler::Implementation;
695 friend struct ::internal::hp::DoFHandler::Implementation;
696 friend struct ::internal::DoFCellAccessor::Implementation;
697 friend struct ::internal::DoFAccessor::Implementation;
711 template <
template <
int,
int>
class DoFHandlerType,
int spacedim,
bool level_dof_access>
780 const DoFHandlerType<1,spacedim> *
dof_handler = 0);
794 template <
int structdim2,
int dim2,
int spacedim2>
801 template <
int dim2,
class DoFHandlerType2,
bool level_dof_access2>
811 const DoFHandlerType<1,spacedim> &
823 template <
bool level_dof_access2>
845 child (
const unsigned int c)
const;
853 typename ::internal::DoFHandler::Iterators<DoFHandlerType<1,spacedim>, level_dof_access>::line_iterator
854 line (
const unsigned int i)
const;
862 typename ::internal::DoFHandler::Iterators<DoFHandlerType<1,spacedim>, level_dof_access>::quad_iterator
863 quad (
const unsigned int i)
const;
907 void get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
908 const unsigned int fe_index = AccessorData::default_fe_index)
const;
917 std::vector<types::global_dof_index> &dof_indices,
918 const unsigned int fe_index = AccessorData::default_fe_index)
const;
938 const unsigned int i,
939 const unsigned int fe_index = AccessorData::default_fe_index)
const;
956 const unsigned int fe_index = AccessorData::default_fe_index)
const;
1006 get_fe (
const unsigned int fe_index)
const;
1061 template <
int dim2,
class DoFHandlerType2,
bool level_dof_access2>
1067 template <
int dim2,
class DoFHandlerType2,
bool level_dof_access2>
1094 const unsigned int fe_index = AccessorData::default_fe_index)
const;
1114 const unsigned int i,
1116 const unsigned int fe_index = AccessorData::default_fe_index)
const;
1132 friend struct ::internal::DoFHandler::Policy::Implementation;
1133 friend struct ::internal::DoFHandler::Implementation;
1134 friend struct ::internal::hp::DoFHandler::Implementation;
1135 friend struct ::internal::DoFCellAccessor::Implementation;
1154 template <
typename DoFHandlerType,
bool level_dof_access>
1161 static const unsigned int dim = DoFHandlerType::dimension;
1166 static const unsigned int spacedim = DoFHandlerType::space_dimension;
1220 template <
int structdim2,
int dim2,
int spacedim2>
1227 template <
int dim2,
class DoFHandlerType2,
bool level_dof_access2>
1260 neighbor (
const unsigned int i)
const;
1284 child (
const unsigned int i)
const;
1293 face (
const unsigned int i)
const;
1303 const unsigned int subface_no)
const;
1313 const unsigned int subface_no)
const;
1340 template <
class InputVector,
typename number>
1358 template <
class InputVector,
typename ForwardIterator>
1360 ForwardIterator local_values_begin,
1361 ForwardIterator local_values_end)
const;
1379 template <
class InputVector,
typename ForwardIterator>
1381 const InputVector &values,
1382 ForwardIterator local_values_begin,
1383 ForwardIterator local_values_end)
const;
1406 template <
class OutputVector,
typename number>
1408 OutputVector &values)
const;
1441 template <
class InputVector,
typename number>
1444 const unsigned int fe_index
1445 = DoFHandlerType::default_fe_index)
const;
1499 template <
class OutputVector,
typename number>
1501 OutputVector &values,
1502 const unsigned int fe_index
1503 = DoFHandlerType::default_fe_index)
const;
1513 template <
typename number,
typename OutputVector>
1516 OutputVector &global_destination)
const;
1526 template <
typename ForwardIterator,
typename OutputVector>
1529 ForwardIterator local_source_end,
1530 OutputVector &global_destination)
const;
1542 template <
typename ForwardIterator,
typename OutputVector>
1545 ForwardIterator local_source_begin,
1546 ForwardIterator local_source_end,
1547 OutputVector &global_destination)
const;
1555 template <
typename number,
typename OutputMatrix>
1558 OutputMatrix &global_destination)
const;
1564 template <
typename number,
typename OutputMatrix,
typename OutputVector>
1568 OutputMatrix &global_matrix,
1569 OutputVector &global_vector)
const;
1632 void get_dof_indices (std::vector<types::global_dof_index> &dof_indices)
const;
1706 void set_dof_indices (
const std::vector<types::global_dof_index> &dof_indices);
1737 friend struct ::internal::DoFCellAccessor::Implementation;
1741 template <
int sd,
typename DoFHandlerType,
bool level_dof_access>
1746 return level_dof_access;
1751 DEAL_II_NAMESPACE_CLOSE
1754 #include "dof_accessor.templates.h" DoFHandlerType * dof_handler
void get_dof_indices(std::vector< types::global_dof_index > &dof_indices) const
::TriaAccessor< structdim, dim, spacedim > BaseClass
static bool is_level_cell()
typename ::internal::DoFHandler::Iterators< DoFHandlerType, level_dof_access >::quad_iterator quad(const unsigned int i) const
face_iterator face(const unsigned int i) const
static const unsigned int spacedim
TriaIterator< DoFCellAccessor< DoFHandlerType, level_dof_access > > parent() const
void copy_from(const DoFAccessor< structdim, DoFHandlerType, level_dof_access2 > &a)
DoFHandlerType< 1, spacedim > * dof_handler
TriaIterator< DoFCellAccessor< DoFHandlerType, level_dof_access > > neighbor(const unsigned int i) const
TriaIterator< DoFCellAccessor< DoFHandlerType, level_dof_access > > periodic_neighbor(const unsigned int i) const
void set_dof_values_by_interpolation(const Vector< number > &local_values, OutputVector &values, const unsigned int fe_index=DoFHandlerType::default_fe_index) const
bool operator==(const DoFAccessor< dim2, DoFHandlerType2, level_dof_access2 > &) const
TriaIterator< DoFAccessor< DoFHandlerType::dimension-1, DoFHandlerType, level_dof_access > > face_iterator
TriaAccessor< 0, 1, spacedim > BaseClass
void set_mg_dof_indices(const int level, const std::vector< types::global_dof_index > &dof_indices, const unsigned int fe_index=DoFHandlerType::default_fe_index)
void set_dof_handler(DoFHandlerType *dh)
void get_mg_dof_indices(std::vector< types::global_dof_index > &dof_indices) const
void get_interpolated_dof_values(const InputVector &values, Vector< number > &interpolated_values, const unsigned int fe_index=DoFHandlerType::default_fe_index) const
unsigned int vertex_index(const unsigned int i) const
types::global_dof_index dof_index(const unsigned int i, const unsigned int fe_index=DoFHandlerType::default_fe_index) const
DoFHandlerType AccessorData
void update_cell_dof_indices_cache() const
void get_dof_indices(std::vector< types::global_dof_index > &dof_indices, const unsigned int fe_index=DoFHandlerType::default_fe_index) const
unsigned int active_fe_index() const
void get_mg_dof_indices(const int level, std::vector< types::global_dof_index > &dof_indices, const unsigned int fe_index=DoFHandlerType::default_fe_index) const
void set_active_fe_index(const unsigned int i)
static ::ExceptionBase & ExcCantCompareIterators()
typename ::internal::DoFAccessor::Inheritance< structdim, dimension, space_dimension >::BaseClass BaseClass
typename ::internal::DoFHandler::Iterators< DoFHandlerType, level_dof_access >::line_iterator line(const unsigned int i) const
TriaIterator< DoFCellAccessor< DoFHandlerType, level_dof_access > > child(const unsigned int i) const
unsigned int global_dof_index
static ::ExceptionBase & ExcMatrixDoesNotMatch()
Point< spacedim > & vertex(const unsigned int i) const
void set_mg_dof_indices(const std::vector< types::global_dof_index > &dof_indices)
static const unsigned int dimension
const Triangulation< dim, spacedim > * tria
TriaIterator< DoFCellAccessor< DoFHandlerType, level_dof_access > > neighbor_child_on_subface(const unsigned int face_no, const unsigned int subface_no) const
#define DeclException0(Exception0)
void set_dof_indices(const std::vector< types::global_dof_index > &dof_indices)
TriaIterator< DoFCellAccessor< DoFHandlerType, level_dof_access > > neighbor_or_periodic_neighbor(const unsigned int i) const
::CellAccessor< dim, spacedim > BaseClass
static ::ExceptionBase & ExcVectorNotEmpty()
DoFHandlerType< 1, spacedim > AccessorData
DoFCellAccessor< DoFHandlerType, level_dof_access > & operator=(const DoFCellAccessor< DoFHandlerType, level_dof_access > &da)
void get_dof_values(const InputVector &values, Vector< number > &local_values) 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
bool operator!=(const DoFAccessor< dim2, DoFHandlerType2, level_dof_access2 > &) const
void set_dof_values(const Vector< number > &local_values, OutputVector &values) const
unsigned int n_active_fe_indices() const
static const unsigned int dim
void distribute_local_to_global(const Vector< number > &local_source, OutputVector &global_destination) 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
DoFHandlerType AccessorData
static ::ExceptionBase & ExcNotActive()
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
static ::ExceptionBase & ExcInvalidObject()
DoFCellAccessor(const Triangulation< DoFHandlerType::dimension, DoFHandlerType::space_dimension > *tria, const int level, const int index, const AccessorData *local_data)
static const unsigned int space_dimension
unsigned int nth_active_fe_index(const unsigned int n) const
void get_active_or_mg_dof_indices(std::vector< types::global_dof_index > &dof_indices) 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
TriaIterator< DoFCellAccessor< DoFHandlerType, level_dof_access > > periodic_neighbor_child_on_subface(const unsigned int face_no, const unsigned int subface_no) const
DoFAccessor< structdim, DoFHandlerType, level_dof_access > & operator=(const DoFAccessor< structdim, DoFHandlerType, level_dof_access > &da)
const FiniteElement< DoFHandlerType::dimension, DoFHandlerType::space_dimension > & get_fe() const
const DoFHandlerType & get_dof_handler() const
const FiniteElement< DoFHandlerType::dimension, DoFHandlerType::space_dimension > & get_fe(const unsigned int fe_index) const
types::global_dof_index mg_dof_index(const int level, const unsigned int i) const
bool fe_index_is_active(const unsigned int fe_index) const
static ::ExceptionBase & ExcVectorDoesNotMatch()
TriaIterator< DoFAccessor< structdim, DoFHandlerType, level_dof_access > > child(const unsigned int c) const
DoFAccessor< DoFHandlerType::dimension, DoFHandlerType, level_dof_access > BaseClass