16 #ifndef dealii_hp_dof_faces_h 17 #define dealii_hp_dof_faces_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/hp/fe_collection.h> 25 DEAL_II_NAMESPACE_OPEN
93 template <
int structdim>
110 std::vector<types::global_dof_index>
dofs;
124 template <
int dim,
int spacedim>
126 set_dof_index (const ::hp::DoFHandler<dim,spacedim> &dof_handler,
127 const unsigned int obj_index,
128 const unsigned int fe_index,
129 const unsigned int local_index,
131 const unsigned int obj_level);
144 template <
int dim,
int spacedim>
146 get_dof_index (const ::hp::DoFHandler<dim,spacedim> &dof_handler,
147 const unsigned int obj_index,
148 const unsigned int fe_index,
149 const unsigned int local_index,
150 const unsigned int obj_level)
const;
163 template <
int dim,
int spacedim>
166 const unsigned int obj_index)
const;
171 template <
int dim,
int spacedim>
174 const unsigned int obj_level,
175 const unsigned int obj_index,
176 const unsigned int n)
const;
182 template <
int dim,
int spacedim>
185 const unsigned int obj_index,
186 const unsigned int fe_index,
187 const unsigned int obj_level)
const;
199 template <
class Archive>
201 const unsigned int version);
252 std::size_t memory_consumption ()
const;
258 template <
class Archive>
259 void serialize(Archive &ar,
260 const unsigned int version);
283 std::size_t memory_consumption ()
const;
289 template <
class Archive>
290 void serialize(Archive &ar,
291 const unsigned int version);
319 std::size_t memory_consumption ()
const;
325 template <
class Archive>
326 void serialize(Archive &ar,
327 const unsigned int version);
332 template <
class Archive>
338 template <
class Archive>
346 template <
class Archive>
353 template <
int structdim>
354 template <
int dim,
int spacedim>
359 const unsigned int obj_index,
360 const unsigned int fe_index,
361 const unsigned int local_index,
362 const unsigned int )
const 365 ExcMessage (
"You need to specify a FE index when working " 366 "with hp DoFHandlers"));
367 Assert (fe_index < dof_handler.get_fe_collection().size(),
368 ExcIndexRange (fe_index, 0, dof_handler.get_fe_collection().size()));
370 dof_handler.get_fe(fe_index).template n_dofs_per_object<structdim>(),
372 dof_handler.get_fe(fe_index)
373 .template n_dofs_per_object<structdim>()));
374 Assert (obj_index < dof_offsets.size(),
381 ExcMessage (
"You are trying to access degree of freedom " 382 "information for an object on which no such " 383 "information is available"));
385 Assert (structdim<dim,
ExcMessage (
"This object can not be used for cells."));
398 if (*pointer == fe_index)
399 return *(pointer + 1 + local_index);
402 dof_handler.get_fe(*pointer)
403 .template n_dofs_per_object<structdim>() + 1);
409 template <
int structdim>
410 template <
int dim,
int spacedim>
415 const unsigned int obj_index,
416 const unsigned int fe_index,
417 const unsigned int local_index,
422 ExcMessage (
"You need to specify a FE index when working " 423 "with hp DoFHandlers"));
424 Assert (fe_index < dof_handler.get_fe_collection().size(),
425 ExcIndexRange (fe_index, 0, dof_handler.get_fe_collection().size()));
427 dof_handler.get_fe(fe_index).template n_dofs_per_object<structdim>(),
429 dof_handler.get_fe(fe_index)
430 .template n_dofs_per_object<structdim>()));
431 Assert (obj_index < dof_offsets.size(),
438 ExcMessage (
"You are trying to access degree of freedom " 439 "information for an object on which no such " 440 "information is available"));
442 Assert (structdim<dim,
ExcMessage (
"This object can not be used for cells."));
455 if (*pointer == fe_index)
457 *(pointer + 1 + local_index) = global_index;
461 pointer += dof_handler.get_fe(*pointer)
462 .template n_dofs_per_object<structdim>() + 1;
468 template <
int structdim>
469 template <
int dim,
int spacedim>
474 const unsigned int obj_index)
const 476 Assert (obj_index < dof_offsets.size(),
485 Assert (structdim<dim,
ExcMessage (
"This object can not be used for cells."));
492 const unsigned int starting_offset = dof_offsets[obj_index];
494 unsigned int counter = 0;
503 pointer += dof_handler.get_fe(*pointer)
504 .template n_dofs_per_object<structdim>() + 1;
511 template <
int structdim>
512 template <
int dim,
int spacedim>
518 const unsigned int obj_index,
519 const unsigned int n)
const 521 Assert (obj_index < dof_offsets.size(),
528 ExcMessage (
"You are trying to access degree of freedom " 529 "information for an object on which no such " 530 "information is available"));
532 Assert (structdim<dim,
ExcMessage (
"This object can not be used for cells."));
534 Assert (n < n_active_fe_indices(dof_handler, obj_index),
536 n_active_fe_indices(dof_handler, obj_index)));
543 const unsigned int starting_offset = dof_offsets[obj_index];
545 unsigned int counter = 0;
551 const unsigned int fe_index = *pointer;
553 Assert (fe_index < dof_handler.get_fe_collection().size(),
560 pointer += dof_handler.get_fe(fe_index)
561 .template n_dofs_per_object<structdim>() + 1;
567 template <
int structdim>
568 template <
int dim,
int spacedim>
573 const unsigned int obj_index,
574 const unsigned int fe_index,
575 const unsigned int )
const 577 Assert (obj_index < dof_offsets.size(),
578 ExcIndexRange (obj_index, 0, static_cast<unsigned int>(dof_offsets.size())));
580 ExcMessage (
"You need to specify a FE index when working " 581 "with hp DoFHandlers"));
582 Assert (fe_index < dof_handler.get_fe_collection().size(),
583 ExcIndexRange (fe_index, 0, dof_handler.get_fe_collection().size()));
589 ExcMessage (
"You are trying to access degree of freedom " 590 "information for an object on which no such " 591 "information is available"));
593 Assert (structdim<dim,
ExcMessage (
"This object can not be used for cells."));
607 else if (*pointer == fe_index)
611 dof_handler.get_fe(*pointer)
612 .template n_dofs_per_object<structdim>()+1);
616 template <
int structdim>
617 template <
class Archive>
630 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)
unsigned int global_dof_index
#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
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()