On Sat, Jul 25, 2020 at 9:08 AM Mark Adams <mfad...@lbl.gov> wrote:

> Yea, I did not get all the code you need. Here is an example of making
> crddm. I'm not sure if this is all best practices (Matt?)
>
>   /* create coordinate DM */
>   ierr = DMClone(dm, &crddm);CHKERRV(ierr);
>
PetscFE       fe;

>   ierr = PetscFECreateDefault(PETSC_COMM_SELF, dim, dim, PETSC_FALSE, "",
> PETSC_DECIDE, &fe);CHKERRV(ierr);
>   // ierr = PetscFECreateLagrange(PETSC_COMM_SELF, dim, dim, PETSC_FALSE,
> "", PETSC_DECIDE, &fe);CHKERRQ(ierr);
>   ierr = PetscFESetFromOptions(fe);CHKERRV(ierr);
>

 And you need to take care to construct 'fe' in the same way that you
construct the PetscFE in 'dm'. (is there a better way to clone a PetscFE?)

Reply via email to