3#ifndef DUNE_AMGCONSTRUCTION_HH
4#define DUNE_AMGCONSTRUCTION_HH
10#include <dune/istl/solvercategory.hh>
68 template<
class T,
class A>
84 template<
class M,
class C>
85 struct OverlappingSchwarzOperatorArgs
87 OverlappingSchwarzOperatorArgs(M& matrix, C& comm)
88 : matrix_(&matrix), comm_(&comm)
95 template<
class M,
class C>
96 struct NonoverlappingOperatorArgs
98 NonoverlappingOperatorArgs(M& matrix, C& comm)
99 : matrix_(&matrix), comm_(&comm)
107 struct OwnerOverlapCopyCommunicationArgs
110 : comm_(comm), cat_(cat)
118 struct SequentialCommunicationArgs
120 SequentialCommunicationArgs(CollectiveCommunication<void*> comm,
int cat)
126 CollectiveCommunication<void*> comm_;
132 template<
class M,
class X,
class Y,
class C>
133 class OverlappingSchwarzOperator;
135 template<
class M,
class X,
class Y,
class C>
136 class NonoverlappingSchwarzOperator;
140 template<
class M,
class X,
class Y,
class C>
141 class ConstructionTraits<OverlappingSchwarzOperator<M,X,Y,C> >
144 typedef OverlappingSchwarzOperatorArgs<M,C>
Arguments;
148 return new OverlappingSchwarzOperator<M,X,Y,C>(*args.matrix_, *args.comm_);
151 static inline void deconstruct(OverlappingSchwarzOperator<M,X,Y,C>* t)
157 template<
class M,
class X,
class Y,
class C>
158 class ConstructionTraits<NonoverlappingSchwarzOperator<M,X,Y,C> >
161 typedef NonoverlappingOperatorArgs<M,C>
Arguments;
163 static inline NonoverlappingSchwarzOperator<M,X,Y,C>*
construct(
const Arguments& args)
165 return new NonoverlappingSchwarzOperator<M,X,Y,C>(*args.matrix_, *args.comm_);
168 static inline void deconstruct(NonoverlappingSchwarzOperator<M,X,Y,C>* t)
174 template<
class M,
class X,
class Y>
175 struct MatrixAdapterArgs
177 MatrixAdapterArgs(M& matrix,
const SequentialInformation&)
184 template<
class M,
class X,
class Y>
185 class ConstructionTraits<MatrixAdapter<M,X,Y> >
188 typedef const MatrixAdapterArgs<M,X,Y>
Arguments;
192 return new MatrixAdapter<M,X,Y>(*args.matrix_);
195 static inline void deconstruct(MatrixAdapter<M,X,Y>* m)
202 class ConstructionTraits<SequentialInformation>
205 typedef const SequentialCommunicationArgs
Arguments;
208 return new SequentialInformation(args.comm_);
211 static inline void deconstruct(SequentialInformation* si)
220 template<
class T1,
class T2>
221 class ConstructionTraits<OwnerOverlapCopyCommunication<T1,T2> >
224 typedef const OwnerOverlapCopyCommunicationArgs
Arguments;
228 return new OwnerOverlapCopyCommunication<T1,T2>(args.comm_, args.cat_);
231 static inline void deconstruct(OwnerOverlapCopyCommunication<T1,T2>* com)
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:317
#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 T * construct(Arguments &args)
Construct an object with the specified arguments.
Definition: construction.hh:52
static void deconstruct(T *t)
Destroys an object.
Definition: construction.hh:61
Dune namespace.
Definition: alignedallocator.hh:10
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.