SingularDirichletBC.h 18 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/** \file SingularDirichletBC.h */

#ifndef SINGULAR_DIRICHLET_BC_H
#define SINGULAR_DIRICHLET_BC_H

#include "AMDiS.h"

namespace AMDiS {

/**
 * data structure that holds DOF-Index and double value for singular dirichlet boundary condition.
 **/
struct SingularDirichletBC {
  SingularDirichletBC(int i_, int j_, DegreeOfFreedom idx_, double value_) :
    row(i_), col(j_), idx(idx_), value(value_) {}

  int row, col;
  DegreeOfFreedom idx;
  double value;
};

/**
 * data structure that holds all periodic associations.
 **/
struct ManualPeriodicBC {
  ManualPeriodicBC(size_t row_, std::vector<std::pair<DegreeOfFreedom, DegreeOfFreedom> > &indices_) :
    row(row_), indices(indices_) {}

  size_t row;
  std::vector<std::pair<DegreeOfFreedom, DegreeOfFreedom> > indices;
};

namespace details {
    
  /**
   * traverses the mesh and stores all DegreeOfFreedom, that lie on the boundary with index 'nr'
   * and have coordinates that give true in the 'meshIndicator', into a vector of 'indices'.
   **/
  inline void getBoundaryIndices(const FiniteElemSpace* feSpace,
			  BoundaryType nr,
			  AbstractFunction<bool, WorldVector<double> >* meshIndicator,
			  std::vector<DegreeOfFreedom> &indices)
  {
    Mesh* mesh = feSpace->getMesh();
    int dim = mesh->getDim();
    const BasisFunction *basFcts = feSpace->getBasisFcts();
    int numBasFcts = basFcts->getNumber();
    std::vector<DegreeOfFreedom> localIndices(numBasFcts);

    indices.clear();

    WorldVector<double> coord;
    TraverseStack stack;
    ElInfo *elInfo = stack.traverseFirst(mesh, -1,
      Mesh::CALL_LEAF_EL | Mesh::FILL_BOUND | Mesh::FILL_COORDS);
    while (elInfo) {
      for (int face = 0; face < dim + 1; face++) {
	if (elInfo->getBoundary(face) == nr) {
	  basFcts->getLocalIndices(elInfo->getElement(), feSpace->getAdmin(), localIndices);

	  for (int i = 0; i < numBasFcts; i++) {
	    elInfo->coordToWorld(*(basFcts->getCoords(i)), coord);
	    if ((*meshIndicator)(coord))
	      indices.push_back(localIndices[i]);
	  }
	  break;
	}
      }

      elInfo = stack.traverseNext(elInfo);
    }
  }

  /**
   * traverses the mesh and stores all DegreeOfFreedom, that have coordinates that give true
   * in the 'meshIndicator', into a vector of 'indices'.
   **/
  inline void getBoundaryIndices(const FiniteElemSpace* feSpace,
			  AbstractFunction<bool, WorldVector<double> >* meshIndicator,
			  std::vector<DegreeOfFreedom> &indices)
  {
    Mesh* mesh = feSpace->getMesh();
    int dim = mesh->getDim();
    const BasisFunction *basFcts = feSpace->getBasisFcts();
    int numBasFcts = basFcts->getNumber();
    std::vector<DegreeOfFreedom> localIndices(numBasFcts);

    indices.clear();

    WorldVector<double> coord;
    TraverseStack stack;
    ElInfo *elInfo = stack.traverseFirst(mesh, -1,
      Mesh::CALL_LEAF_EL | Mesh::FILL_BOUND | Mesh::FILL_COORDS);
    while (elInfo) {
      for (int face = 0; face < dim + 1; face++) {
	if (elInfo->getBoundary(face) != 0) {
	  basFcts->getLocalIndices(elInfo->getElement(), feSpace->getAdmin(), localIndices);

	  for (int i = 0; i < numBasFcts; i++) {
	    elInfo->coordToWorld(*(basFcts->getCoords(i)), coord);
	    if ((*meshIndicator)(coord))
	      indices.push_back(localIndices[i]);
	  }
	  break;
	}
      }

      elInfo = stack.traverseNext(elInfo);
    }
  }

  inline void getImplicitIndices(const FiniteElemSpace* feSpace,
			  AbstractFunction<double, WorldVector<double> >* signedDistFct,
			  std::vector<DegreeOfFreedom> &indices)
  {
    const BasisFunction *vecBasisFcts = feSpace->getBasisFcts();
    int nVecBasisFcts = vecBasisFcts->getNumber();

    std::vector<DegreeOfFreedom> vecLocalIndices(nVecBasisFcts);
    
    DOFVector<short int> visited(feSpace, "visited"); visited.set(0);
    WorldVector<double> coord;
    TraverseStack stack;
    Flag traverseFlag = Mesh::CALL_LEAF_EL | Mesh::FILL_COORDS;
    ElInfo *elInfo = stack.traverseFirst(feSpace->getMesh(), -1, traverseFlag);

    while (elInfo) {
      Element *el = elInfo->getElement();
      vecBasisFcts->getLocalIndices(el, feSpace->getAdmin(), vecLocalIndices);

      for (int i = 0; i < nVecBasisFcts; i++) {
	if ( visited[vecLocalIndices[i]] == 0 ) {
	  elInfo->coordToWorld(*(vecBasisFcts->getCoords(i)), coord);
	  if ( (*signedDistFct)(coord) <= DBL_TOL ) { // eventuell nur Koordinaten an Gitterknoten bekommen!
	    indices.push_back(vecLocalIndices[i]);
	  }
	  visited[vecLocalIndices[i]] = 1;
	}
      }
      elInfo = stack.traverseNext(elInfo); 
    }
  }
  
  inline void getImplicitIndices(const FiniteElemSpace* feSpace,
			  DOFVector<double>* signedDistDOF,
			  std::vector<DegreeOfFreedom> &indices)
  {
   
    const BasisFunction *vecBasisFcts = feSpace->getBasisFcts();
    int nVecBasisFcts = vecBasisFcts->getNumber();

    std::vector<DegreeOfFreedom> vecLocalIndices(nVecBasisFcts);
    ElementVector signedDistLocalCoeffs(nVecBasisFcts);

    DimVec<double> *baryCoords = NULL;
    DOFVector<short int> visited(feSpace, "visited"); visited.set(0);
    TraverseStack stack;
    Flag traverseFlag = Mesh::CALL_LEAF_EL;
    ElInfo *elInfo = stack.traverseFirst(feSpace->getMesh(), -1, traverseFlag);

    while (elInfo) {
      Element *el = elInfo->getElement();

      vecBasisFcts->getLocalIndices(el, feSpace->getAdmin(), vecLocalIndices);
      signedDistDOF->getLocalVector(el, signedDistLocalCoeffs);

      for (int i = 0; i < nVecBasisFcts; i++) {
	if ( visited[vecLocalIndices[i]] == 0 ) {
	  baryCoords = vecBasisFcts->getCoords(i);

	  double dist = vecBasisFcts->evalUh(*baryCoords, signedDistLocalCoeffs);
	  if (dist <= DBL_TOL) {
	    indices.push_back(vecLocalIndices[i]);
	  }
	  visited[vecLocalIndices[i]] = 1;
	}
      }
      elInfo = stack.traverseNext(elInfo); 
    }
  }
  
  /**
   * get al list of pairs that describes wich DegreeOfFreedom are assiciated in the given mesh
   * with given feSpace. Uses the function getBoundaryIndices().
   * The 'nr' and 'meshIndicator' describe one boundary of the mesh and to each DegreeOfFreedom
   * the 'periodicMap' associates a second DegreeOfFreedom.
   **/
  inline void getPeriodicAssociation(const FiniteElemSpace* feSpace,
			      BoundaryType nr,
			      AbstractFunction<bool, WorldVector<double> >* meshIndicator,
			      AbstractFunction<WorldVector<double>, WorldVector<double> >* periodicMap,
			      std::vector<std::pair<DegreeOfFreedom, DegreeOfFreedom> > &association)
  {
    std::vector<DegreeOfFreedom> indices;
    details::getBoundaryIndices(feSpace, nr, meshIndicator, indices);

    association.clear();

    DOFVector<WorldVector<double> > coords(feSpace, "coords");
200
    feSpace->getMesh()->getDofIndexCoords(coords);
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
    for (size_t i = 0; i < indices.size(); i++)
    {
      DegreeOfFreedom idx2;
      WorldVector<double> p;
      p = (*periodicMap)(coords[indices[i]]);
      TEST_EXIT(coords.getDofIdxAtPoint(p,idx2))("periodic association not found!\n");

      association.push_back(std::make_pair(indices[i], idx2));
    }
  }

  /**
   * get al list of pairs that describes wich DegreeOfFreedom are assiciated in the given mesh
   * with given feSpace. Uses the function getBoundaryIndices().
   * The 'meshIndicator' describes one boundary of the mesh and to each DegreeOfFreedom
   * the 'periodicMap' associates a second DegreeOfFreedom.
   **/
  inline void getPeriodicAssociation(const FiniteElemSpace* feSpace,
219
220
221
				     AbstractFunction<bool, WorldVector<double> >* meshIndicator,
				     AbstractFunction<WorldVector<double>, WorldVector<double> >* periodicMap,
				     std::vector<std::pair<DegreeOfFreedom, DegreeOfFreedom> > &association)
222
223
224
225
226
227
228
  {
    std::vector<DegreeOfFreedom> indices;
    details::getBoundaryIndices(feSpace, meshIndicator, indices);

    association.clear();

    DOFVector<WorldVector<double> > coords(feSpace, "coords");
229
    feSpace->getMesh()->getDofIndexCoords(coords);
230
231
232
233
234
235
236
237
238
239
240
    for (size_t i = 0; i < indices.size(); i++)
    {
      DegreeOfFreedom idx2;
      WorldVector<double> p;
      p = (*periodicMap)(coords[indices[i]]);
      TEST_EXIT(coords.getDofIdxAtPoint(p,idx2))("periodic association not found!\n");

      association.push_back(std::make_pair(indices[i], idx2));
    }
  }
  
241
242
243
244
  inline void getDOFValues(const FiniteElemSpace* feSpace, 
			   AbstractFunction<double, WorldVector<double> >* values, 
			   std::vector<DegreeOfFreedom> &indices, 
			   std::vector<double> &dofValues)
245
246
247
248
249
250
251
252
  {
    WorldVector<double> x;
    for (size_t i = 0; i < indices.size(); i++) {
      if (feSpace->getMesh()->getDofIndexCoords(indices[i], feSpace, x))
	dofValues.push_back((*values)(x));
    }
  }
  
253
254
255
256
  inline void getDOFValues(const FiniteElemSpace* feSpace, 
			   DOFVector<double>* values, 
			   std::vector<DegreeOfFreedom> &indices, 
			   std::vector<double> &dofValues)
257
  {
258
    for (size_t i = 0; i < indices.size(); i++)
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
      dofValues.push_back((*values)[indices[i]]);
  }
} // end namespace



/**
 * data structure that holds all possible variation of description of coords and value
 * of (singular/implicit) dirichlet boundary condition.
 **/
struct DirichletBcData {

  // pos = WorldVector
  DirichletBcData(int i_, int j_, WorldVector<double> pos_, double val_)
  : row(i_), col(j_), pos(pos_), val0(val_),
    posType(0), valueType(0),
    idx(0), SignedDistFct(NULL), SignedDistDOF(NULL), val1(NULL), val2(NULL),
    boundary_nr(0), meshIndicator(NULL) {}

  DirichletBcData(int i_, int j_, WorldVector<double> pos_, DOFVector<double> &val_)
  : row(i_), col(j_), pos(pos_), val1(&val_),
    posType(0), valueType(1),
    idx(0), SignedDistFct(NULL), SignedDistDOF(NULL), val0(0.0), val2(NULL),
    boundary_nr(0), meshIndicator(NULL)  {}

  DirichletBcData(int i_, int j_, WorldVector<double> pos_, AbstractFunction<double, WorldVector<double> > &val_)
  : row(i_), col(j_), pos(pos_), val2(&val_),
    posType(0), valueType(2),
    idx(0), SignedDistFct(NULL), SignedDistDOF(NULL), val0(0.0), val1(NULL),
    boundary_nr(0), meshIndicator(NULL)  {}

  // pos = idx
  DirichletBcData(int i_, int j_, DegreeOfFreedom idx_, double val_)
  : row(i_), col(j_), idx(idx_), val0(val_),
    posType(1), valueType(0),
    SignedDistFct(NULL), SignedDistDOF(NULL), val1(NULL), val2(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, DegreeOfFreedom idx_, DOFVector<double> &val_)
  : row(i_), col(j_), idx(idx_), val1(&val_),
    posType(1), valueType(1),
    SignedDistFct(NULL), SignedDistDOF(NULL), val0(0.0), val2(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, DegreeOfFreedom idx_, AbstractFunction<double, WorldVector<double> > &val_)
  : row(i_), col(j_), idx(idx_), val2(&val_),
    posType(1), valueType(2),
    SignedDistFct(NULL), SignedDistDOF(NULL), val0(0.0), val1(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }

  // pos = SignedDistFct
  DirichletBcData(int i_, int j_, AbstractFunction<double, WorldVector<double> > *SignedDistFct_, double val_)
  : row(i_), col(j_), SignedDistFct(SignedDistFct_), val0(val_),
    posType(2), valueType(0),
    idx(0), SignedDistDOF(NULL), val1(NULL), val2(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, AbstractFunction<double, WorldVector<double> > *SignedDistFct_, DOFVector<double> &val_)
  : row(i_), col(j_), SignedDistFct(SignedDistFct_), val1(&val_),
    posType(2), valueType(1),
    idx(0), SignedDistDOF(NULL), val0(0.0), val2(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, AbstractFunction<double, WorldVector<double> > *SignedDistFct_, AbstractFunction<double, WorldVector<double> > &val_)
  : row(i_), col(j_), SignedDistFct(SignedDistFct_), val2(&val_),
    posType(2), valueType(2),
    idx(0), SignedDistDOF(NULL), val0(0.0), val1(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }

  // pos = SignedDistDOF
  DirichletBcData(int i_, int j_, DOFVector<double> *SignedDistDOF_, double val_)
  : row(i_), col(j_), SignedDistDOF(SignedDistDOF_), val0(val_),
    posType(3), valueType(0),
    idx(0), SignedDistFct(NULL), val1(NULL), val2(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, DOFVector<double> *SignedDistDOF_, DOFVector<double> &val_)
  : row(i_), col(j_), SignedDistDOF(SignedDistDOF_), val1(&val_),
    posType(3), valueType(1),
    idx(0), SignedDistFct(NULL), val0(0.0), val2(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, DOFVector<double> *SignedDistDOF_, AbstractFunction<double, WorldVector<double> > &val_)
  : row(i_), col(j_), SignedDistDOF(SignedDistDOF_), val2(&val_),
    posType(3), valueType(2),
    idx(0), SignedDistFct(NULL), val0(0.0), val1(NULL),
    boundary_nr(0), meshIndicator(NULL)  { pos.set(0.0); }
    
  // pos = meshindicator + boundary_nr
  DirichletBcData(int i_, int j_, BoundaryType nr, AbstractFunction<bool, WorldVector<double> > *meshIndicator_, double val_)
  : row(i_), col(j_), SignedDistDOF(NULL), val0(val_),
    posType(4), valueType(0),
    idx(0), SignedDistFct(NULL), val1(NULL), val2(NULL),
    boundary_nr(nr), meshIndicator(meshIndicator_)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, BoundaryType nr, AbstractFunction<bool, WorldVector<double> > *meshIndicator_, DOFVector<double> &val_)
  : row(i_), col(j_), SignedDistDOF(NULL), val1(&val_),
    posType(4), valueType(1),
    idx(0), SignedDistFct(NULL), val0(0.0), val2(NULL),
    boundary_nr(nr), meshIndicator(meshIndicator_)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, BoundaryType nr, AbstractFunction<bool, WorldVector<double> > *meshIndicator_, AbstractFunction<double, WorldVector<double> > &val_)
  : row(i_), col(j_), SignedDistDOF(NULL), val2(&val_),
    posType(4), valueType(2),
    idx(0), SignedDistFct(NULL), val0(0.0), val1(NULL),
    boundary_nr(nr), meshIndicator(meshIndicator_)  { pos.set(0.0); }
    
  // pos = meshindicator
  DirichletBcData(int i_, int j_, AbstractFunction<bool, WorldVector<double> > *meshIndicator_, double val_)
  : row(i_), col(j_), SignedDistDOF(NULL), val0(val_),
    posType(4), valueType(0),
    idx(0), SignedDistFct(NULL), val1(NULL), val2(NULL),
    boundary_nr(0), meshIndicator(meshIndicator_)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, AbstractFunction<bool, WorldVector<double> > *meshIndicator_, DOFVector<double> &val_)
  : row(i_), col(j_), SignedDistDOF(NULL), val1(&val_),
    posType(4), valueType(1),
    idx(0), SignedDistFct(NULL), val0(0.0), val2(NULL),
    boundary_nr(0), meshIndicator(meshIndicator_)  { pos.set(0.0); }

  DirichletBcData(int i_, int j_, AbstractFunction<bool, WorldVector<double> > *meshIndicator_, AbstractFunction<double, WorldVector<double> > &val_)
  : row(i_), col(j_), SignedDistDOF(NULL), val2(&val_),
    posType(4), valueType(2),
    idx(0), SignedDistFct(NULL), val0(0.0), val1(NULL),
    boundary_nr(0), meshIndicator(meshIndicator_)  { pos.set(0.0); }
    
  void addToList(const FiniteElemSpace *feSpace, std::vector<SingularDirichletBC> &list)
  {
    std::vector<DegreeOfFreedom> indices_;
    std::vector<double> values_;
    DegreeOfFreedom idx_ = 0;

    switch (posType) {
      case 0:
	if (val1 == NULL && SignedDistDOF == NULL) {
	  val1 = new DOFVector<double>(feSpace, "vel1");
	}
	if (val1 != NULL) {
	  if (!val1->getDofIdxAtPoint(pos, idx_))
	    idx_ = 0;
	} else if (SignedDistDOF != NULL) {
	  if (!SignedDistDOF->getDofIdxAtPoint(pos, idx_))
	    idx_ = 0;
	}
	indices_.push_back(idx_);
	break;
	
      case 1:
	indices_.push_back(idx);
	break;
	
      case 2:
	details::getImplicitIndices(feSpace, SignedDistFct, indices_);
	break;
	
      case 3:
	details::getImplicitIndices(feSpace, SignedDistDOF, indices_);
	break;
	
      case 4:
	if (boundary_nr == 0)
	  details:: getBoundaryIndices(feSpace, meshIndicator, indices_);
	else
	  details:: getBoundaryIndices(feSpace, boundary_nr, meshIndicator, indices_);
	break;
    }

    switch (valueType) {
      case 0:
	values_.resize(indices_.size(), val0);
	break;
	
      case 1:
	details::getDOFValues(feSpace, val1, indices_, values_);
	break;
	
      case 2:
	details::getDOFValues(feSpace, val2, indices_, values_);
	break;
    }

    DOFVector<WorldVector<double> > coords(feSpace, "coords");
441
    feSpace->getMesh()->getDofIndexCoords(coords);
442
443
    

444
    for (size_t i = 0; i < indices_.size(); i++)
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
      list.push_back(SingularDirichletBC(row, col, indices_[i], values_[i]));
    
    MSG_DBG("Dirichle BC at %d DOFs added.\n",indices_.size());
  }


  int row,col;

private:
  int posType; 		// 0..WorldVector, 1..DegreeOfFreedom, 2..SignedDistFct, 3..signedDistDOF, 4..meshIndicator
  int valueType; 	// 0..double, 1..DOFVector, 2..AbstractFunction

  // pos
  WorldVector<double> pos;
  DegreeOfFreedom idx;
  AbstractFunction<double, WorldVector<double> > *SignedDistFct;
  DOFVector<double> *SignedDistDOF;

  BoundaryType boundary_nr;
  AbstractFunction<bool, WorldVector<double> >* meshIndicator;
  
  // value
  double val0;
  DOFVector<double> *val1;
  AbstractFunction<double, WorldVector<double> > *val2;
};


struct PeriodicBcData {

  // pos = WorldVector
  PeriodicBcData(int row_, BoundaryType nr_, AbstractFunction<bool, WorldVector<double> >* meshIndicator_,
		 AbstractFunction<WorldVector<double>, WorldVector<double> >* periodicMap_)
  : row(row_), nr(nr_), meshIndicator(meshIndicator_), periodicMap(periodicMap_) {}

  PeriodicBcData(int row_, AbstractFunction<bool, WorldVector<double> >* meshIndicator_,
		 AbstractFunction<WorldVector<double>, WorldVector<double> >* periodicMap_)
  : row(row_), nr(0), meshIndicator(meshIndicator_), periodicMap(periodicMap_) {}

  void addToList(const FiniteElemSpace *feSpace, std::vector<ManualPeriodicBC> &list)
  {
    std::vector<std::pair<DegreeOfFreedom, DegreeOfFreedom> > associations;
    if (nr == 0)
      details::getPeriodicAssociation(feSpace, meshIndicator, periodicMap, associations);
    else
      details::getPeriodicAssociation(feSpace, nr, meshIndicator, periodicMap, associations);
    list.push_back(ManualPeriodicBC(row, associations));
  }

protected:

  int row;

  BoundaryType nr;
  AbstractFunction<bool, WorldVector<double> >* meshIndicator;
  AbstractFunction<WorldVector<double>, WorldVector<double> >* periodicMap;
};

} // end namespace 

#endif // SINGULAR_DIRICHLET_BC_H