> What interface are we going to use for splitting out a DM for a vector
> field in a larger system? How do we get the bs=2 velocity DM out of the
> lid-driven cavity's bs=4 velocity, vorticity, and temperature DM?
>
again this is irrelevent here because the same issue is true for the ISs.
But
I explained this in my previous email: DMPushSubDMType(DM,"name of a type of splitting like u,v,p or velocity,p"); DMPopSubDMType(); it is not perfect but a start. See that email for more details.
// Conservative gas dynamics with fields ordered as [rho, rho*u, rho*v, rho*w, E]
DMGetFieldSplitting(dm,"conservative-vector",&fscons); // creates if it doesn't exist
DMFieldSplittingAddField(dm,fscons,"rho",{0});
DMFieldSplittingAddField(dm,fscons,"momentum",{1,2,3});
DMFieldSplittingAddField(dm,fscons,"Energy",{4});
DMGetFieldSplitting(dm,"primitive-vector",&fsprim);
DMFieldSplittingSetPF(dm,fsprim,UserEquationOfStatePF,UserEquationOfStateInversePF);
DMFieldSplittingAddField(dm,fsprim,"velocity",{0,1,2});
DMFieldSplittingAddField(dm,fsprim,"pressure",{3});
DMFieldSplittingAddField(dm,fsprim,"Temperature",{4});
If a transform is not specified, the indices would address the original state variables.
Then PCFieldSplit and eventual nonlinear and time-stepping splitting methods would call
DMGetFieldSplitting(dm,&nsplits,&splits);
// choose split number to use
split = splits[splitidx];
DMFieldSplittingGetName(dm,split,&splitname);
DMFieldSplittingGetFields(dm,split,&pf,&pfinv,&nfields,&isfields,&dmfields);
If pf is not NULL, apply PF to the state variables, then isfields[i] denotes what to extract in order to live in dmfields[i], pfinv is needed to put a contribution back into the coupled dm.