Skip to content
Snippets Groups Projects
Commit e12e44e6 authored by Timo Koch's avatar Timo Koch
Browse files

[test][scalarproduct] Test constructor taking a shared_ptr<const Comm>

parent 146917ac
No related branches found
No related tags found
No related merge requests found
......@@ -119,24 +119,27 @@ int main(int argc, char** argv)
// Test the ParallelScalarProduct class
{
using Vector = BlockVector<FieldVector<double,BlockSize> >;
using ScalarProduct = ParallelScalarProduct<Vector, OwnerOverlapCopyCommunication<std::size_t,std::size_t> >;
OwnerOverlapCopyCommunication<std::size_t,std::size_t> communicator;
using Comm = OwnerOverlapCopyCommunication<std::size_t,std::size_t>;
using ScalarProduct = ParallelScalarProduct<Vector, Comm>;
auto communicator = std::make_shared<Comm>();
ScalarProduct scalarProduct(communicator,SolverCategory::nonoverlapping);
scalarProductTest<ScalarProduct, Vector>(scalarProduct,numBlocks);
}
{
using Vector = BlockVector<float>;
using ScalarProduct = ParallelScalarProduct<Vector, OwnerOverlapCopyCommunication<std::size_t,std::size_t> >;
OwnerOverlapCopyCommunication<std::size_t,std::size_t> communicator;
using Comm = OwnerOverlapCopyCommunication<std::size_t,std::size_t>;
using ScalarProduct = ParallelScalarProduct<Vector, Comm>;
auto communicator = std::make_shared<Comm>();
ScalarProduct scalarProduct(communicator,SolverCategory::nonoverlapping);
scalarProductTest<ScalarProduct, Vector>(scalarProduct,numBlocks);
}
{
using Vector = BlockVector<FieldVector<std::complex<double>, 1> >;
using ScalarProduct = ParallelScalarProduct<Vector, OwnerOverlapCopyCommunication<std::size_t,std::size_t> >;
OwnerOverlapCopyCommunication<std::size_t,std::size_t> communicator;
using Comm = OwnerOverlapCopyCommunication<std::size_t,std::size_t>;
using ScalarProduct = ParallelScalarProduct<Vector, Comm>;
Comm communicator; // test constructor taking a const reference to the communicator
ScalarProduct scalarProduct(communicator,SolverCategory::nonoverlapping);
scalarProductTest<ScalarProduct, Vector>(scalarProduct,numBlocks);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment