MeshWorker::LocalResults< number > Class Template Reference
[The MeshWorker interface]

Inheritance diagram for MeshWorker::LocalResults< number >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

void initialize_numbers (const unsigned int n)
void initialize_vectors (const unsigned int n)
void initialize_matrices (unsigned int n, bool both)
template<class MATRIX>
void initialize_matrices (const MatrixBlockVector< MATRIX > &matrices, bool both)
void initialize_quadrature (unsigned int np, unsigned int nv)
void reinit (const BlockIndices &local_sizes)
unsigned int n_values () const
unsigned int n_vectors () const
unsigned int n_matrices () const
unsigned int n_quadrature_points () const
unsigned int n_quadrature_values () const
number & value (unsigned int i)
number value (unsigned int i) const
BlockVector< number > & vector (unsigned int i)
const BlockVector< number > & vector (unsigned int i) const
MatrixBlock< FullMatrix
< number > > & 
matrix (unsigned int i, bool external=false)
const MatrixBlock< FullMatrix
< number > > & 
matrix (unsigned int i, bool external=false) const
number & quadrature_value (unsigned int k, unsigned int i)
number quadrature_value (unsigned int k, unsigned int i) const

Private Member Functions

void initialize_local (MatrixBlock< FullMatrix< number > > &M, const unsigned int row, const unsigned int col)

Private Attributes

std::vector< number > J
std::vector< BlockVector
< number > > 
R
std::vector< MatrixBlock
< FullMatrix< number > > > 
M1
std::vector< MatrixBlock
< FullMatrix< number > > > 
M2
std::vector< std::vector
< number > > 
quadrature_values


Detailed Description

template<typename number>
class MeshWorker::LocalResults< number >

The class providing the scrapbook to fill with local integration results. These can be values, local contributions to forms or cell and face matrices.

The local matrices initialized by reinit() of the info object and then assembled into the global system by Assembler classes.

Author:
Guido Kanschat, 2009

Member Function Documentation

template<typename number>
void MeshWorker::LocalResults< number >::initialize_local ( MatrixBlock< FullMatrix< number > > &  M,
const unsigned int  row,
const unsigned int  col 
) [private]

Initialize a single local matrix block. A helper function for initialize()

template<typename number>
void MeshWorker::LocalResults< number >::initialize_numbers ( const unsigned int  n  )  [inline]

template<typename number>
void MeshWorker::LocalResults< number >::initialize_vectors ( const unsigned int  n  )  [inline]

template<typename number>
void MeshWorker::LocalResults< number >::initialize_matrices ( unsigned int  n,
bool  both 
) [inline]

Allocate n local matrices. Additionally, set their block row and column coordinates to zero. The matrices themselves are resized by reinit().

The template parameter MatrixPtr should point to a MatrixBlock instantiation in order to provide row and column info.

References MeshWorker::LocalResults< number >::M1, and MeshWorker::LocalResults< number >::M2.

template<typename number>
template<class MATRIX>
void MeshWorker::LocalResults< number >::initialize_matrices ( const MatrixBlockVector< MATRIX > &  matrices,
bool  both 
) [inline]

Allocate a local matrix for each of the global ones in matrices. Additionally, set their block row and column coordinates. The matrices themselves are resized by reinit().

The template parameter MatrixPtr should point to a MatrixBlock instantiation in order to provide row and column info.

References MatrixBlockVector< MATRIX >::block(), MeshWorker::LocalResults< number >::M1, MeshWorker::LocalResults< number >::M2, and NamedData< std_cxx1x::shared_ptr< MatrixBlock< MATRIX > > >::size().

template<typename number>
void MeshWorker::LocalResults< number >::initialize_quadrature ( unsigned int  np,
unsigned int  nv 
) [inline]

Initialize quadrature values to nv values in np quadrature points.

References MeshWorker::LocalResults< number >::quadrature_values.

Referenced by MeshWorker::Assembler::GnuplotPatch::initialize_info().

template<typename number>
void MeshWorker::LocalResults< number >::reinit ( const BlockIndices local_sizes  ) 

Reinitialize matrices for new cell. Resizes the matrices for hp and sets them to zero.

template<typename number>
unsigned int MeshWorker::LocalResults< number >::n_values (  )  const [inline]

The number of scalar values.

References MeshWorker::LocalResults< number >::J.

template<typename number>
unsigned int MeshWorker::LocalResults< number >::n_vectors (  )  const [inline]

The number of vectors.

References MeshWorker::LocalResults< number >::R.

template<typename number>
unsigned int MeshWorker::LocalResults< number >::n_matrices (  )  const [inline]

The number of matrices.

References MeshWorker::LocalResults< number >::M1.

template<typename number>
unsigned int MeshWorker::LocalResults< number >::n_quadrature_points (  )  const [inline]

template<typename number>
unsigned int MeshWorker::LocalResults< number >::n_quadrature_values (  )  const [inline]

template<typename number>
number & MeshWorker::LocalResults< number >::value ( unsigned int  i  )  [inline]

Access scalar value at index i.

References AssertIndexRange, and MeshWorker::LocalResults< number >::J.

template<typename number>
number MeshWorker::LocalResults< number >::value ( unsigned int  i  )  const [inline]

Read scalar value at index i.

References AssertIndexRange, and MeshWorker::LocalResults< number >::J.

template<typename number>
BlockVector< number > & MeshWorker::LocalResults< number >::vector ( unsigned int  i  )  [inline]

Access vector at index i.

References AssertIndexRange, and MeshWorker::LocalResults< number >::R.

template<typename number>
const BlockVector< number > & MeshWorker::LocalResults< number >::vector ( unsigned int  i  )  const [inline]

Read vector at index i.

References AssertIndexRange, and MeshWorker::LocalResults< number >::R.

template<typename number>
MatrixBlock< FullMatrix< number > > & MeshWorker::LocalResults< number >::matrix ( unsigned int  i,
bool  external = false 
) [inline]

Access matrix at index i. For results on internal faces, a true value for external refers to the flux between cells, while false refers to entries coupling inside the cell.

References AssertIndexRange, MeshWorker::LocalResults< number >::M1, and MeshWorker::LocalResults< number >::M2.

template<typename number>
const MatrixBlock< FullMatrix< number > > & MeshWorker::LocalResults< number >::matrix ( unsigned int  i,
bool  external = false 
) const [inline]

Read matrix at index i. For results on internal faces, a true value for external refers to the flux between cells, while false refers to entries coupling inside the cell.

References AssertIndexRange, MeshWorker::LocalResults< number >::M1, and MeshWorker::LocalResults< number >::M2.

template<typename number>
number & MeshWorker::LocalResults< number >::quadrature_value ( unsigned int  k,
unsigned int  i 
) [inline]

Access the ith value at quadrature point k

References AssertIndexRange, and MeshWorker::LocalResults< number >::quadrature_values.

Referenced by MeshWorker::Assembler::GnuplotPatch::assemble().

template<typename number>
number MeshWorker::LocalResults< number >::quadrature_value ( unsigned int  k,
unsigned int  i 
) const [inline]

Read the ith value at quadrature point k

References AssertIndexRange, and MeshWorker::LocalResults< number >::quadrature_values.


Member Data Documentation

template<typename number>
std::vector<number> MeshWorker::LocalResults< number >::J [private]

template<typename number>
std::vector<BlockVector<number> > MeshWorker::LocalResults< number >::R [private]

The local vectors. This field is public, so that local integrators can write to it.

Referenced by MeshWorker::LocalResults< number >::initialize_vectors(), MeshWorker::LocalResults< number >::n_vectors(), and MeshWorker::LocalResults< number >::vector().

template<typename number>
std::vector<MatrixBlock<FullMatrix<number> > > MeshWorker::LocalResults< number >::M1 [private]

The local matrices coupling degrees of freedom in the cell itself or within the first cell on a face.

Referenced by MeshWorker::LocalResults< number >::initialize_matrices(), MeshWorker::LocalResults< number >::matrix(), and MeshWorker::LocalResults< number >::n_matrices().

template<typename number>
std::vector<MatrixBlock<FullMatrix<number> > > MeshWorker::LocalResults< number >::M2 [private]

The local matrices coupling test functions on the cell with trial functions on the other cell.

Only used on interior faces.

Referenced by MeshWorker::LocalResults< number >::initialize_matrices(), and MeshWorker::LocalResults< number >::matrix().

template<typename number>
std::vector<std::vector<number> > MeshWorker::LocalResults< number >::quadrature_values [private]


The documentation for this class was generated from the following file:

deal.II documentation generated on Wed Jul 28 23:06:55 2010 by doxygen 1.5.6