#include <fstream>
+
+/* --------------------- MGTransferPrebuilt -------------- */
+
+
//TODO[GK]: this file must really be changed: it contains #if's for deal_II_dimension, but we can't use this in headers, since application programs might not use this way to select the dimension. the only way in header files is to have proper template specializations
// the respective vector on the
// next finer level, which we then
// already have built.
- for (int level=maxlevel; level>=static_cast<int>(minlevel); --level)
+ for (int level=maxlevel; level>=static_cast<signed int>(minlevel); --level)
{
typename MGDoFHandler<dim>::active_cell_iterator
level_cell = mg_dof_handler.begin_active(level);
template <typename number>
template <int dim, class OutVector>
void
-MGTransferPrebuilt<number>::copy_from_mg(
- const MGDoFHandler<dim>& mg_dof_handler,
- OutVector &dst,
- const MGLevelObject<Vector<number> > &src) const
+MGTransferPrebuilt<number>::
+copy_from_mg(const MGDoFHandler<dim> &mg_dof_handler,
+ OutVector &dst,
+ const MGLevelObject<Vector<number> > &src) const
{
const unsigned int dofs_per_cell = mg_dof_handler.get_fe().dofs_per_cell;
// data appropriately to the output
// vector
- // Is the level monotonuosly increasing?
-
+ // Note that the level is
+ // monotonuosly increasing
for (; level_cell != endc; ++level_cell)
{
DoFObjectAccessor<dim, dim>& global_cell = *level_cell;
//TODO:[GK] constraints->set_zero(dst);
}
+
+
template <typename number>
template <int dim, class OutVector>
void
-MGTransferPrebuilt<number>::copy_from_mg_add(
- const MGDoFHandler<dim>& mg_dof_handler,
- OutVector &dst,
- const MGLevelObject<Vector<number> > &src) const
+MGTransferPrebuilt<number>::
+copy_from_mg_add (const MGDoFHandler<dim> &mg_dof_handler,
+ OutVector &dst,
+ const MGLevelObject<Vector<number> > &src) const
{
const unsigned int dofs_per_cell = mg_dof_handler.get_fe().dofs_per_cell;
// data appropriately to the output
// vector
- // Is the level monotonuosly increasing?
-
+ // Note that the level is
+ // monotonuosly increasing
for (; level_cell != endc; ++level_cell)
{
DoFObjectAccessor<dim, dim>& global_cell = *level_cell;
}
+
+/* --------------------- MGTransferSelect -------------- */
+
+
//TODO:[?] This function needs to be specially implemented, since in 2d mode we use faces
#if deal_II_dimension == 1
template <typename number>
template <int dim, class InVector>
void
-MGTransferSelect<number>::copy_to_mg (
- const MGDoFHandler<dim>&,
- MGLevelObject<Vector<number> >&,
- const InVector&) const
+MGTransferSelect<number>::
+copy_to_mg (const MGDoFHandler<dim> &,
+ MGLevelObject<Vector<number> > &,
+ const InVector &) const
{
Assert(false, ExcNotImplemented());
}
template <typename number>
template <int dim, class InVector>
void
-MGTransferSelect<number>::copy_to_mg (
- const MGDoFHandler<dim>& mg_dof_handler,
- MGLevelObject<Vector<number> >& dst,
- const InVector& osrc) const
+MGTransferSelect<number>::
+copy_to_mg (const MGDoFHandler<dim> &mg_dof_handler,
+ MGLevelObject<Vector<number> > &dst,
+ const InVector &osrc) const
{
// Make src a real finite element function
InVector src = osrc;
// the respective vector on the
// next finer level, which we then
// already have built.
- for (int level=maxlevel; level>=static_cast<int>(minlevel); --level)
+ for (int level=maxlevel; level>=static_cast<signed int>(minlevel); --level)
{
// Start of treated component
// for this level
template <typename number>
template <int dim, class OutVector>
void
-MGTransferSelect<number>::copy_from_mg(
- const MGDoFHandler<dim>& mg_dof_handler,
- OutVector &dst,
- const MGLevelObject<Vector<number> > &src) const
+MGTransferSelect<number>::
+copy_from_mg (const MGDoFHandler<dim> &mg_dof_handler,
+ OutVector &dst,
+ const MGLevelObject<Vector<number> > &src) const
{
const FiniteElement<dim>& fe = mg_dof_handler.get_fe();
// data appropriately to the output
// vector
- // Is the level monotonuosly increasing?
-
+ // Note that the level is
+ // monotonuosly increasing
for (; level_cell != endc; ++level_cell)
{
DoFObjectAccessor<dim, dim>& global_cell = *level_cell;
//TODO:[GK] constraints->set_zero(dst);
}
+
+
template <typename number>
template <int dim, class OutVector>
void
-MGTransferSelect<number>::copy_from_mg_add(
- const MGDoFHandler<dim>& mg_dof_handler,
- OutVector &dst,
- const MGLevelObject<Vector<number> > &src) const
+MGTransferSelect<number>::
+copy_from_mg_add (const MGDoFHandler<dim> &mg_dof_handler,
+ OutVector &dst,
+ const MGLevelObject<Vector<number> > &src) const
{
const FiniteElement<dim>& fe = mg_dof_handler.get_fe();
// data appropriately to the output
// vector
- // Is the level monotonuosly increasing?
-
+ // Note that the level is
+ // monotonuosly increasing
for (; level_cell != endc; ++level_cell)
{
DoFObjectAccessor<dim, dim>& global_cell = *level_cell;
}
+
+/* --------------------- MGTransferBlock -------------- */
+
+
#if deal_II_dimension == 1
template <typename number>
template <int dim, class InVector>
void
-MGTransferBlock<number>::copy_to_mg (
- const MGDoFHandler<dim>&,
- MGLevelObject<BlockVector<number> >&,
- const InVector&) const
+MGTransferBlock<number>::
+copy_to_mg (const MGDoFHandler<dim> &,
+ MGLevelObject<BlockVector<number> > &,
+ const InVector &) const
{
Assert(false, ExcNotImplemented());
}
template <typename number>
template <int dim, class InVector>
void
-MGTransferBlock<number>::copy_to_mg (
- const MGDoFHandler<dim>& mg_dof_handler,
- MGLevelObject<BlockVector<number> >& dst,
- const InVector& src) const
+MGTransferBlock<number>::
+copy_to_mg (const MGDoFHandler<dim> &mg_dof_handler,
+ MGLevelObject<BlockVector<number> > &dst,
+ const InVector &src) const
{
- // Make src a real finite element function
+ // Make src a real finite element
+ // function
// InVector src = osrc;
// constraints->distribute(src);
dst.clear();
-//TODO:[GK] Make sure dst is not too large ans sizes is filled
+//TODO:[GK] Make sure dst is not too large and sizes is filled
for (unsigned int l=minlevel;l<=maxlevel;++l)
dst[l].reinit(sizes[l]);
// the respective vector on the
// next finer level, which we then
// already have built.
- for (int level=maxlevel; level>=static_cast<int>(minlevel); --level)
+ for (int level=maxlevel; level>=static_cast<signed int>(minlevel); --level)
{
typename MGDoFHandler<dim>::active_cell_iterator
level_cell = mg_dof_handler.begin_active(level);
template <typename number>
template <int dim, class OutVector>
void
-MGTransferBlock<number>::copy_from_mg(
- const MGDoFHandler<dim>& mg_dof_handler,
- OutVector &dst,
- const MGLevelObject<BlockVector<number> > &src) const
+MGTransferBlock<number>::
+copy_from_mg (const MGDoFHandler<dim> &mg_dof_handler,
+ OutVector &dst,
+ const MGLevelObject<BlockVector<number> > &src) const
{
const FiniteElement<dim>& fe = mg_dof_handler.get_fe();
// data appropriately to the output
// vector
- // Is the level monotonuosly increasing?
-
+ // Note that level is monotonuosly
+ // increasing
for (; level_cell != endc; ++level_cell)
{
DoFObjectAccessor<dim, dim>& global_cell = *level_cell;
}
}
+
+
template <typename number>
template <int dim, class OutVector>
void
-MGTransferBlock<number>::copy_from_mg_add(
- const MGDoFHandler<dim>& mg_dof_handler,
- OutVector &dst,
- const MGLevelObject<BlockVector<number> > &src) const
+MGTransferBlock<number>::
+copy_from_mg_add (const MGDoFHandler<dim> &mg_dof_handler,
+ OutVector &dst,
+ const MGLevelObject<BlockVector<number> > &src) const
{
-
const FiniteElement<dim>& fe = mg_dof_handler.get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
// data appropriately to the output
// vector
- // Is the level monotonuosly increasing?
+ // Note that the level monotonuosly
+ // increasing
for (; level_cell != endc; ++level_cell)
{
DoFObjectAccessor<dim, dim>& global_cell = *level_cell;
*/
template<int dim, class InVector>
void
- copy_to_mg (const MGDoFHandler<dim>& mg_dof,
+ copy_to_mg (const MGDoFHandler<dim> &mg_dof,
MGLevelObject<Vector<number> > &dst,
- const InVector &src) const;
+ const InVector &src) const;
/**
* Transfer from multi-level vector to
*/
template<int dim, class OutVector>
void
- copy_from_mg (const MGDoFHandler<dim>& mg_dof,
- OutVector &dst,
+ copy_from_mg (const MGDoFHandler<dim> &mg_dof,
+ OutVector &dst,
const MGLevelObject<Vector<number> > &src) const;
/**
*/
template<int dim, class OutVector>
void
- copy_from_mg_add (const MGDoFHandler<dim>& mg_dof,
- OutVector &dst,
+ copy_from_mg_add (const MGDoFHandler<dim> &mg_dof,
+ OutVector &dst,
const MGLevelObject<Vector<number> > &src) const;
/**
/**
- * Implementation of matrix generation for @ref{MGTransferBlock} and @p{MGTransferSelected}.
+ * Implementation of matrix generation for @ref{MGTransferBlock} and
+ * @p{MGTransferSelected}.
*
* @author Guido Kanschat, 2001
*/
*/
template<int dim, class InVector>
void
- copy_to_mg (const MGDoFHandler<dim>& mg_dof,
- MGLevelObject<BlockVector<number> >& dst,
- const InVector& src) const;
+ copy_to_mg (const MGDoFHandler<dim> &mg_dof,
+ MGLevelObject<BlockVector<number> > &dst,
+ const InVector &src) const;
/**
* Transfer from multi-level vector to
*/
template<int dim, class OutVector>
void
- copy_from_mg (const MGDoFHandler<dim>& mg_dof,
- OutVector& dst,
- const MGLevelObject<BlockVector<number> >& src) const;
+ copy_from_mg (const MGDoFHandler<dim> &mg_dof,
+ OutVector &dst,
+ const MGLevelObject<BlockVector<number> > &src) const;
/**
* Add a multi-level vector to a
*/
template<int dim, class OutVector>
void
- copy_from_mg_add (const MGDoFHandler<dim>& mg_dof,
- OutVector& dst,
- const MGLevelObject<BlockVector<number> >& src) const;
+ copy_from_mg_add (const MGDoFHandler<dim> &mg_dof,
+ OutVector &dst,
+ const MGLevelObject<BlockVector<number> > &src) const;
};
*/
template<int dim, class InVector>
void
- copy_to_mg (const MGDoFHandler<dim>& mg_dof,
+ copy_to_mg (const MGDoFHandler<dim> &mg_dof,
MGLevelObject<Vector<number> > &dst,
- const InVector &src) const;
+ const InVector &src) const;
/**
* Transfer from multi-level vector to
*/
template<int dim, class OutVector>
void
- copy_from_mg (const MGDoFHandler<dim>& mg_dof,
- OutVector &dst,
+ copy_from_mg (const MGDoFHandler<dim> &mg_dof,
+ OutVector &dst,
const MGLevelObject<Vector<number> > &src) const;
/**
*/
template<int dim, class OutVector>
void
- copy_from_mg_add (const MGDoFHandler<dim>& mg_dof,
- OutVector &dst,
+ copy_from_mg_add (const MGDoFHandler<dim> &mg_dof,
+ OutVector &dst,
const MGLevelObject<Vector<number> > &src) const;
private:
-
- /**
- * Selected component.
- */
- unsigned int selected;
+ /**
+ * Selected component.
+ */
+ unsigned int selected;
};