-
Notifications
You must be signed in to change notification settings - Fork 63
Improvement: Make FORTRAN interface work again and add tests for all its functions #2177
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
4bf7163
Added cmesh fortran test
Davknapp 6712f03
Add function that tests the interface call to set_join_by_vertices
Davknapp f42f4f0
fix names
Davknapp f6d6754
fix memory leaks
Davknapp 5a7dda4
Add new test
Davknapp a3def71
output not working
Davknapp a36d049
Merge remote-tracking branch 'origin/main' into increase
spenke91 85b140c
Remove duplicated section in t8_test_mpi_init.f90
spenke91 caced0f
Correct years of new files in Copyright statement
spenke91 2d94381
Merge branch 'main' into increase
spenke91 442b815
Try to add FORTRAN interface to code coverage
spenke91 e8b5538
Merge remote-tracking branch 'origin/main' into increase
spenke91 664e856
Added tests for all fortran interface functions except iterate_replace
spenke91 9e1477e
Unified upper- and lowercase of t8_fortran_interface_mod.f90
spenke91 1849916
Remove incomplete version of t8_forest_iterate_replace_f from Fortran…
spenke91 e688e8f
Merge remote-tracking branch 'origin/main' into increase
spenke91 84be940
Clean up cmake/CodeCoverage.cmake
spenke91 3cbc593
Add Fortran Flags to code_coverage.yml
spenke91 3a2ed56
Try fortran code coverage
spenke91 5d16a6d
Try code coverage again
spenke91 9faa0e3
Fix issues with vtk header and C usability
spenke91 c834cc7
Make code coverage workflow include Fortran interface
spenke91 3fe9734
Do not set Fortran compiler manually in code coverage workflow
spenke91 5227703
Merge remote-tracking branch 'origin/main' into increase
spenke91 72c1e7c
Indentation
spenke91 0972ccf
Fixed more bugs in fortran tests and interface
spenke91 01474ca
Merge remote-tracking branch 'origin/main' into increase
spenke91 6b9bc3b
Fix typo
spenke91 6a2e02c
Merge branch 'main' into impr_fortran_interface
Davknapp 140f9e1
Incorporated reviewer suggestions
spenke91 f58e6b1
Merge remote-tracking branch 'origin/main' into impr_fortran_interface
spenke91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| ! This file is part of t8code. | ||
| ! t8code is a C library to manage a collection (a forest) of multiple | ||
| ! connected adaptive space-trees of general element classes in parallel. | ||
| ! | ||
| ! Copyright (C) 2026 the developers | ||
| ! | ||
| ! t8code is free software; you can redistribute it and/or modify | ||
| ! it under the terms of the GNU General Public License as published by | ||
| ! the Free Software Foundation; either version 2 of the License, or | ||
| ! (at your option) any later version. | ||
| ! | ||
| ! t8code is distributed in the hope that it will be useful, | ||
| ! but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| ! GNU General Public License for more details. | ||
| ! | ||
| ! You should have received a copy of the GNU General Public License | ||
| ! along with t8code; if not, write to the Free Software Foundation, Inc., | ||
| ! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
|
|
||
| ! This file contains a module with an example callback of the Fortran interface | ||
| ! that refines and coarsenes some elements based on their centroids' coordinates. | ||
| module t8_fortran_example_adapt_mod | ||
| use t8_fortran_interface_mod | ||
|
|
||
| contains | ||
|
|
||
| ! Example callback for adapting based on the centroid coordinates x, y, z. | ||
| function example_fortran_adapt_by_coordinates_callback(x, y, z, is_family) & | ||
| & result(ret) bind(c, name="example_fortran_adapt_by_coordinates_callback") | ||
| use, intrinsic :: ISO_C_BINDING, only: c_int, c_double | ||
| real(c_double), value :: x | ||
| real(c_double), value :: y | ||
| real(c_double), value :: z | ||
| integer(c_int), value :: is_family | ||
| integer(c_int) :: ret | ||
| ret = 0 | ||
| if(x < 0.5d0 .and. y < 0.5d0 .and. z < 0.5d0) then | ||
| ret = 1 | ||
| elseif(x > 0.5d0 .and. y > 0.5d0) then | ||
| if(is_family.ne.0) then | ||
| ret = -1 | ||
| endif | ||
| endif | ||
|
|
||
| end function example_fortran_adapt_by_coordinates_callback | ||
|
|
||
| end module t8_fortran_example_adapt_mod |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.