** Please ignore delete my first post that went out without a subject **

Hallo everyone, 
I'm very happy to be starting my first project with deal.II and hope to 
possibly contribute to it.  I am working on a diffusion homogenisation 
problem with periodic boundary conditions. 

I have implemented the periodic boundary conditions with the following 
lines 

a) in setup system
  std::vector<
    GridTools::PeriodicFacePair<typename 
DoFHandler<dim,dim>::cell_iterator>>
    periodicity_vector;
  
  std::vector<unsigned int> masters {{0,2,4}}; // the periodic faces which 
will be duplicated 
  std::vector<unsigned int> slaves {{1,3,5}}; // where they will be 
duplicated
  
  for (unsigned int d=0; d<dim; d++)
  { 
    GridTools::collect_periodic_faces(dof_handler,
                                      masters[d],
                                      slaves[d],
                                      d,
                                      periodicity_vector );  
  }
                                      
  DoFTools::make_periodicity_constraints<dim, dim, 
double_t>(periodicity_vector,
                                                 constraints );

                                                 
but also immediately after grid generation (which makes me wonder now why I 
duplicated that effort):

          std::vector<GridTools::PeriodicFacePair<
            typename  Triangulation<dim>::cell_iterator>>
          periodicity_vector;
          std::vector<unsigned int> masters {{0,2,4}};
          std::vector<unsigned int> slaves {{1,3,5}};
          
          for (unsigned int d=0; d<dim; d++)
            GridTools::collect_periodic_faces(tria,
                                              masters[d],
                                              slaves[d],
                                              d,
                                              periodicity_vector ); 
          tria.add_periodicity(periodicity_vector);              


But I get the following error :

An error occurred in line <743> of file <./source/grid/tria.cc> in function
    void dealii::{anonymous}::update_periodic_face_map_recursively(const 
typename dealii::Triangulation<dim, spacedim>::cell_iterator&, const 
typename dealii::Triangulation<dim, spacedim>::cell_iterator&, unsigned 
int, unsigned int, const std::bitset<3>&, std::map<std::pair<typename 
dealii::Triangulation<dim, spacedim>::cell_iterator, unsigned int>, 
std::pair<std::pair<typename dealii::Triangulation<dim, 
spacedim>::cell_iterator, unsigned int>, std::bitset<3> > >&) [with int dim 
= 3; int spacedim = 3; typename dealii::Triangulation<dim, 
spacedim>::cell_iterator = dealii::TriaIterator<dealii::CellAccessor<3, 3> 
>]
The violated condition was: 
    dim == 1 || std::abs(cell_1->level() - cell_2->level()) < 2

which I am fairly sure is related to coarsening on the periodic domain.  
It's related to coarsening because it disappears when I disable coarsening. The 
link to the periodic domain is because of the stacktrace:

Stacktrace:
-----------
#0  /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.4.0: 
#1  /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.4.0: 
#2  /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.4.0: 
#3  /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.4.0: 
#4  /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.4.0: 
#5  /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.4.0: 
#6  /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.4.0: dealii::Triangulation<3, 
3>::update_periodic_face_map()
#7  /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.4.0: dealii::Triangulation<3, 
3>::execute_coarsening_and_refinement()
#8  ./homodiff2: HomDiff<3>::refine_grid()
#9  ./homodiff2: HomDiff<3>::run(unsigned int, double)
#10  ./homodiff2: main

So I will be digging in to this now but I thought it might be worth posting 
here because 

   - I might have missed some critical information
   - This might be a known problem
   - Maybe somebody else will have the same problem in the meantime and it 
   will be good to gather information. 
   
Any tips on where to look are welcome. 


Best regards,

Marc

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/844ed14e-5162-4ffb-9f14-a630d78cf687n%40googlegroups.com.

Reply via email to