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

PetscFEIntegrateJacobian

Produce the element Jacobian for a chunk of elements by quadrature integration

Synopsis

#include "petscfe.h" 
PetscErrorCode PetscFERefine(PetscFE fe, PetscFE *feRef)
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
jtype - The type of matrix pointwise functions that should be used Many br
fieldI - The test field being integrated Many br
fieldJ - The basis 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 for the Jacobian evaluation point 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

elemMat -the element matrices for the Jacobian from each element Many br

Note

Loop over batch of elements (e):
  Loop over element matrix entries (f,fc,g,gc --> i,j):
    Loop over quadrature points (q):
      Make u_q and gradU_q (loops over fields,Nb,Ncomp)
        elemMat[i,j] += \psi^{fc}_f(q) g0_{fc,gc}(u, \nabla u) \phi^{gc}_g(q)
                     + \psi^{fc}_f(q) \cdot g1_{fc,gc,dg}(u, \nabla u) \nabla\phi^{gc}_g(q)
                     + \nabla\psi^{fc}_f(q) \cdot g2_{fc,gc,df}(u, \nabla u) \phi^{gc}_g(q)
                     + \nabla\psi^{fc}_f(q) \cdot g3_{fc,gc,df,dg}(u, \nabla u) \nabla\phi^{gc}_g(q)
*/ Many brPetscErrorCode PetscFEIntegrateJacobian(PetscFE fem, PetscDS prob, PetscFEJacobianType jtype, PetscInt fieldI, PetscInt fieldJ, PetscInt Ne, PetscFECellGeom *geom, Many brconst PetscScalar coefficients[], const PetscScalar coefficients_t[], PetscDS probAux, const PetscScalar coefficientsAux[], PetscScalar elemMat[]) Many br{ Many brPetscErrorCode ierr; Many br

PetscFunctionBegin; Many brPetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); Many brif (fem->ops->integratejacobian) {ierr = (*fem->ops->integratejacobian)(fem, prob, jtype, fieldI, fieldJ, Ne, geom, coefficients, coefficients_t, probAux, coefficientsAux, elemMat);CHKERRQ(ierr);} Many brPetscFunctionReturn(0); Many br} Many br

#undef __FUNCT__ Many br#define __FUNCT__ "PetscFEIntegrateBdJacobian" Many br/*C Many brPetscFEIntegrateBdJacobian - Produce the boundary element Jacobian for a chunk of elements by quadrature integration Many br

Not collective Many br

Input Parameters

fem = The PetscFE object for the field being integrated- . prob - The PetscDS specifying the discretizations and continuum functions Many br
fieldI - The test field being integrated Many br
fieldJ - The basis 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 for the Jacobian evaluation point 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

elemMat -the element matrices for the Jacobian from each element Many br

Note

Loop over batch of elements (e):
  Loop over element matrix entries (f,fc,g,gc --> i,j):
    Loop over quadrature points (q):
      Make u_q and gradU_q (loops over fields,Nb,Ncomp)
        elemMat[i,j] += \psi^{fc}_f(q) g0_{fc,gc}(u, \nabla u) \phi^{gc}_g(q)
                     + \psi^{fc}_f(q) \cdot g1_{fc,gc,dg}(u, \nabla u) \nabla\phi^{gc}_g(q)
                     + \nabla\psi^{fc}_f(q) \cdot g2_{fc,gc,df}(u, \nabla u) \phi^{gc}_g(q)
                     + \nabla\psi^{fc}_f(q) \cdot g3_{fc,gc,df,dg}(u, \nabla u) \nabla\phi^{gc}_g(q)
*/ Many brPetscErrorCode PetscFEIntegrateBdJacobian(PetscFE fem, PetscDS prob, PetscInt fieldI, PetscInt fieldJ, PetscInt Ne, PetscFECellGeom *geom, Many brconst PetscScalar coefficients[], const PetscScalar coefficients_t[], PetscDS probAux, const PetscScalar coefficientsAux[], PetscScalar elemMat[]) Many br{ Many brPetscErrorCode ierr; Many br

PetscFunctionBegin; Many brPetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); Many brif (fem->ops->integratebdjacobian) {ierr = (*fem->ops->integratebdjacobian)(fem, prob, fieldI, fieldJ, Ne, geom, coefficients, coefficients_t, probAux, coefficientsAux, elemMat);CHKERRQ(ierr);} Many brPetscFunctionReturn(0); Many br} Many br

#undef __FUNCT__ Many br#define __FUNCT__ "PetscFERefine" Many br/*@ Many brPetscFERefine - Create a "refined" PetscFE object that refines the reference cell into smaller copies. This is typically used Many brto precondition a higher order method with a lower order method on a refined mesh having the same number of dofs (but more Many brsparsity). It is also used to create an interpolation between regularly refined meshes. Many br

Input Parameter

fe -The initial PetscFE Many br

Output Parameter

feRef -The refined PetscFE Many br

Many br

See Also

PetscFEType, PetscFECreate(), PetscFESetType()

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