3#ifndef DUNE_AMGCONSTRUCTION_HH
4#define DUNE_AMGCONSTRUCTION_HH
10#include <dune/istl/solvercategory.hh>
54 return std::make_shared<T>();
58 template<
class T,
class A>
65 return std::make_shared<BlockVector<T,A>>(n);
69 template<
class M,
class C>
70 struct ParallelOperatorArgs
72 ParallelOperatorArgs(std::shared_ptr<M> matrix,
const C& comm)
73 : matrix_(matrix), comm_(comm)
76 std::shared_ptr<M> matrix_;
81 struct OwnerOverlapCopyCommunicationArgs
84 : comm_(comm), cat_(cat)
92 struct SequentialCommunicationArgs
94 SequentialCommunicationArgs(CollectiveCommunication<void*> comm,
int cat)
100 CollectiveCommunication<void*> comm_;
106 template<
class M,
class X,
class Y,
class C>
107 class OverlappingSchwarzOperator;
109 template<
class M,
class X,
class Y,
class C>
110 class NonoverlappingSchwarzOperator;
114 template<
class M,
class X,
class Y,
class C>
115 class ConstructionTraits<OverlappingSchwarzOperator<M,X,Y,C> >
118 typedef ParallelOperatorArgs<M,C>
Arguments;
120 static inline std::shared_ptr<OverlappingSchwarzOperator<M,X,Y,C>>
construct(
const Arguments& args)
122 return std::make_shared<OverlappingSchwarzOperator<M,X,Y,C>>
123 (args.matrix_, args.comm_);
127 template<
class M,
class X,
class Y,
class C>
128 class ConstructionTraits<NonoverlappingSchwarzOperator<M,X,Y,C> >
131 typedef ParallelOperatorArgs<M,C>
Arguments;
133 static inline std::shared_ptr<NonoverlappingSchwarzOperator<M,X,Y,C>>
construct(
const Arguments& args)
135 return std::make_shared<NonoverlappingSchwarzOperator<M,X,Y,C>>
136 (args.matrix_, args.comm_);
140 template<
class M,
class X,
class Y>
141 struct MatrixAdapterArgs
143 MatrixAdapterArgs(std::shared_ptr<M> matrix,
const SequentialInformation)
147 std::shared_ptr<M> matrix_;
150 template<
class M,
class X,
class Y>
151 class ConstructionTraits<MatrixAdapter<M,X,Y> >
154 typedef const MatrixAdapterArgs<M,X,Y>
Arguments;
158 return std::make_shared<MatrixAdapter<M,X,Y>>(args.matrix_);
163 class ConstructionTraits<SequentialInformation>
166 typedef const SequentialCommunicationArgs
Arguments;
169 return std::make_shared<SequentialInformation>(args.comm_);
176 template<
class T1,
class T2>
177 class ConstructionTraits<OwnerOverlapCopyCommunication<T1,T2> >
180 typedef const OwnerOverlapCopyCommunicationArgs
Arguments;
182 static inline std::shared_ptr<OwnerOverlapCopyCommunication<T1,T2>>
construct(
Arguments& args)
184 return std::make_shared<OwnerOverlapCopyCommunication<T1,T2>>(args.comm_, args.cat_);
This file implements a vector space as a tensor product of a given vector space. The number of compon...
Traits class for generically constructing non default constructable types.
Definition: construction.hh:38
A vector of blocks with memory management.
Definition: bvector.hh:403
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentionally unused function parameters with.
Definition: unused.hh:25
const void * Arguments
A type holding all the arguments needed to call the constructor.
Definition: construction.hh:44
static std::shared_ptr< T > construct(Arguments &args)
Construct an object with the specified arguments.
Definition: construction.hh:52
Dune namespace.
Definition: alignedallocator.hh:14
Define general, extensible interface for operators. The available implementation wraps a matrix.
Classes providing communication interfaces for overlapping Schwarz methods.
Category
Definition: solvercategory.hh:21
Definition of the DUNE_UNUSED macro for the case that config.h is not available.