std::vector< std::pair< unsigned int, unsigned int > > | cell_level_index |
Dear Michal,
We do not offer convenience access for all data structures on faces yet, so feel free to suggest what you need.
That said, for the access of rho and mu on an element, we provide the following access function:
This FEEvaluationBase::read_cell_data function expects an AlignedVector<VectorizedArray<Number>> as the argument with as many components as there are cell batches (plus ghosted ones for the MPI case). So in your code, you would fill the rho and mu fields by a cell loop (for MPI, please run it for "n_cells = this->data->n_macro_cells() + this->data->n_ghost_cell_batches()". Then you can access that data both on cells and faces, i.e., with FEEvaluation and FEFaceEvaluation.
The implementation resolves the `interior_cells` and `exterior_cells` fields for you.
Retrieving the `user_index` is a bit more involved as we do not provide access to a face iterator.
You could do it approximately as follows (sitting on a face like in your code below):
const unsigned int interior_cell =
face2cell_info.cells_interior[element];
const Triangulation<dim>::cell_iterator my_cell =
this->data->get_cell_iterator(interior_cell /
VectorizedArray<Number>::n_array_elements,
interior_cell %
VectorizedArray<Number>::n_array_elements);
const Triangulation<dim>::face_iterator face_it =
my_cell->face(face2cell_info.interior_face_no);
Can you try if that works? If yes, we should add some access functions to MatrixFree. Let us know if you are interested in helping with a pull request.
Best,
Martin
--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/b3c0fccd-7a76-4d90-a573-74719d281c37%40googlegroups.com.
Dear Martin
We do not offer convenience access for all data structures on faces yet, so feel free to suggest what you need.
That said, for the access of rho and mu on an element, we provide the following access function:
This FEEvaluationBase::read_cell_data function expects an AlignedVector<VectorizedArray<Number>> as the argument with as many components as there are cell batches (plus ghosted ones for the MPI case). So in your code, you would fill the rho and mu fields by a cell loop (for MPI, please run it for "n_cells = this->data->n_macro_cells() + this->data->n_ghost_cell_batches()". Then you can access that data both on cells and faces, i.e., with FEEvaluation and FEFaceEvaluation.
The implementation resolves the `interior_cells` and `exterior_cells` fields for you.
Retrieving the `user_index` is a bit more involved as we do not provide access to a face iterator.
You could do it approximately as follows (sitting on a face like in your code below):
const unsigned int interior_cell = face2cell_info.cells_interior[element];
const Triangulation<dim>::cell_iterator my_cell =
this->data->get_cell_iterator(interior_cell / VectorizedArray<Number>::n_array_elements,
interior_cell % VectorizedArray<Number>::n_array_elements);
const Triangulation<dim>::face_iterator face_it = my_cell->face(face2cell_info.interior_face_no);Can you try if that works? If yes, we should add some access functions to MatrixFree. Let us know if you are interested in helping with a pull request.