Skip to content

Commit

Permalink
Tempus: Revert changes done to Epetra CDR Model
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Sep 20, 2023
1 parent ae74ef2 commit 8776bf4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ TEUCHOS_UNIT_TEST(BackwardEuler, CDR)
std::vector<double> StepSize;
std::vector<double> xErrorNorm;
std::vector<double> xDotErrorNorm;
const int nTimeStepSizes = 1;
const int nTimeStepSizes = 5;
double dt = 0.2;
for (int n=0; n<nTimeStepSizes; n++) {

Expand Down
5 changes: 0 additions & 5 deletions packages/tempus/test/TestModels/CDR_Model_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ void CDR_Model<Scalar>::evalModelImpl(
if (nonnull(W_prec_out)) {
RCP<Epetra_Operator> M_epetra = Thyra::get_Epetra_Operator(*(W_prec_out->getNonconstRightPrecOp()));
M_inv = rcp_dynamic_cast<Epetra_CrsMatrix>(M_epetra);
M_inv->Print(std::cout);
TEUCHOS_ASSERT(nonnull(M_inv));
J_diagonal_ = Teuchos::rcp(new Epetra_Vector(*x_owned_map_));
}
Expand Down Expand Up @@ -498,12 +497,10 @@ void CDR_Model<Scalar>::evalModelImpl(
if (nonnull(M_inv)) {
int column=0;
double jac=1.0;
M_inv->Print(std::cout);
ierr = M_inv->ReplaceGlobalValues(0, 1, &jac, &column);
column=1;
jac=0.0;
ierr = M_inv->ReplaceGlobalValues(0, 1, &jac, &column);
M_inv->Print(std::cout);
}
}

Expand All @@ -512,8 +509,6 @@ void CDR_Model<Scalar>::evalModelImpl(

if (nonnull(M_inv)) {
// invert the Jacobian diagonal for the preconditioner

// M_inv->Print(std::cout);
M_inv->ExtractDiagonalCopy(*J_diagonal_);

for (int i=0; i < J_diagonal_->MyLength(); ++i)
Expand Down

0 comments on commit 8776bf4

Please sign in to comment.