Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends

MeshWorker::DoFInfo< dim, spacedim, number > Class Template Reference
[The MeshWorker interface]

Inheritance diagram for MeshWorker::DoFInfo< dim, spacedim, number >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DoFInfo (const BlockInfo &block_info)
template<class DH >
 DoFInfo (const DH &dof_handler)
template<class DHCellIterator >
void reinit (const DHCellIterator &c)
template<class DHCellIterator , class DHFaceIterator >
void reinit (const DHCellIterator &c, const DHFaceIterator &f, const unsigned int n)
template<class DHCellIterator , class DHFaceIterator >
void reinit (const DHCellIterator &c, const DHFaceIterator &f, const unsigned int n, const unsigned int s)
template<class DHFaceIterator >
void set_face (const DHFaceIterator &f, const unsigned int n)
template<class DHFaceIterator >
void set_subface (const DHFaceIterator &f, const unsigned int n, const unsigned int s)
const BlockIndiceslocal_indices () const

Public Attributes

Triangulation< dim, spacedim >
::cell_iterator 
cell
 The current cell.
Triangulation< dim, spacedim >
::face_iterator 
face
 The current face.
unsigned int face_number
unsigned int sub_number
std::vector< unsigned int > indices
 The DoF indices of the current cell.
SmartPointer< const BlockInfo,
DoFInfo< dim, spacedim > > 
block_info
 The block structure of the system.
bool level_cell

Private Member Functions

 DoFInfo ()
void get_indices (const typename DoFHandler< dim, spacedim >::cell_iterator &c)
 Fill index vector with active indices.
void get_indices (const typename MGDoFHandler< dim, spacedim >::cell_iterator &c)
 Fill index vector with level indices.

Private Attributes

std::vector< unsigned int > indices_org
 Auxiliary vector.
BlockIndices aux_local_indices

Friends

class DoFInfoBox< dim, DoFInfo< dim, spacedim, number > >

Detailed Description

template<int dim, int spacedim = dim, typename number = double>
class MeshWorker::DoFInfo< dim, spacedim, number >

A class containing information on geometry and degrees of freedom of a mesh object.

The information in these objects is usually used by one of the Assembler classes. It is also the kind of information which is needed in mesh based matrices (often referred to as matrix free methods).

In addition to the information on degrees of freedom stored in this class, it also provides the local computation space for the worker object operating on it in LocalResults. This base class will automatically reinitialized on each cell, but initial setup is up to the user and should be done when initialize() for this class is called.

This class operates in two different modes, corresponding to the data models discussed in the Assembler namespace documentation.

The choice of the local data model is triggered by the vector BlockInfo::local_renumbering, which in turn is usually filled by BlockInfo::initialize_local(). If this function has been used, or the vector has been changed from zero-length, then local dof indices stored in this object will automatically be renumbered to reflect local block structure. This means, the first entries in indices will refer to the first block of the system, then comes the second block and so on.

The BlockInfo object is stored as a pointer. Therefore, if the block structure changes, for instance because of mesh refinement, the DoFInfo class will automatically use the new structures.

Author:
Guido Kanschat, 2009

Definition at line 64 of file dof_info.h.


Constructor & Destructor Documentation

template<int dim, int spacedim = dim, typename number = double>
MeshWorker::DoFInfo< dim, spacedim, number >::DoFInfo ( const BlockInfo block_info )

Constructor setting the block_info pointer.

template<int dim, int spacedim, typename number >
template<class DH >
MeshWorker::DoFInfo< dim, spacedim, number >::DoFInfo ( const DH &  dof_handler )

Constructor leaving the block_info pointer empty, but setting the aux_local_indices.

Definition at line 286 of file dof_info.h.

template<int dim, int spacedim = dim, typename number = double>
MeshWorker::DoFInfo< dim, spacedim, number >::DoFInfo (  ) [private]

Standard constructor, not setting any block indices. Use of this constructor is not recommended, but it is needed for the arrays in DoFInfoBox.


Member Function Documentation

template<int dim, int spacedim, typename number >
template<class DHCellIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::reinit ( const DHCellIterator &  c ) [inline]

Set the current cell and fill indices.

Definition at line 297 of file dof_info.h.

References numbers::invalid_unsigned_int, and MeshWorker::LocalResults< number >::reinit().

template<int dim, int spacedim, typename number >
template<class DHCellIterator , class DHFaceIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::reinit ( const DHCellIterator &  c,
const DHFaceIterator &  f,
const unsigned int  n 
) [inline]

Set the current face and fill indices if the cell changed.

Definition at line 326 of file dof_info.h.

References MeshWorker::LocalResults< number >::reinit(), and IteratorState::valid.

template<int dim, int spacedim, typename number >
template<class DHCellIterator , class DHFaceIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::reinit ( const DHCellIterator &  c,
const DHFaceIterator &  f,
const unsigned int  n,
const unsigned int  s 
) [inline]

Set the current subface and fill indices if the cell changed.

Definition at line 361 of file dof_info.h.

References MeshWorker::LocalResults< number >::reinit(), and IteratorState::valid.

template<int dim, int spacedim, typename number >
template<class DHFaceIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::set_face ( const DHFaceIterator &  f,
const unsigned int  n 
) [inline]

Switch to a new face of the same cell. Does not change indices and does not reset data in LocalResults.

Definition at line 313 of file dof_info.h.

References numbers::invalid_unsigned_int.

template<int dim, int spacedim, typename number >
template<class DHFaceIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::set_subface ( const DHFaceIterator &  f,
const unsigned int  n,
const unsigned int  s 
) [inline]

Switch to a new subface of the same cell. Does not change indices and does not reset data in LocalResults.

Definition at line 347 of file dof_info.h.

template<int dim, int spacedim, typename number >
const BlockIndices & MeshWorker::DoFInfo< dim, spacedim, number >::local_indices (  ) const [inline]

Definition at line 382 of file dof_info.h.

template<int dim, int spacedim = dim, typename number = double>
void MeshWorker::DoFInfo< dim, spacedim, number >::get_indices ( const typename DoFHandler< dim, spacedim >::cell_iterator &  c ) [private]

Fill index vector with active indices.

template<int dim, int spacedim = dim, typename number = double>
void MeshWorker::DoFInfo< dim, spacedim, number >::get_indices ( const typename MGDoFHandler< dim, spacedim >::cell_iterator &  c ) [private]

Fill index vector with level indices.


Friends And Related Function Documentation

template<int dim, int spacedim = dim, typename number = double>
friend class DoFInfoBox< dim, DoFInfo< dim, spacedim, number > > [friend]

Definition at line 200 of file dof_info.h.


Member Data Documentation

template<int dim, int spacedim = dim, typename number = double>
Triangulation<dim, spacedim>::cell_iterator MeshWorker::DoFInfo< dim, spacedim, number >::cell
template<int dim, int spacedim = dim, typename number = double>
Triangulation<dim, spacedim>::face_iterator MeshWorker::DoFInfo< dim, spacedim, number >::face

The current face.

Definition at line 71 of file dof_info.h.

Referenced by LocalIntegrators::Laplace::compute_penalty().

template<int dim, int spacedim = dim, typename number = double>
unsigned int MeshWorker::DoFInfo< dim, spacedim, number >::face_number

The number of the current face on the current cell.

This number is deal_II_numbers::invalid_unsigned_int if the info object was initialized with a cell.

Definition at line 83 of file dof_info.h.

Referenced by MeshWorker::Assembler::GnuplotPatch::assemble(), LocalIntegrators::Laplace::compute_penalty(), and MeshWorker::IntegrationInfo< dim, spacedim >::reinit().

template<int dim, int spacedim = dim, typename number = double>
unsigned int MeshWorker::DoFInfo< dim, spacedim, number >::sub_number

The number of the current subface on the current face

This number is deal_II_numbers::invalid_unsigned_int if the info object was not initialized with a subface.

Definition at line 94 of file dof_info.h.

Referenced by MeshWorker::IntegrationInfo< dim, spacedim >::reinit().

template<int dim, int spacedim = dim, typename number = double>
std::vector<unsigned int> MeshWorker::DoFInfo< dim, spacedim, number >::indices

The DoF indices of the current cell.

Definition at line 97 of file dof_info.h.

template<int dim, int spacedim = dim, typename number = double>
SmartPointer<const BlockInfo,DoFInfo<dim,spacedim> > MeshWorker::DoFInfo< dim, spacedim, number >::block_info

The block structure of the system.

Definition at line 166 of file dof_info.h.

Referenced by MeshWorker::IntegrationInfo< dim, spacedim >::reinit().

template<int dim, int spacedim = dim, typename number = double>
bool MeshWorker::DoFInfo< dim, spacedim, number >::level_cell

Definition at line 168 of file dof_info.h.

template<int dim, int spacedim = dim, typename number = double>
std::vector<unsigned int> MeshWorker::DoFInfo< dim, spacedim, number >::indices_org [private]

Auxiliary vector.

Definition at line 188 of file dof_info.h.

template<int dim, int spacedim = dim, typename number = double>
BlockIndices MeshWorker::DoFInfo< dim, spacedim, number >::aux_local_indices [private]

An auxiliary local BlockIndices object created if block_info is not set. It contains just a single block of the size of degrees of freedom per cell.

Definition at line 198 of file dof_info.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:15 by doxygen 1.7.2