Dear PETSc group,

I would like to inquire about the storage of the gradient in function 
PetscDSSetResidual:

PetscErrorCode PetscDSSetResidual(PetscDS ds, PetscInt f, void (*f0)(PetscInt 
dim, PetscInt Nf, PetscInt NfAux, const PetscInt uOff[], const PetscInt 
uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar 
u_x[], const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], 
const PetscScalar a_t[], const PetscScalar a_x[], PetscReal t, const PetscReal 
x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar f0[]), 
void (*f1)(PetscInt, PetscInt, PetscInt, const PetscInt[], const PetscInt[], 
const PetscScalar[], const PetscScalar[], const PetscScalar[], const 
PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const 
PetscScalar[], PetscReal, const PetscReal[], PetscInt, const PetscScalar[], 
PetscScalar[]))

Assume u = (u1, u2, u3)^T, the gradient of u is
[cid:68b0e2f6-2465-4550-8ae1-4631bfe74163]

In PetscDSSetResidual, it is stored in an array. Is it ordered as (u1x,u2x, 
u3x, u1y, u2y, u3y, u1z, u2z,u3z)?

Thanks in advance!

Best Regards,
Yujie

Reply via email to