You are here:
Concepts
>
Concepts Web
>
Class documentation
Class documentation of Concepts
Loading...
Searching...
No Matches
formula
formulaLiCo.hh
Go to the documentation of this file.
1
8
#ifndef formulaLiCo_hh
9
#define formulaLiCo_hh
10
11
#include "
formula.hh
"
12
13
namespace
concepts
{
14
19
class
FormulaLiCo
:
public
Formula
<Real> {
20
public
:
27
FormulaLiCo
(
const
Formula<Real>
&
frmA
,
const
Formula<Real>
&
frmB
,
Real
cA
,
Real
cB
)
28
: frmA_(
frmA
), frmB_(
frmB
), cA_(
cA
), cB_(
cB
) { }
30
virtual
Formula<Real>
*
clone
()
const
{
31
return
new
FormulaLiCo
(frmA_, frmB_, cA_, cB_);
32
}
33
35
virtual
Real
operator()
(
const
Real
p,
const
Real
t=0.0)
const
{
36
return
cA_*frmA_(p, t) + cB_*frmB_(p, t);
37
}
39
virtual
Real
operator()
(
const
Real2d
&p,
const
Real
t=0.0)
const
{
40
return
cA_*frmA_(p, t) + cB_*frmB_(p, t);
41
}
43
virtual
Real
operator()
(
const
Real3d
&p,
const
Real
t=0.0)
const
{
44
return
cA_*frmA_(p, t) + cB_*frmB_(p, t);
45
}
46
private
:
47
const
Formula<Real>
& frmA_;
48
const
Formula<Real>
& frmB_;
49
const
Real
cA_;
50
const
Real
cB_;
51
};
52
53
}
// namespace concepts
54
55
#endif
//formulaLiCo_hh
concepts::FormulaLiCo
Definition
formulaLiCo.hh:19
concepts::FormulaLiCo::operator()
virtual Real operator()(const Real p, const Real t=0.0) const
Application operator for one dimension.
Definition
formulaLiCo.hh:35
concepts::FormulaLiCo::clone
virtual Formula< Real > * clone() const
Return a clone of this linear combination.
Definition
formulaLiCo.hh:30
concepts::FormulaLiCo::FormulaLiCo
FormulaLiCo(const Formula< Real > &frmA, const Formula< Real > &frmB, Real cA, Real cB)
Definition
formulaLiCo.hh:27
concepts::Formula
Definition
formula.hh:34
concepts::Point< Real, 2 >
concepts
Definition
pml_formula.h:16
concepts::Real
double Real
Definition
typedefs.hh:39
concepts::makeSet
Set< F > makeSet(uint n, const F &first,...)
Definition
set.hh:320
formula.hh
Generated on Wed Sep 13 2023 21:06:19 for Concepts by
1.9.8