Conversation
Co-authored-by: Benjamin Rodenberg <[email protected]>
The C++ function already exists but the Fortran binding was missing. See issue #38
`precicef_set_vertex` declared dummy arguments named `position` and `vertexID`, but had specifications for arguments named `coordinates` and `id`. This caused compilation warnings because `position` and `vertexID` were implicitly typed as real variables of default kind, which is not necessarily the same as kind `c_double`. Correct C interoperability therefore could not be assured, especially since `coordinates` was specified as an array of size 3 whereas implicitly- typed `position` would be a scalar. Other procedures in the module name dummy arguments as `coordinates` and `id`, so the dummy argument names for `precicef_set_vertex` have been changed to match.
Instead of using the entire iso_c_binding module in each routine, import only the necessary types from the module scope. Prevents warnings emitted by some compilers and analysis tools about use-ing entire modules.
Intents for all arguments
fsimonis
requested changes
Oct 13, 2025
Member
There was a problem hiding this comment.
edit: I forgot to make the mod ...
I get the following error when building the solverdummy using the makefile:
f77 -std=f2003 -g solverdummy.f90 -o solverdummy -I../.. -L/path/to/precice/ -lprecice
solverdummy.f90:2:7:
2 | use precice
| 1
Fatal Error: Cannot open module file ‘precice.mod’ for reading at (1): No such file or directory
compilation terminated.
make: *** [Makefile:6: solverdummy] Error 1
Note that the folder contains a precice.f90, not precice.mod
fsimonis
approved these changes
Oct 13, 2025
Member
fsimonis
left a comment
There was a problem hiding this comment.
The compilation of the module and the solverdummy work 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview:
precicef_set_mesh_trianglesMost of the new changes are contributed by @kcooley-cvd.
After merging, it is time to finally start making proper releases, with versions.