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

Better User Information on When to SetRFactor #53

Open
jbschroder opened this issue Jul 24, 2020 · 1 comment
Open

Better User Information on When to SetRFactor #53

jbschroder opened this issue Jul 24, 2020 · 1 comment
Assignees

Comments

@jbschroder
Copy link
Member

As of right now, the user doesn't have good information on when to SetRFactor. The user could easily SetRFactor during FCRelax and during FRestrict, while on level 0, and the effort to compute SetRFactor during FCRelax would be wasted.

So, the proposal is to create a new Status element (say, "RFactorOK") that tells the user (True/False) whether to compute an RFactor.

This value would only ever be true during FRestrict on level 0, so the user would only be "told" to SetRFactor exactly once for each point on the fine grid per iteration. This new status element would have to be set to TRUE during FRestrict during BOTH the F-relax and C-relax for the residual computation.

All other StepStatusInit() calls would have to set this value to False. No other status structures (Access, CoarsenRef,...) would use this status element.

LASTLY, the SetRFactor function in braid_status.c would have to be changed. Instead of the
if (ii >= 0)
we would check
if core/status->RFactorOK == True

The same logic would need to be done in SetRefinementDtValues

Lastly, the example codes would have to be updated to use this new status element.

@cadaverous-lives
Copy link
Collaborator

@jbschroder, @rfalgout,

Can't this be achieved by just doing:

braid_Int
braid_StatusAcceptsRFactor(braid_Status status)
{
   braid_Int level  = _braid_StatusElt(status, level);
   braid_Int caller = _braid_StatusElt(status, calling_function);
   /* Only accept rfactors in FRestrict on the fine-grid */
   return ((caller == braid_ASCaller_FRestrict || caller == braid_ASCaller_FASResidual) && (level == 0));
}

I was wondering about something like this myself, since I am working on the adaptive refinement stuff for theta method, this would be handy.

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

No branches or pull requests

3 participants