Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OperatorBase should extract dealii::AffineConstraints from dealii::MatrixFree? #557

Open
nfehn opened this issue Aug 10, 2023 · 1 comment
Labels
software design Issue or pull request dealing with aspects of code design

Comments

@nfehn
Copy link
Member

nfehn commented Aug 10, 2023

Currently, OperatorBase receives affine constraints as a separate argument in initialization routines.

I consider this somewhat impractical / error prone. For example, in the IncNS module, we currently pass in an empty constraints object constraint_dummy for some operators (convective, viscous). However, it is hard to see whether this is a bug. Previously, when we had only a pure DG formulation (no Hdiv), there were no constraints in the IncNS module. Maybe, we then forgot to replace constraint_dummy in the setup of the operators, I am not sure.

Another aspect are the two dof-indices (dof_index and dof_index_inhomogeneous) that we have in OperatorBaseData since recent changes regarding the implementation of affine constraints for hanging nodes and inhomogeneous boundary data. From the current code version, it is hard to see which constraints OperatorBase actually expects to receive. This problem would not occur if the implementation in OperatorBase selects the constraints corresponding to OperatorBaseData::dof_index or OperatorBaseData::dof_index_inhomogeneous.

@kronbichler what do you think?

@nfehn nfehn added the software design Issue or pull request dealing with aspects of code design label Aug 10, 2023
@kronbichler
Copy link
Contributor

I think it would be good to have the affine constraints returned via MatrixFree, so I am in favor of such a change. There is one caveat, namely that MatrixFree::get_affine_constraints(dof_index) cannot return the constraints if the affine constraints object has a different Number type than MatrixFree (say one double and the other float). But I think we use consistent number types (possibly different in multigrid, but those have their own constraints and MatrixFree objects), so I think this should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
software design Issue or pull request dealing with aspects of code design
Projects
None yet
Development

No branches or pull requests

2 participants