15 September 2021 3:23:38.978 PM
svd_basis():
FORTRAN90 version
Given a PDE for which:
C is the number of components of the solution
at any single point,
P is the number of points where a solution is given,
N is the number of solution vectors,
L is the number of modes to be extracted.
Then we let M = C*P be the abstract spatial dimension.
If requested, we compute the average solution,
subtract it from each solution, and save that
as mode #0.
Set up A, the M by N matrix of solution vectors,
Get A = U * S * V', the singular value decomposition.
The first L columns of U are our dominant modes.
How many basis vectors (L) are to be extracted?
L = 4
You specify a consecutive sequence of file names
by giving the first "base" file name.
If there are no more sequences to enter,
just hit RETURN.
Enter a new base file name, or RETURN.
1: "data01.txt".
According to the first base file,
The number of solution components C = 3
The number of solution points P = 4
The "size" of each solution M = (C*P) = 12
You specify a consecutive sequence of file names
by giving the first "base" file name.
If there are no more sequences to enter,
just hit RETURN.
Enter a new base file name, or RETURN.
RETURN was entered.
Presumably, there are no more file sequences.
Counting the data files for each set.
Data set # 1
begins with file "data01.txt".
and terminates because there is no file
"data06.txt".
The number of data files N = 5
The data is stored in an M by N matrix A.
The "spatial" dimension M is 12
The number of data points N is 5
The data has been read into the matrix A.
svd_basis():
Averaging of data is optional.
The program can average the data vectors,
subtract it from each data vector,
and write out the data average vector as an
extra "mode 0" vector.
Do you want to compute and use the average? (Y/N)
Enter Y or N:
The user has requested the average vector.
SINGULAR_VECTORS
For an MxN matrix A in general storage,
The LAPACK routine DGESVD computes the
singular value decomposition:
A = U * S * V'
The leading singular values:
1 16.516733
2 10.527458
3 5.0040919
4 2.6323395
Because the CLEAN option is on,
we will set very tiny vector entries to 0.
svd_basis():
Ready to write the left singular vectors to files.
Do you want comments in the header of the file?
(These begin with the "#" character.) (Y/N)
Enter Y or N:
Writing average file "svd_000.txt".
Writing first file "svd_001.txt".
Writing last file "svd_004.txt".
svd_basis():
Normal end of execution.
15 September 2021 3:23:38.979 PM