Clean up (Navier-)Stokes operators
@marian and I just discussed a major cleanup for the Navier-Stokes operators (in particular the DG version) and have identified the following problems:
- Right now, the implementation is very inefficient:
- The jacobian-based implementation of the residuals in
StokesDGmeans that every residual evaluation requires a local matrix assembly. -
NavierStokesDGeven compounds the issue by forwarding the linear part of the operator to the base class and then assembling the non-linear part on top of it, requiring two separate quadrature loops. -
alpha_volume()inNavierStokesDGmakes for the icing on the cake: It calls the jacobian-based residual evaluation ofStokesDGand then directly implements the non-linear residual.
- The jacobian-based implementation of the residuals in
- The current naming scheme is rather unfortunate, with
TaylorHoodNavierStokesandNavierStokesDGetc.
We have come up with the following solution:
-
Merge the Stokes and the Navier-Stokes implementations into a single class and use a compile time flag in the parameter class to toggle the non-linear part of the operator. -
Directly implement the residuals. -
Call the new operator DGNavierStokes -
Do the same thing for StokesDGMassand call itDGNavierStokesMass -
Put the new operators into a new file dgnavierstokes.hh -
Introduce a new, unified parameter class DGNavierStokesParameters' (that still inherits fromNavierStokesDefaultParmaters) and put it intodgnavierstokesparameters.hh` -
Deprecate all classes with -DGsuffix and the filesstokesdg.hhandstokesdgparameters.hh.
I'll also do a minor cleanup of the Taylor-Hood version, but that will be tracked separately.