dune-istl 3.0-git
construction.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_AMGCONSTRUCTION_HH
4#define DUNE_AMGCONSTRUCTION_HH
5
6#include <dune/common/unused.hh>
11#include "pinfo.hh"
12
13namespace Dune
14{
15 namespace Amg
16 {
17
36 template<typename T>
38 {
39 public:
44 typedef const void* Arguments;
45
52 static inline T* construct(Arguments& args)
53 {
54 return new T();
55 }
56
61 static inline void deconstruct(T* t)
62 {
63 delete t;
64 }
65
66 };
67
68 template<class T, class A>
70 {
71 public:
72 typedef const int Arguments;
74 {
75 return new BlockVector<T,A>(n);
76 }
77
78 static inline void deconstruct(BlockVector<T,A>* t)
79 {
80 delete t;
81 }
82 };
83
84 template<class M, class C>
86 {
88 : matrix_(&matrix), comm_(&comm)
89 {}
90
93 };
94
95 template<class M, class C>
97 {
98 NonoverlappingOperatorArgs(M& matrix, C& comm)
99 : matrix_(&matrix), comm_(&comm)
100 {}
101
104 };
105
106#if HAVE_MPI
116#endif
117
128
129 } // end Amg namspace
130
131 // forward declaration
132 template<class M, class X, class Y, class C>
134
135 template<class M, class X, class Y, class C>
137
138 namespace Amg
139 {
140 template<class M, class X, class Y, class C>
142 {
143 public:
145
147 {
148 return new OverlappingSchwarzOperator<M,X,Y,C>(*args.matrix_, *args.comm_);
149 }
150
152 {
153 delete t;
154 }
155 };
156
157 template<class M, class X, class Y, class C>
159 {
160 public:
162
164 {
165 return new NonoverlappingSchwarzOperator<M,X,Y,C>(*args.matrix_, *args.comm_);
166 }
167
169 {
170 delete t;
171 }
172 };
173
174 template<class M, class X, class Y>
176 {
178 : matrix_(&matrix)
179 {}
180
182 };
183
184 template<class M, class X, class Y>
186 {
187 public:
189
191 {
192 return new MatrixAdapter<M,X,Y>(*args.matrix_);
193 }
194
195 static inline void deconstruct(MatrixAdapter<M,X,Y>* m)
196 {
197 delete m;
198 }
199 };
200
201 template<>
203 {
204 public:
207 {
208 return new SequentialInformation(args.comm_);
209 }
210
212 {
213 delete si;
214 }
215 };
216
217
218#if HAVE_MPI
219
220 template<class T1, class T2>
222 {
223 public:
225
230
232 {
233 delete com;
234 }
235 };
236
237#endif
238
240 } // namespace Amg
241} // namespace Dune
242#endif
Classes providing communication interfaces for overlapping Schwarz methods.
Define general, extensible interface for operators. The available implementation wraps a matrix.
This file implements a vector space as a tensor product of a given vector space. The number of compon...
CollectiveCommunication< void * > comm_
Definition construction.hh:126
M * matrix_
Definition construction.hh:102
C * comm_
Definition construction.hh:92
const int Arguments
Definition construction.hh:72
static void deconstruct(BlockVector< T, A > *t)
Definition construction.hh:78
static BlockVector< T, A > * construct(Arguments &n)
Definition construction.hh:73
SequentialCommunicationArgs(CollectiveCommunication< void * > comm, int cat)
Definition construction.hh:120
NonoverlappingOperatorArgs(M &matrix, C &comm)
Definition construction.hh:98
OwnerOverlapCopyCommunicationArgs(MPI_Comm comm, SolverCategory::Category cat)
Definition construction.hh:109
OverlappingSchwarzOperatorArgs(M &matrix, C &comm)
Definition construction.hh:87
MPI_Comm comm_
Definition construction.hh:113
SolverCategory::Category cat_
Definition construction.hh:114
C * comm_
Definition construction.hh:103
const void * Arguments
A type holding all the arguments needed to call the constructor.
Definition construction.hh:44
M * matrix_
Definition construction.hh:91
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
Definition basearray.hh:19
Statistics about compression achieved in implicit mode.
Definition bcrsmatrix.hh:81
A vector of blocks with memory management.
Definition bvector.hh:309
A nonoverlapping operator with communication object.
Definition novlpschwarz.hh:60
Traits class for generically constructing non default constructable types.
Definition construction.hh:38
Adapter to turn a matrix into a linear operator.
Definition operators.hh:122
A class setting up standard communication for a two-valued attribute set with owner/overlap/copy sema...
Definition owneroverlapcopy.hh:173
Definition construction.hh:86
Definition construction.hh:97
Definition construction.hh:108
Definition construction.hh:119
An overlapping schwarz operator.
Definition schwarz.hh:76
OverlappingSchwarzOperatorArgs< M, C > Arguments
Definition construction.hh:144
static OverlappingSchwarzOperator< M, X, Y, C > * construct(const Arguments &args)
Definition construction.hh:146
static void deconstruct(OverlappingSchwarzOperator< M, X, Y, C > *t)
Definition construction.hh:151
NonoverlappingOperatorArgs< M, C > Arguments
Definition construction.hh:161
static void deconstruct(NonoverlappingSchwarzOperator< M, X, Y, C > *t)
Definition construction.hh:168
static NonoverlappingSchwarzOperator< M, X, Y, C > * construct(const Arguments &args)
Definition construction.hh:163
Definition construction.hh:176
M * matrix_
Definition construction.hh:181
MatrixAdapterArgs(M &matrix, const SequentialInformation &)
Definition construction.hh:177
static MatrixAdapter< M, X, Y > * construct(Arguments &args)
Definition construction.hh:190
const MatrixAdapterArgs< M, X, Y > Arguments
Definition construction.hh:188
static void deconstruct(MatrixAdapter< M, X, Y > *m)
Definition construction.hh:195
const SequentialCommunicationArgs Arguments
Definition construction.hh:205
static SequentialInformation * construct(Arguments &args)
Definition construction.hh:206
static void deconstruct(SequentialInformation *si)
Definition construction.hh:211
static void deconstruct(OwnerOverlapCopyCommunication< T1, T2 > *com)
Definition construction.hh:231
static OwnerOverlapCopyCommunication< T1, T2 > * construct(Arguments &args)
Definition construction.hh:226
const OwnerOverlapCopyCommunicationArgs Arguments
Definition construction.hh:224
Definition pinfo.hh:26
Category
Definition solvercategory.hh:19