-
Notifications
You must be signed in to change notification settings - Fork 65
Gradient operator #223
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
Closed
Closed
Gradient operator #223
Conversation
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 commit enables the building of MOLE with the command "fpm build".
This commit enables "fpm install" to install the MOLE library. For example, fpm install --prefix ~/.local creates "~/.local/lib/libMOLE.a".
This commit adds
* A grad_op_{m,s} module and submodule in src/fortran
* A corresponding test suite in a new "test" subdirectory
The grad_op module & submodule define a grad_op_t derived type
and a stub constructor that can be invoked as grad_op_t(k,m,dx),
where k, m, and dx are the order of accuracy, number of cells,
and step size. The test simply verifies that the constructor
executes.
This commit works around a missing Fortran 2008 feature that was added to gfortran in version 14.3.
This commit 1. Switchese from git@ to https:// in URLs to support users who don't have SSH keys on GitHub. 2. Updates the Julienne version to 3.1.3 for better output formatting.
This commit updates the Julienne dependency to version 3.1.4, which works around an issue in the NAG Fortran compiler version 7.2, Build 7235.
This commit updates the Julienne dependency to version 3.1.5, which works around an issue in the Intel ifx compiler version 2025.1.2, Build 20250806.
This commit contains * mimetic_matrix_t: - encapsulates the non-zero mimetic-discretization matrix coefficients * face_values_t: - encapsulates face-centered values * gradient_operator_t: - renamed from grad_op_t - contains a mimetic_matrix_t component - provides `.grad. face_values_t` via `mimetic_matrix_t .x. face_values_t` * gradient_t: - result of .grad. face_values_t * unit test edits reflecting the renamed gradient_operator_t
combine all types into one module family tree: face_values_m module |-- mimetic_matrix_s submodule |-- gradient_operator_s submodule |-- gradient_s submodule
This commit adds a passing test of computing the gradient of a linear function using the 1D mimetic gradient operater defined in Corbino & Castillo (2019).
This commit 1. Synchronizes a conditionally compiled gfortran workaround to match the updated alternative block. 2. Updates the unit test to work around a gfortran issue with `associate`.
This commit fixes issues with the matrix-vector multiplication function "matvec" to ensure infers the loop limits and array section bounds from the dimensions of the arrays accessed by the loop or array section.
This commit adds the ability to convert a mimetic matrix to a
Julienne file_t object so that the matrix elements can be printed
with code like the following
type(mimetic_matrix_t) mimetic_matrix
! define matrix here
associate(file => mimetic_matrix%to_file_t())
call file%write_lines()
end associate
Now all tests pass for computing 1D gradients of 0th, 1st, & 2nd-order polynomials, each with mimetic discretizations of 2nd- and 4th-order accuracy.
This commit adds tests of the ratio of the log of the maximum absolute error for gradients of a sinusoidal function. The tests verify that 2nd- and 4th-order mimetic discretizations converge to the expected gradient values at a rate proportional to dx raised to the 2nd and 4th powers of the error within a tolerance of 5%.
To work around gfortran-14 not supporting `do concurrent` locality specifiers, this commit removes specifiers conditionally via a new macro: HAVE_LOCALITY_SPECIFIER_SUPPORT defined in include/mole-language-support.F90.
Author
|
@joehellmers I have removed the Draft status from this PR. It's now ready for review and merging. On my macOS laptop, all tests pass with
|
6d3b83b to
1a1b502
Compare
1a1b502 to
3cc1e81
Compare
Collaborator
|
@rouson I think we need to make dev/fortran the target branch for this PR. |
Author
|
@joehellmersNOAA oops! That was my intention. I'll close this and open a new one against dev/fortran. |
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.
What type of PR is this? (check all applicable)
Description
This PR adds 2nd- and 4th-order 1D gradient operators and associated unit tests.
Related Issues & Documents
N.A.
QA Instructions, Screenshots, Recordings
or
which currently works with GCC 15. I need to insert some workarounds to support GCC 13 and 14.
Either of the above commands should yield trailing output similar to the following:
Added/updated tests?
_We encourage you to test all code included with MOLE, including examples.
have not been included
Read Contributing Guide and Code of Conduct
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
🥳