//---------------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
std::vector<unsigned int> indices;
/**
- * The DoF indices on the
- * current cell, organized by
- * local blocks
+ * The DoF indices on the current cell, organized by local blocks.
+ * The size of this vector is zero, unless local blocks are used.
*/
std::vector<std::vector<unsigned int> > indices_by_block;
void reinit(const DHCellIterator &c);
/**
- * Set the current face and
- * fill @p indices if the #cell
- * changed.
+ * Set the current face and fill @p indices if the #cell changed.
*/
template <class DHCellIterator, class DHFaceIterator>
void reinit(const DHCellIterator &c,
const unsigned int n);
/**
- * Set the current subface
- * and fill @p indices if the
- * #cell changed.
+ * Set the current subface and fill @p indices if the #cell
+ * changed.
*/
template <class DHCellIterator, class DHFaceIterator>
void reinit(const DHCellIterator &c,
const unsigned int s);
/**
- * Switch to a new face of the
- * same cell. Does not change
- * @p indices and does not reset
- * data in LocalResults.
+ * Switch to a new face of the same cell. Does not change @p
+ * indices and does not reset data in LocalResults.
*/
template <class DHFaceIterator>
void set_face (const DHFaceIterator &f,
const unsigned int n);
+
/**
- * Switch to a new subface of the
- * same cell. Does not change
- * @p indices and does not reset
- * data in LocalResults.
+ * Switch to a new subface of the same cell. Does not change @p
+ * indices and does not reset data in LocalResults.
*/
template <class DHFaceIterator>
void set_subface (const DHFaceIterator &f,
bool level_cell;
private:
/**
- * Standard constructor, not
- * setting any block
- * indices. Use of this
- * constructor is not
- * recommended, but it is
- * needed for the arrays in
- * DoFInfoBox.
+ * Standard constructor, not setting any block indices. Use of
+ * this constructor is not recommended, but it is needed for the
+ * arrays in DoFInfoBox.
*/
DoFInfo ();
template <class DHCellIterator>
void get_indices(const DHCellIterator &c);
- /// Fill index vector with level indices
- //void get_indices(const typename MGDoFHandler<dim, spacedim>::cell_iterator& c);
-
/// Auxiliary vector
std::vector<unsigned int> indices_org;
void initialize(const ConstraintMatrix &constraints);
/**
+ * @deprecated This function is of no effect. Only the block info
+ * structure in DoFInfo is being used.
+ *
* Store information on the local block structure. If the
* assembler is inititialized with this function,
* initialize_info() will generate one local matrix for each
void initialize_local_blocks(const BlockIndices &local_indices);
/**
- * Initialize the local data
- * in the DoFInfo object used
- * later for assembling.
+ * Initialize the local data in the DoFInfo object used later
+ * for assembling.
*
- * The info object refers to
- * a cell if
- * <code>!face</code>, or
- * else to an interior or
- * boundary face.
+ * The info object refers to a cell if <code>!face</code>, or
+ * else to an interior or boundary face.
*/
template <class DOFINFO>
void initialize_info(DOFINFO &info, bool face) const;
*/
SmartPointer<const ConstraintMatrix,MatrixSimple<MATRIX> > constraints;
- /**
- * The object containing the local block structure. Set by
- * initialize_local_blocks() and used by assembling functions.
- */
- BlockIndices local_indices;
-
/**
* The smallest positive number that will be entered into the
* global matrix. All smaller absolute values will be treated as
template <class MATRIX>
inline void
- MatrixSimple<MATRIX>::initialize_local_blocks(const BlockIndices &b)
- {
- local_indices = b;
- }
+ MatrixSimple<MATRIX>::initialize_local_blocks(const BlockIndices &)
+ {}
template <class MATRIX >
inline void
MatrixSimple<MATRIX>::initialize_info(DOFINFO &info, bool face) const
{
- const unsigned int n = local_indices.size();
+ const unsigned int n = dof_info.indices_by_block.size();
if (n == 0)
info.initialize_matrices(1, face);
{
Assert(!info.level_cell, ExcMessage("Cell may not access level dofs"));
- if (local_indices.size() == 0)
+ if (info.indices_by_block.size() == 0)
assemble(info.matrix(0,false).matrix, info.indices, info.indices);
else
{
Assert(!info1.level_cell, ExcMessage("Cell may not access level dofs"));
Assert(!info2.level_cell, ExcMessage("Cell may not access level dofs"));
- if (local_indices.size() == 0)
+ if (info1.indices_by_block.size() == 0 && info2.indices_by_block.size() == 0)
{
assemble(info1.matrix(0,false).matrix, info1.indices, info1.indices);
assemble(info1.matrix(0,true).matrix, info1.indices, info2.indices);
assemble(info2.matrix(0,false).matrix, info2.indices, info2.indices);
assemble(info2.matrix(0,true).matrix, info2.indices, info1.indices);
}
- else
+ else if (info1.indices_by_block.size() != 0 && info2.indices_by_block.size() != 0)
for (unsigned int k=0; k<info1.n_matrices(); ++k)
{
const unsigned int row = info1.matrix(k,false).row;
assemble(info2.matrix(k,true).matrix,
info2.indices_by_block[row], info1.indices_by_block[column]);
}
+ else
+ {
+ Assert(false, ExcNotImplemented());
+ }
}