#define __deal2__mg_transfer_h
-#include <lac/sparsity_pattern.h>
#include <lac/block_vector.h>
-#include <lac/block_sparsity_pattern.h>
+#ifdef DEAL_PREFER_MATRIX_EZ
+# include <lac/sparse_matrix_ez.h>
+# include <lac/block_sparse_matrix_ez.h>
+#else
+# include <lac/sparsity_pattern.h>
+# include <lac/block_sparsity_pattern.h>
+#endif
#include <multigrid/mg_base.h>
#include <multigrid/mg_level_object.h>
*/
std::vector<unsigned int> sizes;
-
+#ifdef DEAL_PREFER_MATRIX_EZ
+ /**
+ * The actual prolongation matrix.
+ * column indices belong to the
+ * dof indices of the mother cell,
+ * i.e. the coarse level.
+ * while row indices belong to the
+ * child cell, i.e. the fine level.
+ */
+ std::vector<SparseMatrixEZ<double> > prolongation_matrices;
+#else
+ /**
+ * Sparsity patterns for transfer
+ * matrices.
+ */
std::vector<SparsityPattern> prolongation_sparsities;
/**
* child cell, i.e. the fine level.
*/
std::vector<SparseMatrix<double> > prolongation_matrices;
+#endif
};
// have a size greater zero.
prolongation_matrices.resize (0);
prolongation_matrices.resize (n_levels-1);
+#ifndef DEAL_PREFER_MATRIX_EZ
prolongation_sparsities.resize (0);
prolongation_sparsities.resize (n_levels-1);
-
+#endif
// two fields which will store the
// indices of the multigrid dofs
// for a cell and one of its children
// necessary. this, of course, is the
// number of degrees of freedom per
// cell
+#ifdef DEAL_PREFER_MATRIX_EZ
+ prolongation_matrices[level].reinit (sizes[level+1],
+ sizes[level],
+ dofs_per_cell);
+#else
+ // increment dofs_per_cell
+ // since a useless diagonal
+ // element will be stored
prolongation_sparsities[level].reinit (sizes[level+1],
- sizes[level],
-//TODO:[WB,GK] evil hack, must be corrected!
- dofs_per_cell+1);
+ sizes[level],
+ dofs_per_cell+1);
+#endif
for (typename MGDoFHandler<dim>::cell_iterator cell=mg_dof.begin(level);
cell != mg_dof.end(level); ++cell)