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#
constant -
PETSC_TRUEif 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#
Examples#
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages