// forward declarations
class dFMatrix;
class dVector;
-template <int dim> class ProblemBase;
AssemblerData (const DoFHandler<dim> &dof,
const bool assemble_matrix,
const bool assemble_rhs,
- ProblemBase<dim> &problem,
+ dSMatrix &matrix,
+ dVector &rhs_vector,
const Quadrature<dim> &quadrature,
const FiniteElement<dim> &fe,
const FEValues<dim>::UpdateStruct &update_flags);
* to be used to iterate on.
*/
const DoFHandler<dim> &dof;
+
/**
* Flags whether to assemble the matrix
* and right hand sides.
*/
const bool assemble_matrix, assemble_rhs;
+
+ /**
+ * Pointer to the matrix to be assembled
+ * by this object.
+ */
+ dSMatrix &matrix;
+
/**
- * Pointer to the #ProblemBase# object
- * of which the global matrices and
- * vectors are to be assembled.
+ * Pointer to the vector to be assembled
+ * by this object.
*/
- ProblemBase<dim> &problem;
+ dVector &rhs_vector;
+
/**
* Pointer to a quadrature object to be
* used for this assemblage process.
*/
const Quadrature<dim> &quadrature;
+
/**
* Use this FE type for the assemblage
* process. The FE object must match that
* object.
*/
const FiniteElement<dim> &fe;
+
/**
* Store which of the fields of the
* FEValues object need to be reinitialized
bool assemble_rhs;
/**
- * Pointer to the problem class object
- * of which we are to use the matrices
- * and vectors.
+ * Pointer to the matrix to be assembled
+ * by this object.
+ */
+ dSMatrix &matrix;
+
+ /**
+ * Pointer to the vector to be assembled
+ * by this object.
*/
- ProblemBase<dim> &problem;
+ dVector &rhs_vector;
/**
* Pointer to the finite element used for
/* $Id$ */
#include <numerics/assembler.h>
-#include <numerics/base.h>
#include <grid/tria_iterator.h>
#include <grid/tria_iterator.templates.h>
#include <lac/dfmatrix.h>
#include <lac/dvector.h>
-
+#include <lac/dsmatrix.h>
template <int dim>
template <int dim>
-AssemblerData<dim>::AssemblerData (const DoFHandler<dim> &dof,
- const bool assemble_matrix,
- const bool assemble_rhs,
- ProblemBase<dim> &problem,
+AssemblerData<dim>::AssemblerData (const DoFHandler<dim> &dof,
+ const bool assemble_matrix,
+ const bool assemble_rhs,
+ dSMatrix &matrix,
+ dVector &rhs_vector,
const Quadrature<dim> &quadrature,
const FiniteElement<dim> &fe,
const FEValues<dim>::UpdateStruct &update_flags) :
dof(dof),
assemble_matrix(assemble_matrix),
assemble_rhs(assemble_rhs),
- problem(problem),
+ matrix(matrix),
+ rhs_vector(rhs_vector),
quadrature(quadrature),
fe(fe),
update_flags(update_flags) {};
cell_vector (dVector(dof_handler->get_selected_fe().total_dofs)),
assemble_matrix (((AssemblerData<dim>*)local_data)->assemble_matrix),
assemble_rhs (((AssemblerData<dim>*)local_data)->assemble_rhs),
- problem (((AssemblerData<dim>*)local_data)->problem),
+ matrix(((AssemblerData<dim>*)local_data)->matrix),
+ rhs_vector(((AssemblerData<dim>*)local_data)->rhs_vector),
fe(((AssemblerData<dim>*)local_data)->fe),
fe_values (((AssemblerData<dim>*)local_data)->fe,
((AssemblerData<dim>*)local_data)->quadrature,
((AssemblerData<dim>*)local_data)->update_flags)
{
- Assert ((unsigned int)problem.system_matrix.m() == dof_handler->n_dofs(),
- ExcInvalidData());
- Assert ((unsigned int)problem.system_matrix.n() == dof_handler->n_dofs(),
- ExcInvalidData());
+ Assert (matrix.m() == dof_handler->n_dofs(), ExcInvalidData());
+ Assert (matrix.n() == dof_handler->n_dofs(), ExcInvalidData());
Assert (((AssemblerData<dim>*)local_data)->fe == dof_handler->get_selected_fe(),
ExcInvalidData());
- Assert ((unsigned int)problem.right_hand_side.n() == dof_handler->n_dofs(),
+ Assert (rhs_vector.n() == dof_handler->n_dofs(),
ExcInvalidData());
};
if (assemble_matrix)
for (unsigned int i=0; i<n_dofs; ++i)
for (unsigned int j=0; j<n_dofs; ++j)
- problem.system_matrix.add(dofs[i], dofs[j], cell_matrix(i,j));
+ matrix.add(dofs[i], dofs[j], cell_matrix(i,j));
// distribute cell vector
if (assemble_rhs)
for (unsigned int j=0; j<n_dofs; ++j)
- problem.right_hand_side(dofs[j]) += cell_vector(j);
+ rhs_vector(dofs[j]) += cell_vector(j);
};