4#ifndef DUNE_AMGCONSTRUCTION_HH
5#define DUNE_AMGCONSTRUCTION_HH
11#include <dune/istl/solvercategory.hh>
69 template<
class T,
class A>
85 template<
class M,
class C>
86 struct OverlappingSchwarzOperatorArgs
88 OverlappingSchwarzOperatorArgs(M& matrix, C& comm)
89 : matrix_(&matrix), comm_(&comm)
96 template<
class M,
class C>
97 struct NonoverlappingOperatorArgs
99 NonoverlappingOperatorArgs(M& matrix, C& comm)
100 : matrix_(&matrix), comm_(&comm)
108 struct OwnerOverlapCopyCommunicationArgs
111 : comm_(comm), cat_(cat)
119 struct SequentialCommunicationArgs
121 SequentialCommunicationArgs(CollectiveCommunication<void*> comm,
int cat)
127 CollectiveCommunication<void*> comm_;
133 template<
class M,
class X,
class Y,
class C>
134 class OverlappingSchwarzOperator;
136 template<
class M,
class X,
class Y,
class C>
137 class NonoverlappingSchwarzOperator;
141 template<
class M,
class X,
class Y,
class C>
142 class ConstructionTraits<OverlappingSchwarzOperator<M,X,Y,C> >
145 typedef OverlappingSchwarzOperatorArgs<M,C>
Arguments;
149 return new OverlappingSchwarzOperator<M,X,Y,C>(*args.matrix_, *args.comm_);
152 static inline void deconstruct(OverlappingSchwarzOperator<M,X,Y,C>* t)
158 template<
class M,
class X,
class Y,
class C>
159 class ConstructionTraits<NonoverlappingSchwarzOperator<M,X,Y,C> >
162 typedef NonoverlappingOperatorArgs<M,C>
Arguments;
164 static inline NonoverlappingSchwarzOperator<M,X,Y,C>*
construct(
const Arguments& args)
166 return new NonoverlappingSchwarzOperator<M,X,Y,C>(*args.matrix_, *args.comm_);
169 static inline void deconstruct(NonoverlappingSchwarzOperator<M,X,Y,C>* t)
175 template<
class M,
class X,
class Y>
176 struct MatrixAdapterArgs
178 MatrixAdapterArgs(M& matrix,
const SequentialInformation&)
185 template<
class M,
class X,
class Y>
186 class ConstructionTraits<MatrixAdapter<M,X,Y> >
189 typedef const MatrixAdapterArgs<M,X,Y>
Arguments;
193 return new MatrixAdapter<M,X,Y>(*args.matrix_);
196 static inline void deconstruct(MatrixAdapter<M,X,Y>* m)
203 class ConstructionTraits<SequentialInformation>
206 typedef const SequentialCommunicationArgs
Arguments;
209 return new SequentialInformation(args.comm_);
212 static inline void deconstruct(SequentialInformation* si)
221 template<
class T1,
class T2>
222 class ConstructionTraits<OwnerOverlapCopyCommunication<T1,T2> >
225 typedef const OwnerOverlapCopyCommunicationArgs
Arguments;
229 return new OwnerOverlapCopyCommunication<T1,T2>(args.comm_, args.cat_);
232 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:39
A vector of blocks with memory management.
Definition: bvector.hh:254
const void * Arguments
A type holding all the arguments needed to call the constructor.
Definition: construction.hh:45
static T * construct(Arguments &args)
Construct an object with the specified arguments.
Definition: construction.hh:53
static void deconstruct(T *t)
Destroys an object.
Definition: construction.hh:62
Dune namespace.
Definition: alignment.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:20
Definition of the DUNE_UNUSED macro for the case that config.h is not available.
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentional unused function parameters with.
Definition: unused.hh:18