Skip to content

Commit

Permalink
Add DealIIMatrixFreeMeshEvaluator::build_range_vector()
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Dec 18, 2018
1 parent ebe4438 commit 6cecfec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/mfmg/dealii/dealii_matrix_free_mesh_evaluator.hpp
Expand Up @@ -34,6 +34,9 @@ class DealIIMatrixFreeMeshEvaluator : public DealIIMeshEvaluator<dim>
vmult(dealii::LinearAlgebra::distributed::Vector<double> &dst,
dealii::LinearAlgebra::distributed::Vector<double> const &src) const;

std::shared_ptr<dealii::LinearAlgebra::distributed::Vector<double>>
build_range_vector() const;

private:
std::shared_ptr<dealii::TrilinosWrappers::SparseMatrix> _sparse_matrix;
};
Expand Down
9 changes: 9 additions & 0 deletions source/dealii/dealii_matrix_free_mesh_evaluator.cc
Expand Up @@ -44,6 +44,15 @@ void DealIIMatrixFreeMeshEvaluator<dim>::vmult(
{
_sparse_matrix->vmult(dst, src);
}

template <int dim>
std::shared_ptr<dealii::LinearAlgebra::distributed::Vector<double>>
DealIIMatrixFreeMeshEvaluator<dim>::build_range_vector() const
{
return std::make_shared<dealii::LinearAlgebra::distributed::Vector<double>>(
_sparse_matrix->locally_owned_range_indices(),
_sparse_matrix->get_mpi_communicator());
}
} // namespace mfmg

// Explicit Instantiation
Expand Down

0 comments on commit 6cecfec

Please sign in to comment.