On 9/20/19 11:29 AM, Stephen wrote: > I've never implemented periodic b.c. before and so I'm trying to figure > out if I've done it correctly... especially since I find the > documentation a bit confusing. In this case, I colorise the boundary of > my square using the optional argument in GridGenerator and then try to > build the periodicity constraints via > > > periodic_constraints.clear(); > > DoFTools::make_periodicity_constraints (dof_handler, 0, 1, > periodic_constraints); > > DoFTools::make_periodicity_constraints (dof_handler, 2, 3, > periodic_constraints); > > periodic_constraints.close(); > > > Is this correct? My code runs so it seems to do /something/ at least but > due to the solution for my current test problem being pretty much zero > on the boundary anyway, it is difficult to tell.
At some point, you'll have to figure out whether your solution is correct in other regards, and it would be useful to come up with test cases with which you can ascertain correctness of code in situations like the one you describe above. Just pick a different right hand side and see for yourself whether your code does something useful! (I *think* that what you're doing looks correct.) > Also, I'm wondering if > someone can explain the meaning of 'direction' in the > DoFTools::make_periodicity_constraints function since it's not clear to > me what it does. Good question -- I don't really know either. It's the same as in GridTools::collect_periodic_faces(), but the documentation there is also not much better. We may have to ask @tamiko (Matthias). Best W. -- ------------------------------------------------------------------------ Wolfgang Bangerth email: bange...@colostate.edu www: http://www.math.colostate.edu/~bangerth/ -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/4a6ccff5-974f-6887-fbaf-8d078b015a83%40colostate.edu.