For a software project at FAU Erlangen-Nuremberg, I implemented a distributed memory parallel version of a homogenization problem.
Since we handle periodicity with an offset value, I implemented the periodic BC in the following manner:
- Read mesh
- Collect periodic faces (triangulation)
- Add periodic faces to triangulation
- Collect periodic faces (dofHandler)
- Make periodic constraint and set inhomogeneity to periodic DOFs on the boundary.
Next step would be to add a mesh refinement. My first try was adding `triangulation.refine_global(nGlobalRefinement);` after the third step.
Unfortunately, when we try to access cells with `!cell.is_artificial()` from the resulting vector of `collect_periodic_faces()` to get all locally relevant boundary cells to add the inhomogeneity, the following assertion is raised:
The violated condition was:
this->active()
Additional information:
is_artificial() can only be called on active cells!
Looking at the doc of `collect_periodic_faces` (This function will collect periodic face pairs on the coarsest mesh level of the given mesh (a Triangulation or DoFHandler) and add them to the vector matched_pairs leaving the original contents intact.) the resulting vector will only contain parent cells, on which the call `is_artifiical()` is not possible.
So we thought if we change the `cell_iterator` in `collect_periodic_faces` to `active_cell_iterator` we get a vector containing the child cells (on which `is_artifical()` is allowed)? Because we would assume that child cells are active and therefore, our previous approach would work again. But this did not help either.
If this question might be a bit to complex, I would also prepare a minimal example.
Is there a going round to get a similar results as with `collect_periodic_faces`, i.e. a vector containing all refined periodic cells.
Thanks for your support in advance.
Best, Maurice