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/base/std_cxx11/shared_ptr.h> 23 #include <deal.II/dofs/block_info.h> 24 #include <deal.II/fe/fe_values.h> 25 #include <deal.II/meshworker/local_results.h> 26 #include <deal.II/meshworker/vector_selector.h> 28 DEAL_II_NAMESPACE_OPEN
67 template<
int dim,
int spacedim = dim,
typename number =
double>
97 std::vector<types::global_dof_index> indices;
119 template <
class DHCellIterator>
120 void reinit(
const DHCellIterator &c);
125 template <
class DHCellIterator,
class DHFaceIterator>
126 void reinit(
const DHCellIterator &c,
127 const DHFaceIterator &f,
128 const unsigned int face_no);
133 template <
class DHCellIterator,
class DHFaceIterator>
134 void reinit(
const DHCellIterator &c,
135 const DHFaceIterator &f,
136 const unsigned int face_no,
137 const unsigned int subface_no);
143 template <
class DHFaceIterator>
144 void set_face (
const DHFaceIterator &f,
145 const unsigned int face_no);
151 template <
class DHFaceIterator>
153 const unsigned int face_no,
154 const unsigned int subface_no);
179 template <
class DHCellIterator>
207 template <
int dim,
class DOFINFO>
232 template <
class ASSEMBLER>
233 void assemble(ASSEMBLER &ass)
const;
274 template <
int dim,
int spacedim,
typename number>
277 face_number (
numbers::invalid_unsigned_int),
278 sub_number (
numbers::invalid_unsigned_int),
281 std::vector<types::global_dof_index> aux(1);
282 aux[0] = dof_handler.
get_fe().dofs_per_cell;
287 template <
int dim,
int spacedim,
typename number>
288 template <
class DHCellIterator>
292 indices.resize(c->get_fe().dofs_per_cell);
293 if (block_info == 0 || block_info->local().size() == 0)
294 c->get_active_or_mg_dof_indices(indices);
297 indices_org.resize(c->get_fe().dofs_per_cell);
298 c->get_active_or_mg_dof_indices(indices_org);
304 template <
int dim,
int spacedim,
typename number>
305 template <
class DHCellIterator>
310 level_cell = c->is_level_cell();
322 template<
int dim,
int spacedim,
typename number>
323 template <
class DHFaceIterator>
326 const DHFaceIterator &f,
327 const unsigned int face_no)
330 face_number = face_no;
335 template<
int dim,
int spacedim,
typename number>
336 template <
class DHCellIterator,
class DHFaceIterator>
339 const DHCellIterator &c,
340 const DHFaceIterator &f,
341 const unsigned int face_no)
346 level_cell = c->is_level_cell();
358 template<
int dim,
int spacedim,
typename number>
359 template <
class DHFaceIterator>
362 const DHFaceIterator &f,
363 const unsigned int face_no,
364 const unsigned int subface_no)
367 face_number = face_no;
368 sub_number = subface_no;
372 template<
int dim,
int spacedim,
typename number>
373 template <
class DHCellIterator,
class DHFaceIterator>
376 const DHCellIterator &c,
377 const DHFaceIterator &f,
378 const unsigned int face_no,
379 const unsigned int subface_no)
384 level_cell = c->is_level_cell();
387 set_subface(f, face_no, subface_no);
396 template<
int dim,
int spacedim,
typename number>
401 return block_info->local();
402 return aux_local_indices;
407 template <
int dim,
class DOFINFO>
411 cell(seed), cell_valid(true)
413 for (
unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
423 template <
int dim,
class DOFINFO>
427 cell(other.cell), cell_valid(other.cell_valid)
429 for (
unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
439 template <
int dim,
class DOFINFO>
444 for (
unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
446 interior_face_available[i] =
false;
447 exterior_face_available[i] =
false;
452 template <
int dim,
class DOFINFO>
453 template <
class ASSEMBLER>
460 assembler.assemble(cell);
461 for (
unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
464 if (interior_face_available[i])
469 if (exterior_face_available[i])
470 assembler.assemble(interior[i], exterior[i]);
472 assembler.assemble(interior[i]);
478 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.
const FiniteElement< dim, spacedim > & get_fe() 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)
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)
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...
std::size_t memory_consumption() const
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)