Skip to content

Commit

Permalink
cleaning up what is valid and not for debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
ecoon committed Oct 7, 2024
1 parent 8923f71 commit 4d4db07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 6 additions & 3 deletions src/pks/flow/overland_pressure_ti.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@ OverlandPressureFlow::FunctionalResidual(double t_old,
vecs.emplace_back(S_->GetPtr<CompositeVector>(Keys::getKey(domain_, "fractional_conductance"), tag_next_).ptr());
}

if (S_->HasRecord(Keys::getKey(domain_, "unfrozen_fraction"), tag_next_) &&
S_->HasRecord(Keys::getKey(domain_, "unfrozen_fraction"), tag_current_)) {

if (S_->HasRecord(Keys::getKey(domain_, "unfrozen_fraction"), tag_current_)) {
Key uf_key = Keys::getKey(domain_, "unfrozen_fraction");
vnames.emplace_back("uf_frac_old");
vnames.emplace_back("uf_frac_new");
vecs.emplace_back(S_->GetPtr<CompositeVector>(uf_key, tag_current_).ptr());
}
if (S_->HasRecord(Keys::getKey(domain_, "unfrozen_fraction"), tag_next_)) {
Key uf_key = Keys::getKey(domain_, "unfrozen_fraction");
vnames.emplace_back("uf_frac_new");
vecs.emplace_back(S_->GetPtr<CompositeVector>(uf_key, tag_next_).ptr());
}

Expand Down
10 changes: 6 additions & 4 deletions src/pks/flow/richards_pk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,13 @@ Richards::UpdatePermeabilityDerivativeData_(const Tag& tag)
}
}

std::vector<std::string> vnames{ "dkrel", "uw_dkrel" };
std::vector<std::string> vnames{ "dkrel" };
std::vector<Teuchos::Ptr<const CompositeVector>> vecs{
S_->GetDerivativePtr<CompositeVector>(coef_key_, tag, key_, tag).ptr(),
S_->GetPtr<CompositeVector>(duw_coef_key_, tag).ptr()
};
S_->GetDerivativePtr<CompositeVector>(coef_key_, tag, key_, tag).ptr() };
if (!duw_coef_key_.empty()) {
vnames.emplace_back("uw_dkrel");
vecs.emplace_back(S_->GetPtr<CompositeVector>(duw_coef_key_, tag).ptr());
}
db_->WriteVectors(vnames, vecs, true);

// debugging
Expand Down

0 comments on commit 4d4db07

Please sign in to comment.