-
Notifications
You must be signed in to change notification settings - Fork 250
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
Chimera remove strategy solve #7845
base: master
Are you sure you want to change the base?
Conversation
double SolveStrategy(StrategyPointerType& pStrategy) | ||
{ | ||
pStrategy->Initialize(); | ||
pStrategy->InitializeSolutionStep(); | ||
pStrategy->Predict(); | ||
pStrategy->SolveSolutionStep(); | ||
const double norm_dx = TSparseSpace::TwoNorm(pStrategy->GetSolutionVector()); | ||
pStrategy->FinalizeSolutionStep(); | ||
return norm_dx; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is exactly what one should NOT do
=> those calls come from the AnalysisStage and shouldn't be done internally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For fractional step strategy, this is not possible as there are two (momentum and pressure) internal strategies which should be called at different places. That is why it is done like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check how and where this function is called and used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I guess the FractionalStep Strategy hasn't been refactored yet
@rubenzorrilla can you comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that for fractional step solver, this is inevitable !
Each "Solve" of the fractional step looks something as follows
SolveSoltuionStep() # Of complete fractional step solver
SetFractionalStep(1)
TillConvergence :
SolveMomentumStrategy() # HERE : SolveStrategy() is used
ComputeOSSProjections()
Compute/Update/Backup Pressure()
SetFractionalStep(2)
.... BunchOfOtherOpps()
SolvePressureStrategy() # HERE : SolveStrategy() is used
UpdateEndOfStepVelocity()
So I am not sure if this would fit in the AnalysisStage. Also AnalysisStage does not have access to all those intermediate steps and functions !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think instead of SolveStrategy
only SolveSolutionStep
should be called
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't have time to remove the Solve
from the base FSStrategy
. In any case, I think it would be better to first take care of that and then update the Chimera one accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rubenzorrilla Thank you for the comment. If you have gone through my changes here and you say this is the way to go , I can do it in the fluid dynamics application.
Description
Following the issue #6748 and the recommendation of the technical committee, the following PR removes the explicit Solve() function calls from the fs strategy of the chimera application.
Changelog
Adds a local SolveStrategy function to the fs_strategy of the chimera app. And uses it to solve the momentum and pressure strategies. This function calls the Initialize, InitializeSolutionStep, SolveSolutionStep and FinializeSolutionStep in that sequence and returns the norm of the solution vector back.