Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update couple-your-code-porting-v2-3.md #335

Merged
merged 3 commits into from
Feb 14, 2024
Merged

Update couple-your-code-porting-v2-3.md #335

merged 3 commits into from
Feb 14, 2024

Conversation

carme-hp
Copy link
Contributor

readData doesn't need numberOfVertices anymore! I removed this from the example.

readData doesn't need numberOfVertices anymore! I removed this from the example.
@@ -153,7 +153,7 @@ The previously optional argument `relativeReadTime` is now mandatory for read da
```diff
- couplingInterface.readBlockVectorData(meshName, dataReadName, numberOfVertices, vertexIDs.data(), readData.data());
+ preciceDt = couplingInterface.getMaxTimeStepSize();
+ couplingInterface.readBlockVectorData(meshName, dataReadName, numberOfVertices, vertexIDs.data(), preciceDt, readData.data())
+ couplingInterface.readBlockVectorData(meshName, dataReadName, vertexIDs.data(), preciceDt, readData.data())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ couplingInterface.readBlockVectorData(meshName, dataReadName, vertexIDs.data(), preciceDt, readData.data())
+ couplingInterface.readData(meshName, dataReadName, vertexIDs, preciceDt, readData)

The complete signature of this function is v2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even call the object participant, i.e. participant.readData, just as in the example above.

@@ -162,7 +162,7 @@ If you use subcycling, please do the following:
- couplingInterface.readBlockVectorData(meshName, dataReadName, numberOfVertices, vertexIDs.data(), readData.data());
+ preciceDt = couplingInterface.getMaxTimeStepSize();
double dt = min(preciceDt, solverDt);
+ couplingInterface.readBlockVectorData(meshName, dataReadName, numberOfVertices, vertexIDs.data(), dt, readData.data())
+ couplingInterface.readBlockVectorData(meshName, dataReadName, vertexIDs.data(), dt, readData.data())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ couplingInterface.readBlockVectorData(meshName, dataReadName, vertexIDs.data(), dt, readData.data())
+ couplingInterface.readData(meshName, dataReadName, vertexIDs, dt, readData)

@carme-hp
Copy link
Contributor Author

Thanks for the review! I have applied your changes and I applied them to the rest of the porting guide.

Copy link
Member

@davidscn davidscn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your care

@davidscn davidscn merged commit 31060ed into master Feb 14, 2024
1 of 2 checks passed
@davidscn davidscn deleted the carme-hp-patch-2 branch February 14, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants