I want to use the *create_mass_matrix* and *create_laplace_matrix*
> functionality of MatrixCreator namespace. The function prototype here
> requires to pass a pointer (which is by default 0 meaning that there is no
> variable coefficient associated with variable or laplace of variable) to a
> function object. I want to build the mass/laplace matrices taking in
> account the constraints so I pass the ConstraintMatrix argument as the last
> argument of the function. Code snippet:
> QGauss<dim>(fe.degree+1), mass_matrix, ________, constraints);
> Here dof_hadler, mass_matrix and constraints are appropriate objects as
> the name suggests. I don't have the variable coefficient/s so I need to
> know what to pass in the blank space which requires a pointer argument as
> mentioned above?
You already gave the answer yourself:
tells you that MatrixCreator::create_mass_matrix is declared as
template<int dim, typename number , int spacedim>
(const Mapping< dim, spacedim > & mapping,
const DoFHandler< dim, spacedim > & dof,
const Quadrature< dim > & q,
SparseMatrix< number > & matrix,
const Function< spacedim > *const a = 0,
const ConstraintMatrix & constraints = ConstraintMatrix())
In particular, using a null pointer (0, NULL or nullptr) for the 'Function'
pointer 'a' gives you a constant coefficient equal to one.
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.