TSComputeMassMatrix#

Evaluate the mass matrix \(M = \partial F/\partial \dot U\) using the routine set with TSSetMassMatrix().

Synopsis#

#include "petscts.h"  
PetscErrorCode TSComputeMassMatrix(TS ts, PetscReal t, Vec U, Mat M)

Collective

Input Parameters#

  • ts - the TS context obtained from TSCreate()

  • t - the time at which to evaluate the mass matrix

  • U - the state vector at which to evaluate the mass matrix

Output Parameter#

  • M - the mass matrix to fill; the integrator supplies it with the correct layout

Note#

The mass matrix is assembled on the DM returned by TSGetDM(), that is the fine DM or, within a multigrid traversal, the current level’s DM. This matches TSComputeIJacobian(), which likewise takes no DM argument.

See Also#

TS: Scalable ODE and DAE Solvers, TS, TSMassMatrixFn, TSSetMassMatrix(), TSHasMassMatrix()

Level#

developer

Location#

src/ts/interface/ts.c


Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages