From: Roy S. <roy...@ic...> - 2012-03-21 22:06:46
|
On Wed, 21 Mar 2012, David Knezevic wrote: > On 03/21/2012 04:06 PM, Roy Stogner wrote: >> I think I'm just about done debugging and testing my latest swath of >> changes, others' svn committing has been pretty quiet for the last >> couple weeks, and we've got a few new features worth pushing out in >> release form. fparser, heterogenous constraints, boundary projections >> and constraints, more functor-based APIs... probably enough to call >> the result 0.8.0 rather than 0.7.3, even. > > Re boundary constraints: I presume this provides functionality for > non-penalty Dirichlet BCs? I think it'd be nice to have this in one of > the "Introduction" examples --- I think a lot of people are surprised > (if that's the right word) by the penalty BCs. > > I'd be happy to add this to, say, introduction_ex4 (or perhaps make a > new example which is the same except for the BCs). Could you give a > quick overview of the API though (or tell me where to look in the source)? Thanks! DirichletBoundary is the relevant class to look at. Construct one of those, use system.get_dof_map().add_dirichlet_boundary(...) to attach it. The one trick is making sure you apply the constraints heterogenously where appropriate (when solving for a constrained solution, e.g. in most of our linear problem codes) vs. homogeneously where appropriate (when solving for the difference between two constrained solutions, e.g. in many of our nonlinear problem codes). The latter case ought to work out of the box when using a NonlinearSolver or DiffSolver subclass; the former case requires a different constrain_ call in the assembly loop. --- Roy |