Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
PointSource.h
Go to the documentation of this file.
1/* This file is part of MoDELib, the Mechanics Of Defects Evolution Library.
2 *
3 *
4 * MODEL is distributed without any warranty under the
5 * GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6 */
7
8#ifndef _model_PointSource_h
9#define _model_PointSource_h
10
11#include <SpatialCellParticle.h>
12#include <SingleSourcePoint.h>
13
14
15namespace model
16{
17
18
21 template<typename Derived,
22 /* */ short unsigned int _dim,
23 /* */ typename ...FieldTypes>
25
26 // template specialization: one or more fields
27 template<typename Derived,
28 /* */ short unsigned int _dim,
29 /* */ typename FieldType,
30 /* */ typename ...MoreFieldTypes>
31 struct PointSource<Derived,_dim,FieldType,MoreFieldTypes...> :
32 /* inheritance */ public PointSource<Derived,_dim,MoreFieldTypes...>,
33 /* inheritance */ public SingleSourcePoint<Derived,FieldType>
34 {
35
36 typedef typename PointSource<Derived,_dim,MoreFieldTypes...>::VectorDimD VectorDimD;
37
38 /**********************************************************************/
39 template<typename...T>
40 PointSource(const VectorDimD& Pin, const bool& enb, const T&...moreEnb) :
41 /* base init */ PointSource<Derived,_dim,MoreFieldTypes...>(Pin,moreEnb...),
42 /* base init */ SingleSourcePoint<Derived,FieldType>(enb)
43 {
46 }
47
48 };
49
50 // template specialization: zero fields
51 template<typename Derived,
52 /* */ short unsigned int _dim>
53 struct PointSource<Derived,_dim> :
54 /* inheritance */ public SpatialCellParticle<Derived,_dim>
55 {
56
57 typedef SpatialCellParticle<Derived,_dim> SpatialCellParticleType;
58 typedef typename SpatialCellParticleType::VectorDimD VectorDimD;
59
60 /**********************************************************************/
61 PointSource(const VectorDimD& Pin) :
62 /* base init */ SpatialCellParticleType(Pin)
63 {
66 }
67
68 };
69
70
71} // end namespace
72#endif
PointSource(const VectorDimD &Pin, const bool &enb, const T &...moreEnb)
Definition PointSource.h:40
PointSource< Derived, _dim, MoreFieldTypes... >::VectorDimD VectorDimD
Definition PointSource.h:36
PointSource(const VectorDimD &Pin)
Definition PointSource.h:61
SpatialCellParticleType::VectorDimD VectorDimD
Definition PointSource.h:58
SpatialCellParticle< Derived, _dim > SpatialCellParticleType
Definition PointSource.h:57
A class template that...
Definition PointSource.h:24
SingleSourcePoint(const bool &enb)