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

MRI-adaptivity #564

Open
wants to merge 292 commits into
base: develop
Choose a base branch
from
Open

MRI-adaptivity #564

wants to merge 292 commits into from

Conversation

drreynolds
Copy link
Collaborator

@drreynolds drreynolds commented Sep 5, 2024

I think that this PR is now ready for full review.

Note: I removed all of the changesets that I'd pulled from @Steven-Roberts's PR #547 to simplify the review process for this PR.

balos1
balos1 previously approved these changes Nov 8, 2024
doc/arkode/guide/source/Mathematics.rst Outdated Show resolved Hide resolved
doc/arkode/guide/source/Mathematics.rst Outdated Show resolved Hide resolved
doc/arkode/guide/source/Mathematics.rst Outdated Show resolved Hide resolved
doc/arkode/guide/source/Mathematics.rst Outdated Show resolved Hide resolved
doc/arkode/guide/source/Mathematics.rst Outdated Show resolved Hide resolved
src/arkode/arkode_mristep.c Outdated Show resolved Hide resolved
src/arkode/arkode_mristep.c Outdated Show resolved Hide resolved
src/arkode/arkode_mristep.c Outdated Show resolved Hide resolved
src/arkode/arkode.c Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@drreynolds drreynolds left a comment

Choose a reason for hiding this comment

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

@gardner48: I accepted your more obvious suggestions, but I have questions about others (see comments below).

src/arkode/arkode_mristep.c Outdated Show resolved Hide resolved
src/arkode/arkode_mristep.c Show resolved Hide resolved
potentially get inner dsm on all non-embedding stages */
/* Reset the inner stepper on the first stage within all but the
first stage group due to "stage-restart" structure */
if ((stage > 1) && (is == 0))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe so, yes.

@drreynolds
Copy link
Collaborator Author

@gardner48 and @Steven-Roberts: I believe that I've addressed all of David's comments, but I'm about to board a plane so I can't merge with develop just yet. Feel free to review the current code and provide any further comments; I'll get around to merging with develop and updating the answers repository and .out files when I get a chance.

Comment on lines 157 to 160
if (argc > 2) udata.Npart = (int)atoi(argv[2]);
if (argc > 3) udata.G = (sunrealtype)atof(argv[3]);
if (argc > 4) udata.e = (sunrealtype)atof(argv[4]);
if (argc > 5) udata.omega = (sunrealtype)atof(argv[5]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (argc > 2) udata.Npart = (int)atoi(argv[2]);
if (argc > 3) udata.G = (sunrealtype)atof(argv[3]);
if (argc > 4) udata.e = (sunrealtype)atof(argv[4]);
if (argc > 5) udata.omega = (sunrealtype)atof(argv[5]);
if (argc > 2) udata.Npart = atoi(argv[2]);
if (argc > 3) udata.G = SUNStrToReal(argv[3]);
if (argc > 4) udata.e = SUNStrToReal(argv[4]);
if (argc > 5) udata.omega = SUNStrToReal(argv[5]);

Same in the other new unit test files, but I won't duplicate this comment

where :math:`\Delta c_i^S=\left(c^S_i - c^S_{i-1}\right)`, :math:`\tau = (t -
t_{n,i-1}^S)/(h^S \Delta c_i^S)` is the normalized time, the coefficients
:math:`\omega_{i,j}` and :math:`\gamma_{i,j}` are polynomials in time of degree
:math:`k` given by
Copy link
Collaborator

Choose a reason for hiding this comment

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

In this section k is used as both the degree (a fixed constant) and an index variable which could be a bit confusing. Using two variables may help


A explicit MERK method (does not support a slow implicit operator, :math:`f^I`).

.. c:enumerator:: MRISTEP_MRISR
Copy link
Collaborator

Choose a reason for hiding this comment

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

Having MRI twice in the name seems somewhat redundant. Perhaps just MRISTEP_SR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants