set_dimension()#
- PODBasis.set_dimension(num_vectors: int = None, svdval_threshold: float = None, cumulative_energy: float = None, residual_energy: float = None, projection_error: float = None)[source]#
Set the reduced state dimension \(r\). Exactly one argument should be specified
- Parameters:
- num_vectorsint
Set \(r\) to
num_vectors
.- svdval_thresholdfloat
Choose \(r\) as the number of normalized POD singular values that are greater than the given threshold, i.e., \(\sigma_{i}/\sigma_{1} \ge\)
svdval_threshold
for \(i=1,\ldots,r\).- cumulative_energyfloat
Choose \(r\) as the smallest integer such that \(\sum_{i=1}^{r}\sigma_i^2\big/\sum_{j=1}^{k}\sigma_j^2\) is greater than or equal to
cumulative_energy
.- residual_energyfloat
Choose \(r\) as the smallest integer such that \(\sum_{i=r+1}^k\sigma_i^2\big/\sum_{j=1}^k\sigma_j^2\) is less than or equal to
residual_energy
.- projection_errorfloat
Choose \(r\) as the smallest integer such that \(\|\Q - \Vr\Vr\trp\Q\|_F \big/ \|\Q\|_F\) is less than or equal to
projection_error
, where \(\Q\) is the matrix of training snapshots.