Flow123d
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
flow123d
src
interpolation
functors_impl.hh
Go to the documentation of this file.
1
#ifndef FUNCTORBASE_IMPL_H
2
#define FUNCTORBASE_IMPL_H
3
4
#include "
functors.hh
"
5
#include "
system/xio.h
"
6
7
/**************************************** FunctorCommon *****************************************/
8
template
<
class
Type>
9
FunctorCommon<Type>::FunctorCommon
() {}
10
11
template
<
class
Type>
12
FunctorCommon<Type>::~FunctorCommon
() {}
13
14
template
<
class
Type>
15
void
FunctorCommon<Type>::set_param
(
unsigned
int
param_name,
double
param_value)
16
{
17
if
(param_name < param_.size())
18
{
19
param_[param_name] = param_value;
20
}
21
else
22
{
23
param_.push_back(param_value);
24
}
25
}
26
27
template
<
class
Type>
28
template
<
class
TType>
29
void
FunctorCommon<Type>::set_param_from_func
(
FunctorCommon<TType>
* func)
30
{
31
unsigned
int
n = func->
param_
.size();
32
//DBGMSG("param_size = %d\n",n);
33
param_.resize(n);
34
35
for
(
unsigned
int
i=0; i < n; i++)
//copying vector
36
{
37
//DBGMSG("get_param = %d\n",i);
38
param_[i] = func->
param
(i);
39
}
40
}
41
42
template
<
class
Type>
43
double
FunctorCommon<Type>::param
(
unsigned
int
param_name)
44
{
45
ASSERT
(param_name < param_.size(),
"Parameter of the functor was not set."
);
46
47
return
param_[param_name];
48
}
49
50
51
/************************************************ FunctorBase ************************************/
52
template
<
class
Type>
53
FunctorBase<Type>::FunctorBase
() :
FunctorCommon
<Type>::
FunctorCommon
() {}
54
55
template
<
class
Type>
56
FunctorBase<Type>::~FunctorBase
() {}
57
58
59
/************************************************ IFunctorBase ***********************************/
60
template
<
class
Type>
61
IFunctorBase<Type>::IFunctorBase
() :
FunctorCommon
<Type>::
FunctorCommon
() {}
62
63
template
<
class
Type>
64
IFunctorBase<Type>::~IFunctorBase
() {}
65
66
67
#endif //FUNCTORBASE_IMPL_H
Generated on Thu May 29 2014 23:14:48 for Flow123d by
1.8.4