16 #ifndef dealii_hp_dof_faces_h 17 #define dealii_hp_dof_faces_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/hp/fe_collection.h> 26 DEAL_II_NAMESPACE_OPEN
94 template <
int structdim>
111 std::vector<types::global_dof_index>
dofs;
125 template <
int dim,
int spacedim>
127 set_dof_index(const ::hp::DoFHandler<dim, spacedim> &dof_handler,
128 const unsigned int obj_index,
129 const unsigned int fe_index,
130 const unsigned int local_index,
132 const unsigned int obj_level);
145 template <
int dim,
int spacedim>
147 get_dof_index(const ::hp::DoFHandler<dim, spacedim> &dof_handler,
148 const unsigned int obj_index,
149 const unsigned int fe_index,
150 const unsigned int local_index,
151 const unsigned int obj_level)
const;
164 template <
int dim,
int spacedim>
167 const ::hp::DoFHandler<dim, spacedim> &dof_handler,
168 const unsigned int obj_index)
const;
173 template <
int dim,
int spacedim>
176 const ::hp::DoFHandler<dim, spacedim> &dof_handler,
177 const unsigned int obj_level,
178 const unsigned int obj_index,
179 const unsigned int n)
const;
185 template <
int dim,
int spacedim>
188 const ::hp::DoFHandler<dim, spacedim> &dof_handler,
189 const unsigned int obj_index,
190 const unsigned int fe_index,
191 const unsigned int obj_level)
const;
204 template <
class Archive>
206 serialize(Archive &ar,
const unsigned int version);
258 memory_consumption()
const;
264 template <
class Archive>
266 serialize(Archive &ar,
const unsigned int version);
290 memory_consumption()
const;
296 template <
class Archive>
298 serialize(Archive &ar,
const unsigned int version);
327 memory_consumption()
const;
333 template <
class Archive>
335 serialize(Archive &ar,
const unsigned int version);
340 template <
class Archive>
346 template <
class Archive>
354 template <
class Archive>
361 template <
int structdim>
362 template <
int dim,
int spacedim>
365 const ::hp::DoFHandler<dim, spacedim> &dof_handler,
366 const unsigned int obj_index,
367 const unsigned int fe_index,
368 const unsigned int local_index,
369 const unsigned int )
const 373 ExcMessage(
"You need to specify a FE index when working " 374 "with hp DoFHandlers"));
375 Assert(fe_index < dof_handler.get_fe_collection().size(),
378 dof_handler.get_fe_collection().size()));
379 Assert(local_index < dof_handler.get_fe(fe_index)
380 .template n_dofs_per_object<structdim>(),
383 dof_handler.get_fe(fe_index)
384 .template n_dofs_per_object<structdim>()));
385 Assert(obj_index < dof_offsets.size(),
392 ExcMessage(
"You are trying to access degree of freedom " 393 "information for an object on which no such " 394 "information is available"));
397 ExcMessage(
"This object can not be used for cells."));
409 if (*pointer == fe_index)
410 return *(pointer + 1 + local_index);
413 dof_handler.get_fe(*pointer)
414 .template n_dofs_per_object<structdim>() +
421 template <
int structdim>
422 template <
int dim,
int spacedim>
425 const ::hp::DoFHandler<dim, spacedim> &dof_handler,
426 const unsigned int obj_index,
427 const unsigned int fe_index,
428 const unsigned int local_index,
434 ExcMessage(
"You need to specify a FE index when working " 435 "with hp DoFHandlers"));
436 Assert(fe_index < dof_handler.get_fe_collection().size(),
439 dof_handler.get_fe_collection().size()));
440 Assert(local_index < dof_handler.get_fe(fe_index)
441 .template n_dofs_per_object<structdim>(),
444 dof_handler.get_fe(fe_index)
445 .template n_dofs_per_object<structdim>()));
446 Assert(obj_index < dof_offsets.size(),
453 ExcMessage(
"You are trying to access degree of freedom " 454 "information for an object on which no such " 455 "information is available"));
458 ExcMessage(
"This object can not be used for cells."));
470 if (*pointer == fe_index)
472 *(pointer + 1 + local_index) = global_index;
476 pointer += dof_handler.get_fe(*pointer)
477 .template n_dofs_per_object<structdim>() +
484 template <
int structdim>
485 template <
int dim,
int spacedim>
488 const ::hp::DoFHandler<dim, spacedim> &dof_handler,
489 const unsigned int obj_index)
const 491 Assert(obj_index < dof_offsets.size(),
501 ExcMessage(
"This object can not be used for cells."));
508 const unsigned int starting_offset = dof_offsets[obj_index];
510 unsigned int counter = 0;
519 pointer += dof_handler.get_fe(*pointer)
520 .template n_dofs_per_object<structdim>() +
528 template <
int structdim>
529 template <
int dim,
int spacedim>
532 const ::hp::DoFHandler<dim, spacedim> &dof_handler,
534 const unsigned int obj_index,
535 const unsigned int n)
const 537 Assert(obj_index < dof_offsets.size(),
544 ExcMessage(
"You are trying to access degree of freedom " 545 "information for an object on which no such " 546 "information is available"));
549 ExcMessage(
"This object can not be used for cells."));
551 Assert(n < n_active_fe_indices(dof_handler, obj_index),
552 ExcIndexRange(n, 0, n_active_fe_indices(dof_handler, obj_index)));
559 const unsigned int starting_offset = dof_offsets[obj_index];
561 unsigned int counter = 0;
566 const unsigned int fe_index = *pointer;
568 Assert(fe_index < dof_handler.get_fe_collection().size(),
575 pointer += dof_handler.get_fe(fe_index)
576 .template n_dofs_per_object<structdim>() +
583 template <
int structdim>
584 template <
int dim,
int spacedim>
587 const ::hp::DoFHandler<dim, spacedim> &dof_handler,
588 const unsigned int obj_index,
589 const unsigned int fe_index,
590 const unsigned int )
const 592 Assert(obj_index < dof_offsets.size(),
595 static_cast<unsigned int>(dof_offsets.size())));
598 ExcMessage(
"You need to specify a FE index when working " 599 "with hp DoFHandlers"));
600 Assert(fe_index < dof_handler.get_fe_collection().size(),
603 dof_handler.get_fe_collection().size()));
609 ExcMessage(
"You are trying to access degree of freedom " 610 "information for an object on which no such " 611 "information is available"));
614 ExcMessage(
"This object can not be used for cells."));
628 else if (*pointer == fe_index)
632 dof_handler.get_fe(*pointer)
633 .template n_dofs_per_object<structdim>() +
638 template <
int structdim>
639 template <
class Archive>
653 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
void set_dof_index(const ::hp::DoFHandler< dim, spacedim > &dof_handler, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const unsigned int obj_level)
types::global_dof_index get_dof_index(const ::hp::DoFHandler< dim, spacedim > &dof_handler, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int obj_level) const
unsigned int n_active_fe_indices(const ::hp::DoFHandler< dim, spacedim > &dof_handler, const unsigned int obj_index) const
internal::hp::DoFIndicesOnFacesOrEdges< 1 > lines
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
void serialize(Archive &ar, const unsigned int version)
std::size_t memory_consumption() const
std::vector< types::global_dof_index > dofs
std::vector< unsigned int > dof_offsets
internal::hp::DoFIndicesOnFacesOrEdges< 2 > quads
bool fe_index_is_active(const ::hp::DoFHandler< dim, spacedim > &dof_handler, const unsigned int obj_index, const unsigned int fe_index, const unsigned int obj_level) const
unsigned int global_dof_index
types::global_dof_index nth_active_fe_index(const ::hp::DoFHandler< dim, spacedim > &dof_handler, const unsigned int obj_level, const unsigned int obj_index, const unsigned int n) const
const types::global_dof_index invalid_dof_index
internal::hp::DoFIndicesOnFacesOrEdges< 1 > lines
static ::ExceptionBase & ExcInternalError()