17#ifndef dealii_mesh_worker_dof_info_h
18#define dealii_mesh_worker_dof_info_h
39 template <
int dim,
class DOFINFO>
74 template <
int dim,
int spacedim = dim,
typename number =
double>
126 template <
class DHCellIterator>
128 reinit(
const DHCellIterator &c);
133 template <
class DHCellIterator,
class DHFaceIterator>
135 reinit(
const DHCellIterator &c,
136 const DHFaceIterator &f,
137 const unsigned int face_no);
142 template <
class DHCellIterator,
class DHFaceIterator>
144 reinit(
const DHCellIterator &c,
145 const DHFaceIterator &f,
146 const unsigned int face_no,
147 const unsigned int subface_no);
153 template <
class DHFaceIterator>
155 set_face(
const DHFaceIterator &f,
const unsigned int face_no);
161 template <
class DHFaceIterator>
164 const unsigned int face_no,
165 const unsigned int subface_no);
192 template <
class DHCellIterator>
220 template <
int dim,
class DOFINFO>
252 template <
class ASSEMBLER>
290 template <
int dim,
int spacedim,
typename number>
292 : face_number(
numbers::invalid_unsigned_int)
293 , sub_number(
numbers::invalid_unsigned_int)
299 template <
int dim,
int spacedim,
typename number>
302 : face_number(
numbers::invalid_unsigned_int)
303 , sub_number(
numbers::invalid_unsigned_int)
306 std::vector<types::global_dof_index> aux(1);
312 template <
int dim,
int spacedim,
typename number>
313 template <
class DHCellIterator>
317 indices.resize(c->get_fe().n_dofs_per_cell());
318 if (block_info ==
nullptr || block_info->local().size() == 0)
319 c->get_active_or_mg_dof_indices(indices);
322 indices_org.resize(c->get_fe().n_dofs_per_cell());
323 c->get_active_or_mg_dof_indices(indices_org);
329 template <
int dim,
int spacedim,
typename number>
330 template <
class DHCellIterator>
335 level_cell = c->is_level_cell();
347 template <
int dim,
int spacedim,
typename number>
348 template <
class DHFaceIterator>
351 const unsigned int face_no)
354 face_number = face_no;
359 template <
int dim,
int spacedim,
typename number>
360 template <
class DHCellIterator,
class DHFaceIterator>
363 const DHFaceIterator &f,
364 const unsigned int face_no)
369 level_cell = c->is_level_cell();
372 set_face(f, face_no);
381 template <
int dim,
int spacedim,
typename number>
382 template <
class DHFaceIterator>
385 const unsigned int face_no,
386 const unsigned int subface_no)
389 face_number = face_no;
390 sub_number = subface_no;
394 template <
int dim,
int spacedim,
typename number>
395 template <
class DHCellIterator,
class DHFaceIterator>
398 const DHFaceIterator &f,
399 const unsigned int face_no,
400 const unsigned int subface_no)
406 level_cell = c->is_level_cell();
409 set_subface(f, face_no, subface_no);
418 template <
int dim,
int spacedim,
typename number>
423 return block_info->local();
424 return aux_local_indices;
429 template <
int dim,
class DOFINFO>
444 template <
int dim,
class DOFINFO>
448 , cell_valid(other.cell_valid)
460 template <
int dim,
class DOFINFO>
470 interior_face_available[i] =
false;
471 exterior_face_available[i] =
false;
477 template <
int dim,
class DOFINFO>
484 interior_face_available[i] =
false;
485 exterior_face_available[i] =
false;
490 template <
int dim,
class DOFINFO>
491 template <
class ASSEMBLER>
498 assembler.assemble(cell);
502 if (interior_face_available[i])
507 if (exterior_face_available[i])
508 assembler.assemble(interior[i], exterior[i]);
510 assembler.assemble(interior[i]);
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
const FiniteElement< dim, spacedim > & get_fe(const types::fe_index index=0) const
unsigned int n_dofs_per_cell() const
DOFINFO interior[GeometryInfo< dim >::faces_per_cell]
void assemble(ASSEMBLER &ass) const
bool exterior_face_available[GeometryInfo< dim >::faces_per_cell]
bool interior_face_available[GeometryInfo< dim >::faces_per_cell]
DOFINFO exterior[GeometryInfo< dim >::faces_per_cell]
DoFInfoBox & operator=(const DoFInfoBox< dim, DOFINFO > &)
DoFInfoBox(const DOFINFO &seed)
void set_face(const DHFaceIterator &f, const unsigned int face_no)
std::vector< types::global_dof_index > indices_org
Auxiliary vector.
BlockIndices aux_local_indices
DoFInfo(const BlockInfo &block_info)
std::vector< types::global_dof_index > indices
void set_subface(const DHFaceIterator &f, const unsigned int face_no, const unsigned int subface_no)
void set_block_indices()
Set up local block indices.
const BlockIndices & local_indices() const
void get_indices(const DHCellIterator &c)
Fill index vector with active indices.
Triangulation< dim, spacedim >::face_iterator face
The current face.
std::vector< std::vector< types::global_dof_index > > indices_by_block
SmartPointer< const BlockInfo, DoFInfo< dim, spacedim > > block_info
The block structure of the system.
void reinit(const DHCellIterator &c)
Triangulation< dim, spacedim >::cell_iterator cell
The current cell.
void reinit(const BlockIndices &local_sizes)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
@ valid
Iterator points to a valid object.
static const unsigned int invalid_unsigned_int
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > face_indices()