Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Tpetra-based version of Trilinos SparseMatrix and SparsityPattern. #16288

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmake/config/template-arguments.in
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ TRIANGULATIONS := { Triangulation<deal_II_dimension, deal_II_space_dimension>;
parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>;
parallel::fullydistributed::Triangulation<deal_II_dimension, deal_II_space_dimension>; }

TRILINOS_SCALARS := { @DEAL_II_EXPAND_TPETRA_TYPES@; }

// all supported logical dimensions
DIMENSIONS := { 1; 2; 3 }

Expand Down
1 change: 1 addition & 0 deletions cmake/configure/configure_20_trilinos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ macro(feature_trilinos_configure_external)

if(${DEAL_II_TRILINOS_WITH_TPETRA})
if(DEAL_II_HAVE_TPETRA_INST_DOUBLE)
set(DEAL_II_EXPAND_TPETRA_TYPES "double")
set(DEAL_II_EXPAND_TPETRA_VECTOR_DOUBLE "LinearAlgebra::TpetraWrappers::Vector<double>")
endif()
if(DEAL_II_HAVE_TPETRA_INST_FLOAT)
Expand Down
5 changes: 5 additions & 0 deletions doc/news/changes/major/20231122SebastianKinnewig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
New: LinearAlgebra::TpetraWrappers::SparseMatrix class
that implements a wrapper for Tpetra::CrsMatrix.
<br>
(Sebastian Kinnewig, 2023/11/22)

5 changes: 4 additions & 1 deletion include/deal.II/base/template_constraints.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,10 @@ namespace LinearAlgebra
{
template <typename Number>
class Vector;
}

template <typename Number, typename MemorySpace>
class SparseMatrix;
} // namespace TpetraWrappers
# endif
} // namespace LinearAlgebra
#endif
Expand Down
2 changes: 2 additions & 0 deletions include/deal.II/lac/affine_constraints.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
#include <deal.II/lac/trilinos_block_sparse_matrix.h>
#include <deal.II/lac/trilinos_parallel_block_vector.h>
#include <deal.II/lac/trilinos_sparse_matrix.h>
#include <deal.II/lac/trilinos_tpetra_sparse_matrix.h>
#include <deal.II/lac/trilinos_tpetra_vector.h>
Comment on lines +50 to +51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you make no other changes to this file, do you actually need these #includes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That originates from some changes that are not included in this pull request.

I removed those includes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: These changes are actually needed. Otherwise, affine_constraints.inst does not compile.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could these lines be move to the .templates.h file then? Or ideally to the .cc file? This way they don't have to be included transitively by everyone who just wants the affine_constraints.h file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are already in the .templates.h file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake -- I now realize that I'm looking at the .templates.h file, not the .h file.

#include <deal.II/lac/trilinos_vector.h>

#include <boost/serialization/complex.hpp>
Expand Down