TSSetMassMatrixConstant#

Declare whether the mass matrix set with TSSetMassMatrix() is constant.

Synopsis#

#include "petscts.h"  
PetscErrorCode TSSetMassMatrixConstant(TS ts, PetscBool constant)

Logically Collective

Input Parameters#

  • ts - the TS context obtained from TSCreate()

  • constant - PETSC_TRUE if the mass matrix depends on neither time nor the solution, so it may be assembled once and reused

Note#

By default the mass matrix is treated as time- and state-dependent and integrators re-evaluate it (via the routine set with TSSetMassMatrix()) whenever the operator is rebuilt. Setting this flag lets an integrator assemble the mass matrix a single time and reuse it, avoiding repeated assembly for the common constant-mass case.

See Also#

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

Level#

intermediate

Location#

src/ts/interface/ts.c

Examples#

src/ts/tutorials/ex48.c


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