Skip to content

Commit

Permalink
Added parallel communication in transport Advance() to fix #285
Browse files Browse the repository at this point in the history
Added parallel comuunication update for calculating cell-center darcy velocity
  • Loading branch information
dasvyat authored and ecoon committed Feb 12, 2025
1 parent 0857303 commit c03d249
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/pks/flow/richards_pk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ Richards::CalculateDiagnostics(const Tag& tag)
// derive fluxes
Teuchos::RCP<CompositeVector> flux = S_->GetPtrW<CompositeVector>(flux_key_, tag_next_, name_);
matrix_diff_->UpdateFlux(pres.ptr(), flux.ptr());
flux->ScatterMasterToGhosted("face");
UpdateVelocity_(tag);
};

Expand Down
3 changes: 3 additions & 0 deletions src/pks/transport/transport_ats_pk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,9 @@ Transport_ATS::AdvanceStep(double t_old, double t_new, bool reinit)
S_->GetEvaluator(flux_key_, Tags::NEXT).Update(*S_, name_);

// why are we re-assigning all of these? The previous pointers shouldn't have changed... --ETC
S_->Get<CompositeVector>(flux_key_, Tags::NEXT).ScatterMasterToGhosted("face");
flux_ = S_->Get<CompositeVector>(flux_key_, Tags::NEXT).ViewComponent("face", true);

// why are we copying this? This should result in constant flux, no need to copy? --ETC
*flux_copy_ = *flux_; // copy flux vector from S_next_ to S_;

Expand Down Expand Up @@ -1035,6 +1037,7 @@ Transport_ATS::AdvanceStep(double t_old, double t_new, bool reinit)
VV_PrintSoluteExtrema(tcc_next, dt_MPC);
}


// ETC BEGIN HACKING
StableTimeStep();

Expand Down

0 comments on commit c03d249

Please sign in to comment.