Sumedh,
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:
>
> MatrixCreator::create_mass_matrix(dof_handler,
> 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:
The documentation
<http://www.dealii.org/8.4.1/doxygen/deal.II/namespaceMatrixCreator.html#aa95a194001f23f96327fb7a630c6b036>
tells you that MatrixCreator::create_mass_matrix is declared as

##
Advertising

template<int dim, typename number , int spacedim>
void MatrixCreator::create_mass_matrix
(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.
Best,
Daniel
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
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
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.