Dear All,
I have a problem with two grids, one for the state and one for the control,
where the control will always be a refined version of the state grid. I need
to evaluate the value of the control at a quadrature point, while iterating
over the state grid's cells. I thought I would do this using the
InterGridMap class, which from my understanding of the documentation should
be able to tell me the corresponding cell (with the same type) on the
control mesh. I then give this corresponding cell to an evaluation function
(control_function) and it can find appropriate dofs and shape functions from
there. It won't compile, and says it's because I have the wrong type of cell
iterator. I've included additional information below (some snippets of code
plus the error). Do you have any suggestions on either how to fix it or a
better way to do this? Many thanks,
Pearl Flath
InterGridMap<DoFHandler<dim> > state_to_control_grid_map;
state_to_control_grid_map.make_mapping(state_dof_handler,
dof_handler);
// skipping some code here
typename DoFHandler<dim>::active_cell_iterator cell =
dof_handler.begin_active(),
end_cell = dof_handler.end();
for (;cell!=end_cell; ++cell) //iterate over the state cells
{
if (cell->subdomain_id() ==
triangulation->locally_owned_subdomain())//for cells on this processor
{
// skipping some code here
control_function.set_active_cell(state_to_control_grid_map[cell]);
control_function.value_list(fe_values.get_quadrature_points(),
control_values);
}
But when I try to compile, I get the following error:
source/../include/StateAdjointMatrices.h:55: error: no matching function for
call to
‘InterFunction<3>::set_active_cell(dealii::TriaIterator<dealii::DoFCellAccessor<dealii::DoFHandler<3,
3> > >) const’
source/../include/InterFunction.h:118: note: candidates are: void
InterFunction<dim>::set_active_cell(typename dealii::DoFHandler<dim,
dim>::active_cell_iterator&) [with int dim = 3]
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii