Skip to main content
`Ctrl`+`K`

# PetscDALETKFGetLocalizationMatrix

Compute localization weight matrix for LETKF [move to ml/da/interface]

## Synopsis

    PetscErrorCode PetscDALETKFGetLocalizationMatrix(const PetscInt n_obs_vertex, const PetscInt n_dof, Vec Vecxyz[3], PetscReal bd[3], Mat H, Mat *Q)

Collective

## Input Parameters

- n_obs_vertex - Number of observations to localize to per vertex

- n_dof - Number of degrees of freedom

- Vecxyz - Array of vectors containing the vertex coordinates

- bd - Array of boundary extents per dimension (used for periodicity)

- H - Observation operator matrix

## Output Parameter

- Q - Localization weight matrix (sparse, AIJ format)

## Notes

The output matrix Q has dimensions (n_vert_global x n_obs_global) where n_vert_global is the number of vertices in the DMPlex. Each row contains exactly n_obs_vertex non-zero entries corresponding to the nearest observations, weighted by the Gaspari-Cohn fifth-order piecewise rational function.

The observation locations are computed as H * V where V is the vector of vertex coordinates. The localization weights ensure smooth tapering of observation influence with distance.

Kokkos is required for this routine.

## See Also

PetscDA: Data Assimilation, `PetscDALETKFSetLocalization()`

## Level

intermediate

## Location

src/ml/da/impls/ensemble/letkf/kokkos/dalocalizationletkf.kokkos.cxx

## Examples

src/ml/da/tutorials/ex2.c
src/ml/da/tutorials/ex3.c
src/ml/da/tutorials/ex4.c

Index of all PetscDA routines
Table of Contents for all manual pages
Index of all manual pages