Closed HelgeGehring closed 1 year ago
A dict for D is allowed only because of backwards compatibility. We used to prefer basis.find_dofs which is now deprecated but returns a dict. I think we shouldn't make those condense, enforce, penalize etc. more complicated than they already are.
Keep it simple sounds good! If a dict for D is allowed only because of backwards compatibility, would it make sense to also deprecate it and show a warning (and also remove it from the type hint)?
Yes, let's add warning. I think mypy doesn't like dropping the type hint?
Oh, didn't see that mypy is used. Then the deprecation warning should be enough :)
I'm currently using
to set the boundary condition, where
fixed_boundary
is a dict ofname_of_boundary -> value
, e.g.{'left': 0, 'right':1}
As it's allowed to pass a dict of
name -> dofs
in D, would it be an option to add the possibility to pass a dictname -> value
in x? I.e. that the example would simplify towhere the value could either be a constant value, or an array of values for the list of dofs?