OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Functions
MeshWorker Namespace Reference

A collection of functions and classes for the mesh loops that are an ubiquitous part of each finite element program. More...

Namespaces

namespace  Assembler
 The namespace containing objects that can be used to assemble data computed on cells and faces into global objects.
 
namespace  InfoObjects
 
namespace  internal
 
namespace  WorkerObjects
 

Classes

struct  BlockInfo
 A small structure collecting the different BlockIndices of FEVector vectors (for instance, solution) involved in the computations. More...
 
class  VectorSelector
 A class that selects the named FEVector vectors in FEVectors and assigns the types of information extracted. More...
 

Functions

unsigned int selector_size (const VectorSelector &s, const std::vector< double > &)
 Additionally to the VectorSelector class we collect some helper functions that choose the right access functions in the VectorSelector class itself depending on the data type being used.
 
template<int dim>
unsigned int selector_size (const VectorSelector &s, const std::vector< Tensor< 1, dim > > &)
 
template<int dim>
unsigned int selector_size (const VectorSelector &s, const std::vector< Tensor< 2, dim > > &)
 
unsigned int selector_index (const VectorSelector &s, unsigned int i, const std::vector< double > &)
 
template<int dim>
unsigned int selector_index (const VectorSelector &s, unsigned int i, const std::vector< Tensor< 1, dim > > &)
 
template<int dim>
unsigned int selector_index (const VectorSelector &s, unsigned int i, const std::vector< Tensor< 2, dim > > &)
 
template<class ITERATOR , class ENDITERATOR , class CELLINFO , class FACEINFO , class LOCALWORKER >
void loop (ITERATOR begin, ENDITERATOR end, CELLINFO &cellinfo, FACEINFO &bdryinfo, FACEINFO &faceinfo, FACEINFO &subfaceinfo, FACEINFO &ngbrinfo, LOCALWORKER &localworker, bool cells_first=true)
 The main work function of this namespace.
 
template<int dim, class ITERATOR , class ENDITERATOR , class LOCALWORKER >
void integration_loop (ITERATOR begin, ENDITERATOR end, InfoObjects::IntegrationInfoBox< dim > &box, LOCALWORKER &localworker, bool cells_first=true)
 Simplified interface for loop() if specialized for integration.
 

Detailed Description

A collection of functions and classes for the mesh loops that are an ubiquitous part of each finite element program.

The workhorse of this namespace is the loop() function, which implements a completely generic loop over all mesh entities (cells and faces).

The loop() depends on certain objects handed to it as arguments. These objects can be structured into categories corresponding to the namespaces where they are defined.

Author
Guido Kanschat, 2009 InfoObjects provide the data used by other MeshWorker objects.

They can be considered as an extension of mesh Iterators in the sense that they are updated for each mesh cell or face, and provide additional data on these mesh entities.

Author
Guido Kanschat, 2009

The workhorse of this namespace is the loop() function, which implements a completely generic loop over all mesh entities (cells and faces).

The loop() depends on certain objects handed to it as arguments. These objects can be structured into categories corresponding to the namespaces where they are defined.

Author
Guido Kanschat, 2009

Function Documentation

template<int dim, class ITERATOR , class ENDITERATOR , class LOCALWORKER >
void MeshWorker::integration_loop ( ITERATOR  begin,
ENDITERATOR  end,
InfoObjects::IntegrationInfoBox< dim > &  box,
LOCALWORKER &  localworker,
bool  cells_first = true 
)
template<class ITERATOR , class ENDITERATOR , class CELLINFO , class FACEINFO , class LOCALWORKER >
void MeshWorker::loop ( ITERATOR  begin,
ENDITERATOR  end,
CELLINFO &  cellinfo,
FACEINFO &  bdryinfo,
FACEINFO &  faceinfo,
FACEINFO &  subfaceinfo,
FACEINFO &  ngbrinfo,
LOCALWORKER &  localworker,
bool  cells_first = true 
)

The main work function of this namespace.

Its action consists of two loops.

First, a loop over all cells in the iterator range is performed, in each step updating the CellInfo object, then calling LocalWorker::cell() with this object.

In the second loop, we work through all the faces of cells in the iterator range. The functions LocalWorker::bdry() and LocalWorker::face() are called for each boundary and interior face, respectively. Unilaterally refined interior faces are handled automatically by the loop.

The extend of the second loop will be determined by the two control variables LocalWorker::boundary_fluxes and LocalWorker::interior_fluxes.

References MeshWorker::internal::is_active_iterator().

Referenced by integration_loop().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int MeshWorker::selector_index ( const VectorSelector s,
unsigned int  i,
const std::vector< double > &   
)
inline

References MeshWorker::VectorSelector::value_index().

Referenced by MeshWorker::InfoObjects::IntegrationInfo< dim, FEVALUESBASE >::fill_local_data().

Here is the call graph for this function:

Here is the caller graph for this function:

template<int dim>
unsigned int MeshWorker::selector_index ( const VectorSelector s,
unsigned int  i,
const std::vector< Tensor< 1, dim > > &   
)
inline

References MeshWorker::VectorSelector::gradient_index().

Here is the call graph for this function:

template<int dim>
unsigned int MeshWorker::selector_index ( const VectorSelector s,
unsigned int  i,
const std::vector< Tensor< 2, dim > > &   
)
inline

References MeshWorker::VectorSelector::hessian_index().

Here is the call graph for this function:

unsigned int MeshWorker::selector_size ( const VectorSelector s,
const std::vector< double > &   
)
inline

Additionally to the VectorSelector class we collect some helper functions that choose the right access functions in the VectorSelector class itself depending on the data type being used.

Note that the last argument of these helper functions is never used. It is there just for the type identification.

References MeshWorker::VectorSelector::n_values().

Referenced by MeshWorker::InfoObjects::IntegrationInfo< dim, FEVALUESBASE >::fill_local_data().

Here is the call graph for this function:

Here is the caller graph for this function:

template<int dim>
unsigned int MeshWorker::selector_size ( const VectorSelector s,
const std::vector< Tensor< 1, dim > > &   
)
inline

References MeshWorker::VectorSelector::n_gradients().

Here is the call graph for this function:

template<int dim>
unsigned int MeshWorker::selector_size ( const VectorSelector s,
const std::vector< Tensor< 2, dim > > &   
)
inline

References MeshWorker::VectorSelector::n_hessians().

Here is the call graph for this function: