Hi Bastien, Which version of deal.II are you using? There is the recently added add_periodicity() <https://www.dealii.org/8.4.0/doxygen/deal.II/classparallel_1_1distributed_1_1Triangulation.html#a9539cda687eeb08c602bceac11807987> function that helps join otherwise unrelated faces for distributed triangulations. See also step-45 <https://www.dealii.org/8.4.0/doxygen/deal.II/step_45.html> for an example as to how it is used.
On a tangential but related note, this type of "periodic" boundary condition is in all likelihood not appropriate for elasticity. See, for example, @Article{Miehe2003a, Title = {Computational micro-to-macro transitions for discretized micro-structures of heterogeneous materials at finite strains based on the minimization of averaged incremental energy}, Author = {Miehe, Christian}, Journal = {Computer Methods in Applied Mechanics and Engineering}, Year = {2003}, Number = {5}, Pages = {559--591}, Volume = {192} } for the correct definition of the periodicity constraint (namely a periodic displacement jump based on the volume averaged deformation gradient) for elasticity. I hope that this helps, J-P On Wednesday, June 1, 2016 at 2:10:36 AM UTC+2, Bastien Lauras wrote: > > Hi, > > I am working on a 2D square, a incompressible neo-hookean material. I've > used step 44 and modified it to work on a two field formulation (*u* and > p). > I am trying to implement periodic boundary conditions for the vertical > displacement on lateral faces (right and left). > My left face has boundary indicator 1, and my right face has boundary > indicator 3. > > In the make_constraints function, I've added, after constraints.clear() : > > DoFTools::make_hanging_node_constraints (dof_handler_ref, constraints); > // I have local refinement in my code > > std::vector<GridTools::PeriodicFacePair<typename > DoFHandler<dim>::cell_iterator> > > periodicity_vector; > > const unsigned int direction = 0; // I've tried 0 and 1, I didn't > understan what it really was > > GridTools::collect_periodic_faces(dof_handler_ref, 1, 3, direction, > periodicity_vector); > > const FEValuesExtractors::Scalar x_displacement(0); > const FEValuesExtractors::Scalar y_displacement(1); > > DoFTools::make_periodicity_constraints<DoFHandler<dim> > > (periodicity_vector, constraints, fe.component_mask(y_displacement)); > > > And then I apply Dirichlet boundary conditions on face 1 and 3 on the > horizontal displacement (x_displacement). > I've also added the command : > > DoFTools::make_hanging_node_constraints (dof_handler_ref, constraints); > > before making my sparsity pattern. > My triangulation is not a parallel::distributed one. I'm working on > multithreads with the workstream::run of step 44. > > > The problem is that my periodic boundary conditions are not enforced. The > make_periodicity_constraints command does not change the number of > constrained degrees of freedom (that I compute using a loop over the DOFs > and calling constraints.is_constrained(i)). > And moreover, I can see on my outputs that there is definitely no > periodicity on my vertical displacement. > > Where can the problem come from? > > Thanks a lot for your help beforehand! > > Bastien Lauras > > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.