Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Namespaces | Classes | Functions
The MeshWorker interface
Collaboration diagram for The MeshWorker interface:

Namespaces

 MeshWorker
 
 MeshWorker::Assembler
 

Classes

class  MeshWorker::LocalResults< number >
 
class  MeshWorker::Assembler::Functional< number >
 
class  MeshWorker::Assembler::CellsAndFaces< number >
 
class  MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< VECTOR >
 
class  MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >
 
class  MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >
 
class  MeshWorker::Assembler::ResidualSimple< VECTOR >
 
class  MeshWorker::Assembler::MatrixSimple< MATRIX >
 
class  MeshWorker::Assembler::MGMatrixSimple< MATRIX >
 
class  MeshWorker::Assembler::SystemSimple< MATRIX, VECTOR >
 
class  MeshWorker::VectorSelector
 
class  MeshWorker::VectorDataBase< dim, spacedim >
 
class  MeshWorker::VectorData< VECTOR, dim, spacedim >
 
class  MeshWorker::MGVectorData< VECTOR, dim, spacedim >
 
class  MeshWorker::LocalIntegrator< dim, spacedim, number >
 
class  MeshWorker::IntegrationInfo< dim, spacedim >
 
class  MeshWorker::IntegrationInfoBox< dim, spacedim >
 
class  MeshWorker::DoFInfo< dim, spacedim, number >
 
class  MeshWorker::DoFInfoBox< dim, DOFINFO >
 

Functions

template<class INFOBOX , class DOFINFO , int dim, int spacedim, class ITERATOR >
void MeshWorker::cell_action (ITERATOR cell, DoFInfoBox< dim, DOFINFO > &dof_info, INFOBOX &info, const std_cxx1x::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &cell_worker, const std_cxx1x::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &boundary_worker, const std_cxx1x::function< void(DOFINFO &, DOFINFO &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &face_worker, const bool cells_first, const bool unique_faces_only)
 
template<int dim, int spacedim, class DOFINFO , class INFOBOX , class ASSEMBLER , class ITERATOR >
void MeshWorker::loop (ITERATOR begin, typename identity< ITERATOR >::type end, DOFINFO &dinfo, INFOBOX &info, const std_cxx1x::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &cell_worker, const std_cxx1x::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &boundary_worker, const std_cxx1x::function< void(DOFINFO &, DOFINFO &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &face_worker, ASSEMBLER &assembler, bool cells_first=true, bool unique_faces_only=true)
 
template<int dim, int spacedim, class ITERATOR , class ASSEMBLER >
void MeshWorker::integration_loop (ITERATOR begin, typename identity< ITERATOR >::type end, DoFInfo< dim, spacedim > &dof_info, IntegrationInfoBox< dim, spacedim > &box, const std_cxx1x::function< void(DoFInfo< dim > &, IntegrationInfo< dim, spacedim > &)> &cell_worker, const std_cxx1x::function< void(DoFInfo< dim > &, IntegrationInfo< dim, spacedim > &)> &boundary_worker, const std_cxx1x::function< void(DoFInfo< dim > &, DoFInfo< dim > &, IntegrationInfo< dim, spacedim > &, IntegrationInfo< dim, spacedim > &)> &face_worker, ASSEMBLER &assembler, bool cells_first=true) DEAL_II_DEPRECATED
 
template<int dim, int spacedim, class ITERATOR , class ASSEMBLER >
void MeshWorker::integration_loop (ITERATOR begin, typename identity< ITERATOR >::type end, DoFInfo< dim, spacedim > &dof_info, IntegrationInfoBox< dim, spacedim > &box, const LocalIntegrator< dim, spacedim > &integrator, ASSEMBLER &assembler, bool cells_first=true)
 

Detailed Description

A collection of classes and functions simplifying the coding of loops over all cells and faces. All classes and functions of this module are in the MeshWorker namespace, which also contains documentation on the usage.

Function Documentation

template<class INFOBOX , class DOFINFO , int dim, int spacedim, class ITERATOR >
void MeshWorker::cell_action ( ITERATOR  cell,
DoFInfoBox< dim, DOFINFO > &  dof_info,
INFOBOX &  info,
const std_cxx1x::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &  cell_worker,
const std_cxx1x::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &  boundary_worker,
const std_cxx1x::function< void(DOFINFO &, DOFINFO &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &  face_worker,
const bool  cells_first,
const bool  unique_faces_only 
)

The function called by loop() to perform the required actions on a cell and its faces. The three functions cell_worker, boundary_worker and face_worker are the same ones handed to loop(). While there we only run the loop over all cells, here, we do a single cell and, if necessary, its faces, interior and boundary.

Upon return, the DoFInfo objects in the DoFInfoBox are filled with the data computed on the cell and each of the faces. Thus, after the execution of this function, we are ready to call DoFInfoBox::assemble() to distribute the local data into global data.

Parameters
cellis the cell we work on
dof_infois the object into which local results are entered. It is expected to have been set up for the right types of data.
infois the object containing additional data only needed for internal processing.
cell_workerdefines the local action on each cell.
boundary_workerdefines the local action on boundary faces
face_workerdefines the local action on interior faces.
cells_firstdetermines, whether, on a given cell, face or cell integrals are to be dealt with first. Note that independent of the value of this flag, cell and face integrals of a given cell are all taken care of before moving to the next cell.
unique_faces_onlydetermines, that a face between two cells of the same level is processed only from the cell which is less than its neighbor. If this parameter is false these faces are processed from both cells.
Author
Guido Kanschat
Date
2010

Definition at line 109 of file loop.h.

template<int dim, int spacedim, class DOFINFO , class INFOBOX , class ASSEMBLER , class ITERATOR >
void MeshWorker::loop ( ITERATOR  begin,
typename identity< ITERATOR >::type  end,
DOFINFO &  dinfo,
INFOBOX &  info,
const std_cxx1x::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &  cell_worker,
const std_cxx1x::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &  boundary_worker,
const std_cxx1x::function< void(DOFINFO &, DOFINFO &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &  face_worker,
ASSEMBLER &  assembler,
bool  cells_first = true,
bool  unique_faces_only = true 
)

The main work function of this namespace. It is a loop over all cells in an iterator range, in which cell_action() is called for each cell. Unilaterally refined interior faces are handled automatically by the loop. Most of the work in this loop is done in cell_action(), which also receives most of the parameters of this function. See the documentation there for more details.

If you don't want anything to be done on cells, interior or boundary faces to happen, simply pass the Null pointer to one of the function arguments.

Author
Guido Kanschat, 2009

Definition at line 255 of file loop.h.

template<int dim, int spacedim, class ITERATOR , class ASSEMBLER >
void MeshWorker::integration_loop ( ITERATOR  begin,
typename identity< ITERATOR >::type  end,
DoFInfo< dim, spacedim > &  dof_info,
IntegrationInfoBox< dim, spacedim > &  box,
const std_cxx1x::function< void(DoFInfo< dim > &, IntegrationInfo< dim, spacedim > &)> &  cell_worker,
const std_cxx1x::function< void(DoFInfo< dim > &, IntegrationInfo< dim, spacedim > &)> &  boundary_worker,
const std_cxx1x::function< void(DoFInfo< dim > &, DoFInfo< dim > &, IntegrationInfo< dim, spacedim > &, IntegrationInfo< dim, spacedim > &)> &  face_worker,
ASSEMBLER &  assembler,
bool  cells_first = true 
)
Deprecated:
The simplification in this loop is insignificant. Therefore, it is recommended to use loop() instead.

Simplified interface for loop() if specialized for integration.

Author
Guido Kanschat, 2009

Definition at line 322 of file loop.h.

template<int dim, int spacedim, class ITERATOR , class ASSEMBLER >
void MeshWorker::integration_loop ( ITERATOR  begin,
typename identity< ITERATOR >::type  end,
DoFInfo< dim, spacedim > &  dof_info,
IntegrationInfoBox< dim, spacedim > &  box,
const LocalIntegrator< dim, spacedim > &  integrator,
ASSEMBLER &  assembler,
bool  cells_first = true 
)

Simplified interface for loop() if specialized for integration, using the virtual functions in LocalIntegrator.

Author
Guido Kanschat, 2009

Definition at line 354 of file loop.h.