[petsc-users] PETSc DS Auxiliary Variable Question

Matthew Knepley knepley at gmail.com
Tue May 15 19:21:21 CDT 2018


On Tue, May 15, 2018 at 8:11 PM, Robert Walker <rlwalker at usc.edu> wrote:

> Hello,
>
> I am writing a program using PETScDS along with PETScFE and PETScTS in a
> similar vein to TS examples 45 - 48. I seek to use the auxiliary variables
> accessed by the pointwise functions in a manner similar to how I understand
> that MOOSE handles auxiliary variables, that is that in the following:
>
> f0(PetscInt <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> dim, PetscInt <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> Nf, PetscInt <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> NfAux,
>
>    const PetscInt <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> uOff[], const PetscInt <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> uOff_x[], const PetscScalar <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscScalar.html#PetscScalar> u[], const PetscScalar <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscScalar.html#PetscScalar> u_t[], const PetscScalar <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscScalar.html#PetscScalar> u_x[],
>
>    const PetscInt <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> aOff[], const PetscInt <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> aOff_x[], const PetscScalar <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscScalar.html#PetscScalar> a[], const PetscScalar <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscScalar.html#PetscScalar> a_t[], const PetscScalar <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscScalar.html#PetscScalar> a_x[],
>
>    PetscReal <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscReal.html#PetscReal> t, const PetscReal <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscReal.html#PetscReal> x[], PetscScalar <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscScalar.html#PetscScalar> f0[])
>
>
> some indices of the a[] array may hold values generated using the primary
> variable values of the prior iteration, or may simply point to the primary
> variables themselves.
>
> What is the best way to go about this? Apologies if this is either quite
> obvious or has been extensively addressed before.
>

Not sure where I need to start. First, do you understand how the auxiliary
variables are being used in SNES ex12 or ex69?

  Thanks,

    Matt


> Thank you
>
>
> Robert L. Walker
> MS Petroleum Engineering
> Mork Family Department of Chemicals and Materials Sciences
> University of Southern California
> ----------------------------------------------
> Mobile US: +1 (213) - 290 -7101
> Mobile EU: +34 62 274 66 40
> rlwalker at usc.edu
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180515/a6a99e60/attachment.html>


More information about the petsc-users mailing list