17 #ifndef dealii_mesh_worker_dof_info_h 18 #define dealii_mesh_worker_dof_info_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/quadrature_lib.h> 24 #include <deal.II/dofs/block_info.h> 26 #include <deal.II/fe/fe_values.h> 28 #include <deal.II/meshworker/local_results.h> 29 #include <deal.II/meshworker/vector_selector.h> 33 DEAL_II_NAMESPACE_OPEN
37 template <
int dim,
class DOFINFO>
73 template <
int dim,
int spacedim = dim,
typename number =
double>
125 template <
class DHCellIterator>
127 reinit(
const DHCellIterator &c);
132 template <
class DHCellIterator,
class DHFaceIterator>
134 reinit(
const DHCellIterator &c,
135 const DHFaceIterator &f,
136 const unsigned int face_no);
141 template <
class DHCellIterator,
class DHFaceIterator>
143 reinit(
const DHCellIterator &c,
144 const DHFaceIterator &f,
145 const unsigned int face_no,
146 const unsigned int subface_no);
152 template <
class DHFaceIterator>
154 set_face(
const DHFaceIterator &f,
const unsigned int face_no);
160 template <
class DHFaceIterator>
163 const unsigned int face_no,
164 const unsigned int subface_no);
167 local_indices()
const;
191 template <
class DHCellIterator>
220 template <
int dim,
class DOFINFO>
246 template <
class ASSEMBLER>
284 template <
int dim,
int spacedim,
typename number>
286 : face_number(
numbers::invalid_unsigned_int)
287 , sub_number(
numbers::invalid_unsigned_int)
293 template <
int dim,
int spacedim,
typename number>
296 : face_number(
numbers::invalid_unsigned_int)
297 , sub_number(
numbers::invalid_unsigned_int)
300 std::vector<types::global_dof_index> aux(1);
301 aux[0] = dof_handler.
get_fe().dofs_per_cell;
306 template <
int dim,
int spacedim,
typename number>
307 template <
class DHCellIterator>
311 indices.resize(c->get_fe().dofs_per_cell);
312 if (block_info ==
nullptr || block_info->local().size() == 0)
313 c->get_active_or_mg_dof_indices(indices);
316 indices_org.resize(c->get_fe().dofs_per_cell);
317 c->get_active_or_mg_dof_indices(indices_org);
323 template <
int dim,
int spacedim,
typename number>
324 template <
class DHCellIterator>
329 level_cell = c->is_level_cell();
341 template <
int dim,
int spacedim,
typename number>
342 template <
class DHFaceIterator>
345 const unsigned int face_no)
348 face_number = face_no;
353 template <
int dim,
int spacedim,
typename number>
354 template <
class DHCellIterator,
class DHFaceIterator>
357 const DHFaceIterator &f,
358 const unsigned int face_no)
363 level_cell = c->is_level_cell();
366 set_face(f, face_no);
375 template <
int dim,
int spacedim,
typename number>
376 template <
class DHFaceIterator>
379 const unsigned int face_no,
380 const unsigned int subface_no)
383 face_number = face_no;
384 sub_number = subface_no;
388 template <
int dim,
int spacedim,
typename number>
389 template <
class DHCellIterator,
class DHFaceIterator>
392 const DHFaceIterator &f,
393 const unsigned int face_no,
394 const unsigned int subface_no)
400 level_cell = c->is_level_cell();
403 set_subface(f, face_no, subface_no);
412 template <
int dim,
int spacedim,
typename number>
417 return block_info->local();
418 return aux_local_indices;
423 template <
int dim,
class DOFINFO>
428 for (
unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
438 template <
int dim,
class DOFINFO>
442 , cell_valid(other.cell_valid)
444 for (
unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
454 template <
int dim,
class DOFINFO>
459 for (
unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
461 interior_face_available[i] =
false;
462 exterior_face_available[i] =
false;
467 template <
int dim,
class DOFINFO>
468 template <
class ASSEMBLER>
475 assembler.assemble(cell);
476 for (
unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
479 if (interior_face_available[i])
484 if (exterior_face_available[i])
485 assembler.assemble(interior[i], exterior[i]);
487 assembler.assemble(interior[i]);
493 DEAL_II_NAMESPACE_CLOSE
SmartPointer< const BlockInfo, DoFInfo< dim, spacedim > > block_info
The block structure of the system.
void get_indices(const DHCellIterator &c)
Fill index vector with active indices.
Triangulation< dim, spacedim >::cell_iterator cell
The current cell.
static const unsigned int invalid_unsigned_int
std::vector< types::global_dof_index > indices_org
Auxiliary vector.
std::vector< types::global_dof_index > indices
void set_block_indices()
Set up local block indices.
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
bool exterior_face_available[GeometryInfo< dim >::faces_per_cell]
BlockIndices aux_local_indices
void set_subface(const DHFaceIterator &f, const unsigned int face_no, const unsigned int subface_no)
bool interior_face_available[GeometryInfo< dim >::faces_per_cell]
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
DoFInfoBox(const DOFINFO &seed)
void assemble(ASSEMBLER &ass) const
std::vector< std::vector< types::global_dof_index > > indices_by_block
void reinit(const BlockIndices &local_sizes)
DOFINFO interior[GeometryInfo< dim >::faces_per_cell]
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
Iterator points to a valid object.
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
DOFINFO exterior[GeometryInfo< dim >::faces_per_cell]
Triangulation< dim, spacedim >::face_iterator face
The current face.
void reinit(const DHCellIterator &c)
void set_face(const DHFaceIterator &f, const unsigned int face_no)