Skip to content

Commit

Permalink
Merge Pull Request #9811 from trilinos/Trilinos/fix-9638-take-2
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: adding "start owned" parameter to FECrsMatrix to start
PR Author: tjfulle
  • Loading branch information
trilinos-autotester authored Oct 26, 2021
2 parents 0c84fa1 + 2cf5e81 commit a01a8dd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/tpetra/core/src/Tpetra_FECrsMatrix_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,17 @@ FECrsMatrix(const Teuchos::RCP<const fe_crs_graph_type>& graph,
( *graph->activeCrsGraph_!= fe_crs_graph_type::FE_ACTIVE_OWNED,std::runtime_error,
"Input graph must be in FE_ACTIVE_OWNED mode when this constructor is called.");

activeCrsMatrix_ = Teuchos::rcp(new FEWhichActive(FE_ACTIVE_OWNED_PLUS_SHARED));
bool start_owned = false;
if (! params.is_null ()) {
if (params->isParameter ("start owned")) {
start_owned = params->get<bool>("start owned", start_owned);
}
}
if(start_owned) {
activeCrsMatrix_ = Teuchos::rcp(new FEWhichActive(FE_ACTIVE_OWNED));
} else {
activeCrsMatrix_ = Teuchos::rcp(new FEWhichActive(FE_ACTIVE_OWNED_PLUS_SHARED));
}

// Make an "inactive" matrix, if we need to
if(!graph->inactiveCrsGraph_.is_null() ) {
Expand Down

0 comments on commit a01a8dd

Please sign in to comment.