Incorporation of weak Dirichlet boundary conditions in test cases
Currently, the application of weak boundary conditions from the user view in a test case is complicated:
- in HyTeG solvers, the DoFtype has to be set to 'All' via solver.setDoFType( All ); because the DoFs on the boundary are now part of the solution
- the standard strong boundary application has to be switched off in PETSc solvers by solver.disableApplicationBC( true );
- the user can/has to set the penalty depending on his application and operator (ensure coercivity of the operator: e.g. larger constant required in 3D)
Two ways to avoid giving the responsibility to do these small yet crucial operations to the user are:
- Inspecting the given operator within the solver and set DoFs and boundary handling according to the operator type (if it applies its BCs weakly) (con: it is not the solver's responsibility to check how BCs should be applied but the operator's, the solver should 'just solve')
- introducing another boundary flag WeakDirichletBC and handling the case similarly to the existing free slip BC. (con: additional functions for the new boundary flag would have to be implemented, and the boundary has to be set with the new flag at the start of the test case pro: IMO intuitive way to handle weak BCs, no modifications in the solvers)
Are there other/better ideas to handle this?