17 #ifndef dealii_mesh_worker_dof_info_h 18 #define dealii_mesh_worker_dof_info_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/quadrature_lib.h> 22 #include <deal.II/dofs/block_info.h> 23 #include <deal.II/fe/fe_values.h> 24 #include <deal.II/meshworker/local_results.h> 25 #include <deal.II/meshworker/vector_selector.h> 29 DEAL_II_NAMESPACE_OPEN
68 template <
int dim,
int spacedim = dim,
typename number =
double>
98 std::vector<types::global_dof_index> indices;
120 template <
class DHCellIterator>
121 void reinit(
const DHCellIterator &c);
126 template <
class DHCellIterator,
class DHFaceIterator>
127 void reinit(
const DHCellIterator &c,
128 const DHFaceIterator &f,
129 const unsigned int face_no);
134 template <
class DHCellIterator,
class DHFaceIterator>
135 void reinit(
const DHCellIterator &c,
136 const DHFaceIterator &f,
137 const unsigned int face_no,
138 const unsigned int subface_no);
144 template <
class DHFaceIterator>
145 void set_face (
const DHFaceIterator &f,
146 const unsigned int face_no);
152 template <
class DHFaceIterator>
154 const unsigned int face_no,
155 const unsigned int subface_no);
180 template <
class DHCellIterator>
208 template <
int dim,
class DOFINFO>
233 template <
class ASSEMBLER>
234 void assemble(ASSEMBLER &ass)
const;
270 template <
int dim,
int spacedim,
typename number>
273 face_number(
numbers::invalid_unsigned_int),
274 sub_number(
numbers::invalid_unsigned_int),
280 template <
int dim,
int spacedim,
typename number>
283 face_number (
numbers::invalid_unsigned_int),
284 sub_number (
numbers::invalid_unsigned_int),
287 std::vector<types::global_dof_index> aux(1);
288 aux[0] = dof_handler.
get_fe().dofs_per_cell;
293 template <
int dim,
int spacedim,
typename number>
294 template <
class DHCellIterator>
298 indices.resize(c->get_fe().dofs_per_cell);
299 if (block_info ==
nullptr || block_info->local().size() == 0)
300 c->get_active_or_mg_dof_indices(indices);
303 indices_org.resize(c->get_fe().dofs_per_cell);
304 c->get_active_or_mg_dof_indices(indices_org);
310 template <
int dim,
int spacedim,
typename number>
311 template <
class DHCellIterator>
316 level_cell = c->is_level_cell();
328 template <
int dim,
int spacedim,
typename number>
329 template <
class DHFaceIterator>
332 const DHFaceIterator &f,
333 const unsigned int face_no)
336 face_number = face_no;
341 template <
int dim,
int spacedim,
typename number>
342 template <
class DHCellIterator,
class DHFaceIterator>
345 const DHCellIterator &c,
346 const DHFaceIterator &f,
347 const unsigned int face_no)
352 level_cell = c->is_level_cell();
364 template <
int dim,
int spacedim,
typename number>
365 template <
class DHFaceIterator>
368 const DHFaceIterator &f,
369 const unsigned int face_no,
370 const unsigned int subface_no)
373 face_number = face_no;
374 sub_number = subface_no;
378 template <
int dim,
int spacedim,
typename number>
379 template <
class DHCellIterator,
class DHFaceIterator>
382 const DHCellIterator &c,
383 const DHFaceIterator &f,
384 const unsigned int face_no,
385 const unsigned int subface_no)
390 level_cell = c->is_level_cell();
393 set_subface(f, face_no, subface_no);
402 template <
int dim,
int spacedim,
typename number>
407 return block_info->local();
408 return aux_local_indices;
413 template <
int dim,
class DOFINFO>
417 cell(seed), cell_valid(true)
419 for (
unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
429 template <
int dim,
class DOFINFO>
433 cell(other.cell), cell_valid(other.cell_valid)
435 for (
unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
445 template <
int dim,
class DOFINFO>
450 for (
unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
452 interior_face_available[i] =
false;
453 exterior_face_available[i] =
false;
458 template <
int dim,
class DOFINFO>
459 template <
class ASSEMBLER>
466 assembler.assemble(cell);
467 for (
unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
470 if (interior_face_available[i])
475 if (exterior_face_available[i])
476 assembler.assemble(interior[i], exterior[i]);
478 assembler.assemble(interior[i]);
484 DEAL_II_NAMESPACE_CLOSE
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.
void set_block_indices()
Set up local block indices.
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)
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
bool interior_face_available[GeometryInfo< dim >::faces_per_cell]
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
SmartPointer< const BlockInfo, DoFInfo< dim, spacedim > > block_info
The block structure of the system.
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.
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)