Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes

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

List of all members.

Public Member Functions

 IntegrationInfo ()
 IntegrationInfo (const IntegrationInfo< dim, spacedim > &other)
template<class FEVALUES >
void initialize (const FiniteElement< dim, spacedim > &el, const Mapping< dim, spacedim > &mapping, const Quadrature< FEVALUES::integral_dimension > &quadrature, const UpdateFlags flags, const BlockInfo *local_block_info=0)
void initialize_data (const std_cxx1x::shared_ptr< VectorDataBase< dim, spacedim > > &data)
void clear ()
const FEValuesBase< dim,
spacedim > & 
fe_values () const
 Access to finite element.
const FEValuesBase< dim,
spacedim > & 
fe_values (const unsigned int i) const
 Access to finite elements.
void reinit (const DoFInfo< dim, spacedim > &i)
template<typename number >
void fill_local_data (const DoFInfo< dim, spacedim, number > &info, bool split_fevalues)
std::size_t memory_consumption () const
template<>
 IntegrationInfo (const IntegrationInfo< 1, 1 > &other)
template<>
 IntegrationInfo (const IntegrationInfo< 1, 2 > &other)
template<>
void reinit (const DoFInfo< 1, 1 > &info)
template<>
void reinit (const DoFInfo< 1, 2 > &info)

Public Attributes

bool multigrid
 This is true if we are assembling for multigrid.
std::vector< std::vector
< std::vector< double > > > 
values
std::vector< std::vector
< std::vector< Tensor< 1, dim > > > > 
gradients
std::vector< std::vector
< std::vector< Tensor< 2, dim > > > > 
hessians
std_cxx1x::shared_ptr
< VectorDataBase< dim,
spacedim > > 
global_data

Static Public Attributes

static const unsigned int dimension = dim
static const unsigned int space_dimension = spacedim

Private Member Functions

template<typename TYPE >
void fill_local_data (std::vector< std::vector< std::vector< TYPE > > > &data, VectorSelector &selector, bool split_fevalues) const

Private Attributes

std::vector
< std_cxx1x::shared_ptr
< FEValuesBase< dim, spacedim > > > 
fevalv
 vector of FEValues objects
unsigned int n_components

Detailed Description

template<int dim, int spacedim = dim>
class MeshWorker::IntegrationInfo< dim, spacedim >

Class for objects handed to local integration functions.

Objects of this class contain one or more objects of type FEValues, FEFaceValues or FESubfacevalues to be used in local integration. They are stored in an array of pointers to the base classes FEValuesBase for cells and FEFaceValuesBase for faces and subfaces, respectively. The template parameter VECTOR allows the use of different data types for the global system.

The FEVALUESBASE template parameter should be either FEValuesBase or FEFaceValuesBase, depending on whether the object is used to integrate over cells or faces. The actual type of FEVALUES object is fixed in the constructor and only used to initialize the pointers in fevalv.

Additionally, this function containes space to store the values of finite element functions stored in global_data in the quadrature points. These vectors are initialized automatically on each cell or face. In order to avoid initializing unused vectors, you can use initialize_selector() to select the vectors by name that you actually want to use.

Integration models

This class supports two local integration models, corresponding to the data models in the documentation of the Assembler namespace. One is the standard model suggested by the use of FESystem. Namely, there is one FEValuseBase object in this class, containing all shape functions of the whole system, and having as many components as the system. Using this model involves loops over all system shape functions. It requires to identify the system components for each shape function and to select the correct bilinear form, usually in an if or switch statement.

The second integration model builds one FEValuesBase object per base element of the system. The degrees of freedom on each cell are renumbered by block, such that they represent the same block structure as the global system. Objects performing the integration can then process each block separately, which improves reusability of code considerably.

Note:
As described in DoFInfo, the use of the local block model is triggered by calling BlockInfo::initialize_local() before using initialize() in this class.
Author:
Guido Kanschat, 2009

Definition at line 80 of file integration_info.h.


Constructor & Destructor Documentation

template<int dim, int sdim>
MeshWorker::IntegrationInfo< dim, sdim >::IntegrationInfo (  ) [inline]

Constructor.

Definition at line 700 of file integration_info.h.

template<int dim, int sdim>
MeshWorker::IntegrationInfo< dim, sdim >::IntegrationInfo ( const IntegrationInfo< dim, sdim > &  other ) [inline]
template<>
MeshWorker::IntegrationInfo< 1, 1 >::IntegrationInfo ( const IntegrationInfo< 1, 1 > &  other ) [inline]
template<>
MeshWorker::IntegrationInfo< 1, 2 >::IntegrationInfo ( const IntegrationInfo< 1, 2 > &  other ) [inline]

Member Function Documentation

template<int dim, int sdim>
template<class FEVALUES >
void MeshWorker::IntegrationInfo< dim, sdim >::initialize ( const FiniteElement< dim, sdim > &  el,
const Mapping< dim, sdim > &  mapping,
const Quadrature< FEVALUES::integral_dimension > &  quadrature,
const UpdateFlags  flags,
const BlockInfo local_block_info = 0 
) [inline]

Build all internal structures, in particular the FEValuesBase objects and allocate space for data vectors.

Parameters:
elis the finite element of the DoFHandler.
mappingis the Mapping object used to map the mesh cells.
quadratureis a Quadrature formula used in the constructor of the FEVALUES objects.
flagsare the UpdateFlags used in the constructor of the FEVALUES objects.
local_block_infois an optional parameter for systems of PDE. If it is provided with reasonable data, then the degrees of freedom on the cells will be re-ordered to reflect the block structure of the system.

Definition at line 834 of file integration_info.h.

References FiniteElement< dim, spacedim >::base_element(), BlockInfo::local(), FiniteElement< dim, spacedim >::n_base_elements(), FiniteElementData< dim >::n_components(), and BlockIndices::size().

template<int dim, int spacedim = dim>
void MeshWorker::IntegrationInfo< dim, spacedim >::initialize_data ( const std_cxx1x::shared_ptr< VectorDataBase< dim, spacedim > > &  data )

Initialize the data vector and cache the selector.

template<int dim, int spacedim = dim>
void MeshWorker::IntegrationInfo< dim, spacedim >::clear (  )

Delete the data created by initialize().

template<int dim, int spacedim>
const FEValuesBase< dim, spacedim > & MeshWorker::IntegrationInfo< dim, spacedim >::fe_values (  ) const [inline]

Access to finite element.

This is the access function being used, if the constructor for a single element was used. It throws an exception, if applied to a vector of elements.

Definition at line 862 of file integration_info.h.

References AssertDimension.

template<int dim, int spacedim>
const FEValuesBase< dim, spacedim > & MeshWorker::IntegrationInfo< dim, spacedim >::fe_values ( const unsigned int  i ) const [inline]

Access to finite elements.

This access function must be used if the constructor for a group of elements was used.

See also:
DGBlockSplitApplication

Definition at line 871 of file integration_info.h.

References Assert, and StandardExceptions::ExcIndexRange().

template<int dim, int spacedim>
void MeshWorker::IntegrationInfo< dim, spacedim >::reinit ( const DoFInfo< dim, spacedim > &  i ) [inline]
template<int dim, int spacedim = dim>
template<typename number >
void MeshWorker::IntegrationInfo< dim, spacedim >::fill_local_data ( const DoFInfo< dim, spacedim, number > &  info,
bool  split_fevalues 
)

Use the finite element functions in global_data and fill the vectors values, gradients and hessians.

template<int dim, int spacedim = dim>
std::size_t MeshWorker::IntegrationInfo< dim, spacedim >::memory_consumption (  ) const

The memory used by this object.

template<int dim, int spacedim = dim>
template<typename TYPE >
void MeshWorker::IntegrationInfo< dim, spacedim >::fill_local_data ( std::vector< std::vector< std::vector< TYPE > > > &  data,
VectorSelector selector,
bool  split_fevalues 
) const [private]

Use the finite element functions in global_data and fill the vectors values, gradients and hessians with values according to the selector.

template<>
void MeshWorker::IntegrationInfo< 1, 1 >::reinit ( const DoFInfo< 1, 1 > &  info ) [inline]
template<>
void MeshWorker::IntegrationInfo< 1, 2 >::reinit ( const DoFInfo< 1, 2 > &  info ) [inline]

Member Data Documentation

template<int dim, int spacedim = dim>
std::vector<std_cxx1x::shared_ptr<FEValuesBase<dim, spacedim> > > MeshWorker::IntegrationInfo< dim, spacedim >::fevalv [private]

vector of FEValues objects

Definition at line 84 of file integration_info.h.

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

template<int dim, int spacedim = dim>
const unsigned int MeshWorker::IntegrationInfo< dim, spacedim >::dimension = dim [static]

Definition at line 86 of file integration_info.h.

template<int dim, int spacedim = dim>
const unsigned int MeshWorker::IntegrationInfo< dim, spacedim >::space_dimension = spacedim [static]

Definition at line 87 of file integration_info.h.

template<int dim, int spacedim = dim>
bool MeshWorker::IntegrationInfo< dim, spacedim >::multigrid

This is true if we are assembling for multigrid.

Definition at line 154 of file integration_info.h.

template<int dim, int spacedim = dim>
std::vector<std::vector<std::vector<double> > > MeshWorker::IntegrationInfo< dim, spacedim >::values

The vector containing the values of finite element functions in the quadrature points.

There is one vector per selected finite element function, containing one vector for each component, containing vectors with values for each quadrature point.

Definition at line 192 of file integration_info.h.

template<int dim, int spacedim = dim>
std::vector<std::vector<std::vector<Tensor<1,dim> > > > MeshWorker::IntegrationInfo< dim, spacedim >::gradients

The vector containing the derivatives of finite element functions in the quadrature points.

There is one vector per selected finite element function, containing one vector for each component, containing vectors with values for each quadrature point.

Definition at line 208 of file integration_info.h.

template<int dim, int spacedim = dim>
std::vector<std::vector<std::vector<Tensor<2,dim> > > > MeshWorker::IntegrationInfo< dim, spacedim >::hessians

The vector containing the second derivatives of finite element functions in the quadrature points.

There is one vector per selected finite element function, containing one vector for each component, containing vectors with values for each quadrature point.

Definition at line 224 of file integration_info.h.

template<int dim, int spacedim = dim>
std_cxx1x::shared_ptr<VectorDataBase<dim, spacedim> > MeshWorker::IntegrationInfo< dim, spacedim >::global_data

The global data vector used to compute function values in quadrature points.

Definition at line 248 of file integration_info.h.

template<int dim, int spacedim = dim>
unsigned int MeshWorker::IntegrationInfo< dim, spacedim >::n_components [private]

Cache the number of components of the system element.

Definition at line 274 of file integration_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