Skip to content
Discussion options

You must be logged in to vote

I'd like to share my solution to this problem, in case someone else may face the same issue.

The source term function in each stage has a different contribution to the final result in this cycle, but we couldn't get this "weight" easily, since it involves some iterative process of registers phydro->u and phydro->u1. Except the need to modify the source code, we also need to compute these weights, and I come up with the following trick:

  Real GetSourceTermWeight(int stage) {
    auto stage_wghts = ptlist->GetStageWeight();
    Real u = 0, u1 = 0;  
    for (int s = 1; s <= nstages; ++s) { 
      auto stage_wght = stage_wghts[s-1];
      if (stage_wght.main_stage) {  
        u1 = u1 + sta…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@c-kj
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by c-kj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants