You are here:
Concepts
>
Concepts Web
>
Class documentation
Class documentation of Concepts
Loading...
Searching...
No Matches
cluster
multipole.hh
Go to the documentation of this file.
1
6
#ifndef multipole_hh
7
#define multipole_hh
8
9
#include "
basics/exceptions.hh
"
10
#include "
bem/element.hh
"
11
#include "
cluster/expansion.hh
"
12
13
namespace
cluster
{
14
15
// ***************************************************** MultipoleLaplaceF **
16
20
template
<
class
Fspc = concepts::Real>
21
class
MultipoleLaplaceF
:
public
ExpansionF
<Fspc> {
23
uint m_;
24
25
public
:
29
MultipoleLaplaceF
(uint
m
) {m_ =
m
;}
30
34
uint
blksz
(uint
m
)
const
{
return
m
* (
m
+ 1);}
35
uint
m
()
const
{
return
m_;}
38
virtual
FColReal
*
getCol
(uint
blksz
)
const
{
39
return
new
FColReal
(
blksz
);
40
}
42
inline
void
evaluate
(uint
m
,
const
concepts::Real3d
& z,
43
FColExp
* Fexp)
const
;
44
void
evaluate
(uint
m
,
const
concepts::Real3d
& z,
FColReal
* Fexp)
const
;
46
inline
void
apply
(uint
m
,
const
FColExp
* Fexp,
const
Fspc src[],
47
Fspc dst[])
const
;
48
void
apply
(uint
m
,
const
FColReal
Fexp[],
const
Fspc src[],
49
Fspc dst[])
const
;
50
};
51
52
template
<
class
Fspc>
53
void
MultipoleLaplaceF<Fspc>::evaluate
(uint m,
const
concepts::Real3d
& z,
54
FColExp
* Fexp)
const
{
55
FColReal
* Fmpe =
dynamic_cast<
FColReal
*
>
(Fexp);
56
if
(Fmpe) {evaluate(m, z, Fmpe);
return
;}
57
58
throw
59
conceptsException
(
concepts::MissingFeature
(
"FColExp not supported"
));
60
}
61
62
template
<
class
Fspc>
63
void
MultipoleLaplaceF<Fspc>::apply
(uint m,
const
FColExp
* Fexp,
64
const
Fspc src[], Fspc dst[])
const
{
65
const
FColReal
* Fmpe =
dynamic_cast<
const
FColReal
*
>
(Fexp);
66
if
(Fmpe) {apply(m, Fmpe, src, dst);
return
;}
67
68
throw
69
conceptsException
(
concepts::MissingFeature
(
"FColExp not supported"
));
70
}
71
72
}
// namespace cluster
73
74
#endif
// multipole_hh
exceptions.hh
conceptsException
#define conceptsException(exc)
Definition
exceptions.hh:344
element.hh
cluster::ExpansionF
Definition
expansion.hh:185
cluster::FColExp
Definition
expansion.hh:143
cluster::FColF
Definition
expansion.hh:156
cluster::MultipoleLaplaceF
Definition
multipole.hh:21
cluster::MultipoleLaplaceF::blksz
uint blksz(uint m) const
Definition
multipole.hh:34
cluster::MultipoleLaplaceF::getCol
virtual FColReal * getCol(uint blksz) const
Definition
multipole.hh:38
cluster::MultipoleLaplaceF::m
uint m() const
Order of the expansion.
Definition
multipole.hh:35
cluster::MultipoleLaplaceF::evaluate
void evaluate(uint m, const concepts::Real3d &z, FColExp *Fexp) const
Definition
multipole.hh:53
cluster::MultipoleLaplaceF::MultipoleLaplaceF
MultipoleLaplaceF(uint m)
Definition
multipole.hh:29
cluster::MultipoleLaplaceF::apply
void apply(uint m, const FColExp *Fexp, const Fspc src[], Fspc dst[]) const
Definition
multipole.hh:63
concepts::MissingFeature
Definition
exceptions.hh:206
concepts::Point< Real, 3 >
expansion.hh
cluster
Definition
cluster.hh:33
Generated on Wed Sep 13 2023 21:06:17 for Concepts by
1.9.8