@@ -160,7 +160,7 @@ void getModes(
160160 if (para -> eigensolver == "spectra" )
161161 {
162162 Spectra ::SymEigsSolver < Spectra ::DenseSymMatProd < double >> es (op , nmodes , ncv );
163- std :: cout << "Using Spectra EigenSolver " << std :: endl ;
163+ Info << "Using Spectra EigenSolver " << endl ;
164164 es .init ();
165165 es .compute (Spectra ::SortRule ::LargestAlge );
166166 M_Assert (es .info () == Spectra ::CompInfo ::Successful ,
@@ -170,7 +170,7 @@ void getModes(
170170 }
171171 else if (para -> eigensolver == "eigen" )
172172 {
173- std :: cout << "Using Eigen EigenSolver " << std :: endl ;
173+ Info << "Using Eigen EigenSolver " << endl ;
174174 esEg .compute (_corMatrix );
175175 M_Assert (esEg .info () == Eigen ::Success ,
176176 "The Eigenvalue Decomposition did not succeed" );
@@ -250,7 +250,8 @@ void getModes(
250250 modesEigBC [i ] = (SnapMatrixBC [i ] * eigenVectoreig );
251251 }
252252
253- std ::cout << normFact << std ::endl ;
253+ Info << endl << "####### Normalized Eigenvalues of " << snapshots [0 ].name ()
254+ << " #######" << endl << normFact << endl << endl ;
254255
255256 for (label i = 0 ; i < nmodes ; i ++ )
256257 {
@@ -369,7 +370,7 @@ void getModesMemoryEfficient(
369370 fileName rootPath (".");
370371 Foam ::Time runTime2 (Foam ::Time ::controlDictName , rootPath , snapshotsPath );
371372 label nSnaps = runTime2 .times ().size () - 2 ;
372- std :: cout << "Found " << nSnaps << " time directories" << endl ;
373+ Info << "Found " << nSnaps << " time directories" << endl ;
373374
374375 // Verify we have at least one snapshot
375376 if (nSnaps < 1 )
@@ -482,7 +483,7 @@ void getModesMemoryEfficient(
482483 if (para -> eigensolver == "spectra" )
483484 {
484485 // Use Spectra solver for large eigenvalue problems
485- std :: cout << "Using Spectra EigenSolver " << std :: endl ;
486+ Info << "Using Spectra EigenSolver " << endl ;
486487 Spectra ::DenseSymMatProd < double > op (_corMatrix );
487488 Spectra ::SymEigsSolver < Spectra ::DenseSymMatProd < double >>
488489 solver (op , nmodes , nSnaps );
@@ -496,7 +497,7 @@ void getModesMemoryEfficient(
496497 else if (para -> eigensolver == "eigen" )
497498 {
498499 // Use Eigen solver for smaller problems
499- std :: cout << "Using Eigen EigenSolver " << std :: endl ;
500+ Info << "Using Eigen EigenSolver " << endl ;
500501 Eigen ::SelfAdjointEigenSolver < Eigen ::MatrixXd > solver (_corMatrix );
501502 M_Assert (solver .info () == Eigen ::Success ,
502503 "Eigenvalue decomposition failed" );
@@ -666,7 +667,7 @@ void getMeanMemoryEfficient(
666667 fileName rootPath (".");
667668 Foam ::Time runTime2 (Foam ::Time ::controlDictName , rootPath , snapshotsPath );
668669 label nSnaps = runTime2 .times ().size () - 2 ;
669- std :: cout << "Found " << nSnaps << " time directories" << endl ;
670+ Info << "Found " << nSnaps << " time directories" << endl ;
670671
671672 // Compute mean field
672673 if (!meanex )
@@ -746,7 +747,7 @@ void getWeightedModes(
746747
747748 if (para -> eigensolver == "spectra" )
748749 {
749- std :: cout << "Using Spectra EigenSolver " << std :: endl ;
750+ Info << "Using Spectra EigenSolver " << endl ;
750751 es .init ();
751752 es .compute (Spectra ::SortRule ::LargestAlge );
752753 M_Assert (es .info () == Spectra ::CompInfo ::Successful ,
@@ -756,7 +757,7 @@ void getWeightedModes(
756757 }
757758 else if (para -> eigensolver == "eigen" )
758759 {
759- std :: cout << "Using Eigen EigenSolver " << std :: endl ;
760+ Info << "Using Eigen EigenSolver " << endl ;
760761 esEg .compute (_corMatrix );
761762 M_Assert (esEg .info () == Eigen ::Success ,
762763 "The Eigenvalue Decomposition did not succeed" );
@@ -1179,9 +1180,9 @@ DEIMmodes(List<Eigen::SparseMatrix<double >>& A,
11791180 {
11801181 if (nmodesA > A .size () - 2 || nmodesB > A .size () - 2 )
11811182 {
1182- std :: cout <<
1183+ Info <<
11831184 "The number of requested modes cannot be bigger than the number of Snapshots - 2"
1184- << std :: endl ;
1185+ << endl ;
11851186 exit (0 );
11861187 }
11871188
@@ -1433,7 +1434,7 @@ void getModes(
14331434 }
14341435 }
14351436
1436- std :: cout << std :: endl ;
1437+ Info << endl ;
14371438
14381439 for (label i = 1 ; i < snapshots .size (); i ++ )
14391440 {
@@ -1456,7 +1457,7 @@ void getModes(
14561457 {
14571458 Spectra ::SymEigsSolver < Spectra ::DenseSymMatProd < double >>
14581459 es (op , nmodes , ncv );
1459- std :: cout << "Using Spectra EigenSolver " << std :: endl ;
1460+ Info << "Using Spectra EigenSolver " << endl ;
14601461 es .init ();
14611462 es .compute (Spectra ::SortRule ::LargestAlge );
14621463 M_Assert (es .info () == Spectra ::CompInfo ::Successful ,
@@ -1466,7 +1467,7 @@ void getModes(
14661467 }
14671468 else if (para -> eigensolver == "eigen" )
14681469 {
1469- std :: cout << "Using Eigen EigenSolver " << std :: endl ;
1470+ Info << "Using Eigen EigenSolver " << endl ;
14701471 esEg .compute (_corMatrix );
14711472 M_Assert (esEg .info () == Eigen ::Success ,
14721473 "The Eigenvalue Decomposition did not succeed" );
@@ -1800,7 +1801,7 @@ PtrList<GeometricField<Type, PatchField, GeoMesh >> DEIMmodes(
18001801 {
18011802 Spectra ::SymEigsSolver < Spectra ::DenseSymMatProd < double >>
18021803 es (op , nmodes , ncv );
1803- std :: cout << "Using Spectra EigenSolver " << std :: endl ;
1804+ Info << "Using Spectra EigenSolver " << endl ;
18041805 es .init ();
18051806 es .compute (Spectra ::SortRule ::LargestAlge );
18061807 M_Assert (es .info () == Spectra ::CompInfo ::Successful ,
@@ -1810,7 +1811,7 @@ PtrList<GeometricField<Type, PatchField, GeoMesh >> DEIMmodes(
18101811 }
18111812 else if (para -> eigensolver == "eigen" )
18121813 {
1813- std :: cout << "Using Eigen EigenSolver " << std :: endl ;
1814+ Info << "Using Eigen EigenSolver " << endl ;
18141815 esEg .compute (_corMatrix );
18151816 M_Assert (esEg .info () == Eigen ::Success ,
18161817 "The Eigenvalue Decomposition did not succeed" );
@@ -1874,7 +1875,7 @@ PtrList<GeometricField<Type, PatchField, GeoMesh >> DEIMmodes(
18741875 modesEigBC [i ] = (SnapMatrixBC [i ] * eigenVectoreig );
18751876 }
18761877
1877- std :: cout << normFact << std :: endl ;
1878+ Info << normFact << endl ;
18781879
18791880 for (label i = 0 ; i < nmodes ; i ++ )
18801881 {
@@ -1991,7 +1992,7 @@ void getModes(
19911992 {
19921993 Spectra ::SymEigsSolver < Spectra ::DenseSymMatProd < double >>
19931994 es (op , nmodes , ncv );
1994- std :: cout << "Using Spectra EigenSolver " << std :: endl ;
1995+ Info << "Using Spectra EigenSolver " << endl ;
19951996 es .init ();
19961997 es .compute (Spectra ::SortRule ::LargestAlge );
19971998 M_Assert (es .info () == Spectra ::CompInfo ::Successful ,
@@ -2001,7 +2002,7 @@ void getModes(
20012002 }
20022003 else if (para -> eigensolver == "eigen" )
20032004 {
2004- std :: cout << "Using Eigen EigenSolver " << std :: endl ;
2005+ Info << "Using Eigen EigenSolver " << endl ;
20052006 esEg .compute (_corMatrix );
20062007 M_Assert (esEg .info () == Eigen ::Success ,
20072008 "The Eigenvalue Decomposition did not succeed" );
0 commit comments