Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages

◆ add_contribution()

void pism::fem::Element::add_contribution ( const double K,
Mat  J 
) const
protected

Add Jacobian contributions.

Add the contributions of an element-local Jacobian to the global Jacobian matrix.

The element-local Jacobian should be given as a row-major array of Nk*Nk values in the scalar case or (2Nk)*(2Nk) values in the vector valued case.

Note that MatSetValuesBlockedStencil ignores negative indexes, so values in K corresponding to locations marked using mark_row_invalid() and mark_col_invalid() are ignored. (Just as they should be.)

Definition at line 241 of file Element.cc.

References m_block_size, m_col, m_row, and PISM_CHK.