Dear everyone,

I need to build a Function object —to be sent to MatrixCreator::create_laplace_matrix— that is derived from a nodal field.

Thanks to the tutorials, I can easily do the assembly "by hand":
- I define a Vector<double> level_set that is given some values at the nodes by some process; - Before looping over the cells, I define a std::vector<double> level_set_values(nb_q_points); - Inside the loops over the cells, I compute the value of the field on all quadrature points through fe_values.get_function_values(level_set, level_set_values); - Then I loop over the quadrature points and the degrees of freedom, and compute the cell matrix through if (level_set_values[q_point] > 0.) cell_mat(i,j) += [...] else cell_mat(i,j) += [...].

But, for obvious reasons, I would like to use the wonderful MatrixCreator::create_laplace_matrix to assemble the matrix. Is there a way to build the required Function object?

Many thanks in advance for your precious help,
Martin.
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to