Skip to content

Commit

Permalink
Merge pull request #15585 from bangerth/doc-y
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Jul 2, 2023
2 parents dbf4e5f + 35365f9 commit 1ea0864
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
16 changes: 13 additions & 3 deletions include/deal.II/lac/trilinos_epetra_communication_pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,21 @@ namespace LinearAlgebra
const MPI_Comm communicator);

/**
* Reinitialize the object.
* Reinitialize the communication pattern.
*
* @param[in] locally_owned_indices The set of indices of elements
* in the array mentioned in the class documentation that are
* stored on the current process.
* @param[in] ghost_indices The set of indices of elements in the
* array mentioned in the class documentation that the current
* process will need to be able to import.
* @param[in] communicator The MPI communicator used to describe the
* entire set of processes that participate in the storage and
* access to elements of the array.
*/
virtual void
reinit(const IndexSet &vector_space_vector_index_set,
const IndexSet &read_write_vector_index_set,
reinit(const IndexSet &locally_owned_indices,
const IndexSet &ghost_indices,
const MPI_Comm communicator) override;

/**
Expand Down
16 changes: 13 additions & 3 deletions include/deal.II/lac/trilinos_tpetra_communication_pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,21 @@ namespace LinearAlgebra
const MPI_Comm communicator);

/**
* Reinitialize the object.
* Reinitialize the communication pattern.
*
* @param[in] locally_owned_indices The set of indices of elements
* in the array mentioned in the class documentation that are
* stored on the current process.
* @param[in] ghost_indices The set of indices of elements in the
* array mentioned in the class documentation that the current
* process will need to be able to import.
* @param[in] communicator The MPI communicator used to describe the
* entire set of processes that participate in the storage and
* access to elements of the array.
*/
virtual void
reinit(const IndexSet &vector_space_vector_index_set,
const IndexSet &read_write_vector_index_set,
reinit(const IndexSet &locally_owned_indices,
const IndexSet &ghost_indices,
const MPI_Comm communicator) override;

/**
Expand Down
8 changes: 4 additions & 4 deletions source/lac/trilinos_epetra_communication_pattern.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ namespace LinearAlgebra


void
CommunicationPattern::reinit(const IndexSet &vector_space_vector_index_set,
const IndexSet &read_write_vector_index_set,
CommunicationPattern::reinit(const IndexSet &locally_owned_indices,
const IndexSet &ghost_indices,
const MPI_Comm communicator)
{
comm = std::make_shared<const MPI_Comm>(communicator);

Epetra_Map vector_space_vector_map =
vector_space_vector_index_set.make_trilinos_map(*comm, false);
locally_owned_indices.make_trilinos_map(*comm, false);
Epetra_Map read_write_vector_map =
read_write_vector_index_set.make_trilinos_map(*comm, true);
ghost_indices.make_trilinos_map(*comm, true);

// Target map is read_write_vector_map
// Source map is vector_space_vector_map. This map must have uniquely
Expand Down
8 changes: 4 additions & 4 deletions source/lac/trilinos_tpetra_communication_pattern.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ namespace LinearAlgebra


void
CommunicationPattern::reinit(const IndexSet &vector_space_vector_index_set,
const IndexSet &read_write_vector_index_set,
CommunicationPattern::reinit(const IndexSet &locally_owned_indices,
const IndexSet &ghost_indices,
const MPI_Comm communicator)
{
comm = std::make_shared<const MPI_Comm>(communicator);

auto vector_space_vector_map =
Teuchos::rcp(new Tpetra::Map<int, types::signed_global_dof_index>(
vector_space_vector_index_set.make_tpetra_map(*comm, false)));
locally_owned_indices.make_tpetra_map(*comm, false)));
auto read_write_vector_map =
Teuchos::rcp(new Tpetra::Map<int, types::signed_global_dof_index>(
read_write_vector_index_set.make_tpetra_map(*comm, true)));
ghost_indices.make_tpetra_map(*comm, true)));

// Target map is read_write_vector_map
// Source map is vector_space_vector_map. This map must have uniquely
Expand Down

0 comments on commit 1ea0864

Please sign in to comment.