petsc-3.7.1 2016-05-15
Report Typos and Errors

# PetscFEIntegrateResidual

Produce the element residual vector for a chunk of elements by quadrature integration

### Synopsis

    #include "petscfe.h"
    PetscErrorCode PetscFEIntegrateResidual(PetscFE fem, PetscDS prob, PetscInt field, PetscInt Ne, PetscFECellGeom *geom,
                                            const PetscScalar coefficients[], const PetscScalar coefficients_t[], PetscDS probAux, const PetscScalar coefficientsAux[], PetscScalar elemVec[])

Not collective Many br

### Input Parameters

| fem | - The PetscFE object for the field being integrated Many br
| prob | - The PetscDS specifying the discretizations and continuum functions Many br
| field | - The field being integrated Many br
| Ne | - The number of elements in the chunk Many br
| geom | - The cell geometry for each cell in the chunk Many br
| coefficients | - The array of FEM basis coefficients for the elements Many br
| coefficients_t | - The array of FEM basis time derivative coefficients for the elements Many br
| probAux | - The PetscDS specifying the auxiliary discretizations Many br
| coefficientsAux | - The array of FEM auxiliary basis coefficients for the elements Many br

Output Parameter Many br

elemVec -the element residual vectors from each element Many br

### Note

    Loop over batch of elements (e):

      Loop over quadrature points (q):

        Make u_q and gradU_q (loops over fields,Nb,Ncomp) and x_q

        Call f_0 and f_1

      Loop over element vector entries (f,fc --> i):

        elemVec[i] += \psi^{fc}_f(q) f0_{fc}(u, \nabla u) + \nabla\psi^{fc}_f(q) \cdot f1_{fc,df}(u, \nabla u)

Many br

### See Also

PetscFEIntegrateResidual()

Level:developer
Location:src/dm/dt/interface/dtfe.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages