Skip to content

Commit

Permalink
Piro: a couple of cleanups to avoid warnings printed when running cod…
Browse files Browse the repository at this point in the history
…e. (#7567)
  • Loading branch information
ikalash authored Jun 20, 2020
1 parent 497160d commit 13cc64a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,16 @@ void
Piro::ObserverToTempusIntegrationObserverAdapter<Scalar>::observeTimeStep()
{
Scalar current_dt;
if (Teuchos::nonnull(solutionHistory_->getWorkingState())) {
current_dt = solutionHistory_->getWorkingState()->getTimeStep();
if (Teuchos::nonnull(solutionHistory_->getCurrentState())) {
current_dt = solutionHistory_->getCurrentState()->getTimeStep();
}
else {
current_dt = solutionHistory_->getCurrentState()->getTimeStep();
}

//Don't observe solution if step failed to converge
if ((solutionHistory_->getWorkingState() != Teuchos::null) &&
(solutionHistory_->getWorkingState()->getSolutionStatus() == Tempus::Status::FAILED)) {
if ((solutionHistory_->getCurrentState() != Teuchos::null) &&
(solutionHistory_->getCurrentState()->getSolutionStatus() == Tempus::Status::FAILED)) {
Scalar min_dt = timeStepControl_->getMinTimeStep();
if ((previous_dt_ == current_dt) && (previous_dt_ == min_dt)) {
TEUCHOS_TEST_FOR_EXCEPTION(true, Teuchos::Exceptions::InvalidParameter,
Expand Down
2 changes: 1 addition & 1 deletion packages/piro/src/Piro_TransientSolver_Def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Piro::TransientSolver<Scalar>::evalConvergedModelResponsesAndSensitivities(
using Teuchos::RCP;
using Teuchos::rcp;

*out_ << "\nE) Calculate responses ...\n";
*out_ << "\nF) Calculate responses ...\n";

// Solution at convergence is the response at index num_g_
RCP<Thyra::VectorBase<Scalar> > gx_out = outArgs.get_g(num_g_);
Expand Down

0 comments on commit 13cc64a

Please sign in to comment.