From: David Knezevic <dknez@MIT.EDU>  20090721 17:37:22

hah, it's always the way isn't it: you figure it out just after emailing the list... I moved the adding of the periodic BC to after equation_systems.init() and added the aptly named function call: dof_map.create_dof_constraints(mesh); and now it works! Cheers, Dave David Knezevic wrote: > Hi all, > > I'm trying to use libMesh's functionality for periodic boundary > conditions, but I can't quite figure it out... I looked it up in the > archives, but couldn't find any info. > > I'm trying to do a NavierStokes channel flow problem with periodic > BCs on the left and right boundaries; I added: > > PeriodicBoundary pbc; > pbc.myboundary = inflow_ID; > pbc.pairedboundary = outflow_ID; > > RealVectorValue boundary_translation(channel_length,0.,0.); > pbc.translation_vector = boundary_translation; > > dof_map.add_periodic_boundary(pbc); > > > to the matrix assembly (before the element loop), and then (as usual) > I called > > dof_map.constrain_element_matrix_and_vector (Ke, Fe, dof_indices); > > in order to impose the periodic constraint on the element matrices? I > guess I must be missing something, because this isn't giving me > periodicity? > > Thanks! > > Dave > 