Skip to content

Commit

Permalink
NOX,Panzer: minor changes for Charon
Browse files Browse the repository at this point in the history
Signed-off-by: Roger Pawlowski <[email protected]>
  • Loading branch information
rppawlo committed Nov 21, 2024
1 parent 70822c3 commit dc24fa1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 7 additions & 3 deletions packages/nox/src-thyra/NOX_Thyra_Group.C
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,13 @@ NOX::Thyra::Group::applyJacobianTransposeMultiVector(
NOX::Abstract::MultiVector& result) const
{
if ( !(this->isJacobian()) ) {
TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error,
"NOX Error - Jacobian is not valid. " <<
"Call computeJacobian before calling applyJacobian!");
// Should throw if algorithm hasn't updated the Jacobian (force
// devs to think about efficiency of reevaluating J within an
// algorithm) but a certain application needs this temporarily.
const_cast<NOX::Thyra::Group*>(this)->computeJacobian();
// TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error,
// "NOX Error - Jacobian is not valid. " <<
// "Call computeJacobian before calling applyJacobian!");
}

NOX_ASSERT(nonnull(lop_));
Expand Down
7 changes: 5 additions & 2 deletions packages/panzer/disc-fe/src/Panzer_ModelEvaluator_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1763,8 +1763,11 @@ evalModelImpl_basic_dgdp_scalar(const Thyra::ModelEvaluatorBase::InArgs<Scalar>
RCP<panzer::ResponseMESupportBase<panzer::Traits::Tangent> > resp =
rcp_dynamic_cast<panzer::ResponseMESupportBase<panzer::Traits::Tangent> >(
responseLibrary_->getResponse<panzer::Traits::Tangent>(responseName));
resp->setVector(vec);
is_active = true;

if (nonnull(resp)) {
resp->setVector(vec);
is_active = true;
}
}
}

Expand Down

0 comments on commit dc24fa1

Please sign in to comment.