Skip to content

Commit b20ad17

Browse files
authored
Merge pull request #32 from AndreWeiner/main
Update cylinder flow SVD tutorial to SmartSim 0.8.0.
2 parents e7b3a57 + 8b6174e commit b20ad17

File tree

5 files changed

+135
-117
lines changed

5 files changed

+135
-117
lines changed

applications/utilities/svdToFoam/svdToFoam.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
8686
SmartRedis::Client client(false);
8787

8888
const auto mpiRank = std::to_string(Pstream::myProcNo());
89-
auto baseName = "rec_ensemble_" + mpiRank +
89+
auto baseName = "rec_ensemble_r" + svdRank + "_" + mpiRank +
9090
".rank_" + svdRank + "_field_name_" + fieldName +
9191
"_mpi_rank_" + mpiRank;
9292

@@ -142,7 +142,7 @@ int main(int argc, char *argv[])
142142
// write left singular vectors into last time folder
143143
if (!isRunning)
144144
{
145-
auto modeBaseName = "rec_ensemble_" + mpiRank + ".global_U_mpi_rank_" + mpiRank;
145+
auto modeBaseName = "rec_ensemble_r" + svdRank + "_" + mpiRank + ".global_U_mpi_rank_" + mpiRank;
146146
for (int r=0; r < std::stoi(svdRank); r++)
147147
{
148148

tutorials/postProcessing/foamSmartSimSvd/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
This folder contains several workflows to compute the singular value decomposition (SVD) of OpenFOAM field data:
44

5-
1. **foam-smartsim-svd.ipynb**: works with pre-computed snapshots; requires the *foamSmartSimSvd* utility; requires running the *cavity* test case before starting the notebook
6-
2. **foam-smartsim-svd-db-api.ipynb**: same as *foam-smartsim-svd.ipynb* but with alternative SmartRedis API usage
7-
3. **partitioned-svd-cylinder.ipynb**: employs the *fieldsToSmartRedis* function object to write OpenFOAM data directly into SmartRedis; requires the *svdToFoam* utility
5+
1. **foam-smartsim-svd.ipynb**: works with pre-computed snapshots; requires the *foamSmartSimSvd* utility; requires running the *cavity* test case before starting the notebook; uses the *cavity* simulation
6+
2. **foam-smartsim-svd-db-api.ipynb**: same as *foam-smartsim-svd.ipynb* but with alternative SmartRedis API usage; uses the *cavity* simulation
7+
3. **partitioned-svd-cylinder.ipynb**: employs the *fieldsToSmartRedis* function object to write OpenFOAM data directly into SmartRedis; requires the *svdToFoam* utility; uses the *cylinder2D* simulation
88

99
## Requirements
1010

1111
For general dependencies, refer to the [README.md](/README.md) in the top-level folder.
1212
To compile all utilities and function objects, go to the top-level folder and run:
1313
```
14-
source SOURCEME.sh
14+
./Allwmake
1515
```
1616

1717
## Executing the notebooks

tutorials/postProcessing/foamSmartSimSvd/cylinder2D/Allclean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ cd "${0%/*}" || exit # Run from this directory
44
#------------------------------------------------------------------------------
55

66
cleanCase
7-
rm -rf 0
7+
rm -rf 0 *.err *.out *.log
88

99
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)