Skip to content

Add Access to Mesh Requirements via API#1080

Merged
fsimonis merged 9 commits intoprecice:developfrom
fsimonis:add-access-meshrequirement
Sep 15, 2021
Merged

Add Access to Mesh Requirements via API#1080
fsimonis merged 9 commits intoprecice:developfrom
fsimonis:add-access-meshrequirement

Conversation

@fsimonis
Copy link
Copy Markdown
Member

@fsimonis fsimonis commented Sep 13, 2021

Main changes of this PR

Adds access to the mesh requirements to the SolverInterface.

bool SolverInterface::isMeshConnectivityRequired(int meshID) const;

Closes #467

Motivation and additional information

Generating connectivity information and passing it to preCICE can be expensive, but preCICE does not always need full mesh connectivity for every mesh.
preCICE ignores API calls to define connectivity if this is not required, but there is no way for the solver to know this.
Thus, solvers/adapters have to be manually configured to skip the connectivity generation.

This PR proposes an API which allows a solver to get information for each mesh directly from preCICE.

Author's checklist

  • I added a changelog file with this PR number in docs/changelog/ if there are noteworthy changes.
  • I ran tools/formatting/check-format and everything is formatted correctly.
  • I sticked to C++14 features.
  • I sticked to CMake version 3.10.
  • I squashed / am about to squash all commits that should be seen as one.

Reviewers' checklist

  • Does the changelog entry make sense? Is it formatted correctly?
  • Do you understand the code changes?

@fsimonis fsimonis force-pushed the add-access-meshrequirement branch from e3daff4 to caea77e Compare September 13, 2021 14:25
@fsimonis fsimonis force-pushed the add-access-meshrequirement branch from caea77e to 2b84713 Compare September 13, 2021 14:27
@fsimonis
Copy link
Copy Markdown
Member Author

Based on the discussion in #467, I reduced this PR from 2 API functions down to 1.

@fsimonis fsimonis requested a review from uekerman September 13, 2021 15:12
@fsimonis fsimonis added the enhancement A new feature, a new functionality of preCICE (from user perspective) label Sep 13, 2021
@fsimonis fsimonis added this to the Version 2.3.0 milestone Sep 13, 2021
Copy link
Copy Markdown
Member

@uekerman uekerman left a comment

Choose a reason for hiding this comment

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

Implementation and tests look good 👍
Only a few doubt about the C and Fortran bindings. It's really problematic that we don't have tests here (preSERVE 😢 ) ... what you could always do is to quickly modify a solverdummy and test "offline".

We should not forget to extend the documentation here: https://precice.org/couple-your-code-defining-mesh-connectivity.html

fsimonis and others added 4 commits September 14, 2021 10:03
Co-authored-by: Benjamin Uekermann <[email protected]>
Co-authored-by: Benjamin Uekermann <[email protected]>
Co-authored-by: Benjamin Uekermann <[email protected]>
Co-authored-by: Benjamin Uekermann <[email protected]>
@fsimonis
Copy link
Copy Markdown
Member Author

I manually tested this using the Fortran and C solverdummies and it works fine.

@fsimonis fsimonis merged commit 43f23c7 into precice:develop Sep 15, 2021
@fsimonis fsimonis deleted the add-access-meshrequirement branch September 15, 2021 03:04
uekerman added a commit to uekerman/precice.github.io that referenced this pull request Sep 15, 2021
davidscn pushed a commit to precice/precice.github.io that referenced this pull request Oct 11, 2021
* Add documentation for API isMeshConnectivityRequired

According to precice/precice#1080

* Remove blank line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A new feature, a new functionality of preCICE (from user perspective)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add access to MeshRequirement to SolverInterface

2 participants