I have code that runs fine with periodic boundary condition for a GridGenerator::parallelepiped. Also when I change the mesh to a GridGenerator::subdivided_parallelepiped and has only 1 as n_subdivisions, it also works. But when I change it to 2, I get the following error:
An error occurred in line <2686> of file </home/joel/Downloads/dealii-8.2.1/source/grid/grid_tools.cc> in function
void dealii::GridTools::collect_periodic_faces(const CONTAINER&, dealii::types::boundary_id, dealii::types::boundary_id, int, std::vector<dealii::GridTools::PeriodicFacePair<typename CONTAINER::cell_iterator> >&, const dealii::Tensor<1, CONTAINER:: space_dimension>&, const dealii::FullMatrix<double>&, const std::vector<unsigned int>&) [with CONTAINER = dealii::DoFHandler<3>; dealii::types::boundary_id = unsigned char; typename CONTAINER::cell_iterator = dealii::TriaIterator<dealii::DoFCellAccessor<dealii::DoFHandler<3>, false> >]
The violated condition was:
pairs1.size() == pairs2.size()
The name and call sequence of the exception was:
ExcMessage ("Unmatched faces on periodic boundaries")
Additional Information:
Unmatched faces on periodic boundaries
How can I fix it?
Best,
Joel