Function CreateW¶
- Defined in File ema.h
Function Documentation¶
-
PetscErrorCode
CreateW(MPI_Comm COMM, PetscScalar *local_weights, PetscInt local_nrow, PetscInt local_row0, PetscInt global_nrow, Mat *W)¶ Creates a diagonal matrix with the weights as the entries.
- Parameters
COMM: The MPI communicator, PETSC_COMM_SELF.A*local_weights: Passed into this function to get built into W.local_nrow: Number of rows for this ranklocal_row0: The starting row for this rank.global_nrow: The total length of the weights vector (N). W is NxN.*W: The matrix created by this function.