From: Roy S. <roy...@ic...> - 2018-04-23 12:29:37
|
On Sat, 21 Apr 2018, Manav Bhatia wrote: > I am trying to identify the best approach to handle time-varying > Dirichlet conditions with libMesh. It appears that > DirichletConstraints is used to create a set of DofConstraintRow > that is used after the nonlinear solves through > DofMap::enforce_constraints_exactly(). After the nonlinear solves, but also during the solve process when you apply constraints to your system matrix and rhs at each linearized step. > So, if time-varying DirichletConstraints are required, then the > dof constraints will have to be reinitialized at each time-step > with the DirichletCondition object returning the function values > for that time? That's correct. > Is there another way to do this without have to reinit the > constraints? Weakly enforce penalty or Nitsche boundary conditions? But for strong BCs in libMesh, reinitializing the constraint equations is the way to go. > Presently I am not using AMR. Would reinit of > constraints at each time-step be the best approach if AMR is > used? Right. We split out a reinit_constraints() option recently to make it possible to do this without unnecessarily reinitializing other parts of the problem at the same time. Be careful about the time setting of your system when you reinit time-varying constraints! Often users will keep their System time set to the time at the beginning of a time step, but constraining a solution for that time step should be done with the constraint values at the *end* of the time step. --- Roy |