PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ solve()

int pism::Poisson::solve ( const array::Scalar mask,
const array::Scalar bc,
double  rhs,
bool  reuse_matrix = false 
)

Solve the Poisson equation on the domain defined by mask == 1 with Dirichlet BC provided in bc (used only where mask == 0, possibly redundant away from the domain) with the constant right hand side rhs.

Set the mask to 2 to use zero Neumann BC.

Definition at line 67 of file Poisson.cc.

References assemble_matrix(), assemble_rhs(), pism::array::Array2D< T >::copy_from(), pism::RuntimeError::formatted(), m_A, m_b, m_KSP, m_log, m_mask, m_x, PISM_CHK, PISM_ERROR_LOCATION, and pism::array::Array::vec().