22 const std::vector<PetscInt>& vec_knownX_id,
23 const std::vector<PetscScalar>& vec_knownX_x)
28 if (std::any_of(vec_knownX_id.begin(), vec_knownX_id.end(),
29 [](PetscInt
const i) { return i < 0; }))
32 "Found negative indices in the vector of Dirichlet boundary "
42 if (vec_knownX_id.size() > 0)
44 x.
set(vec_knownX_id, vec_knownX_x);
45 b.
set(vec_knownX_id, vec_knownX_x);
Wrapper class for PETSc matrix routines for matrix.
void finalizeAssembly(const MatAssemblyType asm_type=MAT_FINAL_ASSEMBLY)
Perform MPI collection of assembled entries in buffer.
void setRowsColumnsZero(std::vector< PetscInt > const &row_pos)
Set the specified rows to zero except diagonal entries, i.e. , where This function must be called...
Wrapper class for PETSc vector.
void finalizeAssembly()
Perform MPI collection of assembled entries in buffer.
void set(const PetscInt i, const PetscScalar value)
void applyKnownSolution(EigenMatrix &A, EigenVector &b, EigenVector &, const std::vector< EigenMatrix::IndexType > &vec_knownX_id, const std::vector< double > &vec_knownX_x)