Flow123d
JS_before_hm-2150-g5e4b4b118
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
w
Variables
Typedefs
Enumerations
Enumerator
a
b
c
d
f
g
h
i
m
n
o
p
r
s
u
w
y
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
z
Enumerations
a
b
c
d
f
h
i
m
n
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
_
a
c
d
f
i
k
l
m
n
o
p
r
s
t
v
Variables
_
a
c
d
g
m
n
p
q
s
u
v
Typedefs
_
a
d
e
f
g
i
j
l
m
o
q
r
s
t
u
v
Enumerations
Enumerator
a
b
c
d
e
f
i
m
n
o
p
r
s
u
v
w
Macros
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
w
z
src
tools
functors_impl.hh
Go to the documentation of this file.
1
/*!
2
*
3
* Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4
*
5
* This program is free software; you can redistribute it and/or modify it under
6
* the terms of the GNU General Public License version 3 as published by the
7
* Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
*
13
*
14
* @file functors_impl.hh
15
* @brief
16
*/
17
18
#ifndef FUNCTORBASE_IMPL_H
19
#define FUNCTORBASE_IMPL_H
20
21
#include "
tools/functors.hh
"
22
#include "
system/global_defs.h
"
23
24
/**************************************** FunctorCommon *****************************************/
25
template
<
class
Type>
26
FunctorCommon<Type>::FunctorCommon
() {}
27
28
template
<
class
Type>
29
FunctorCommon<Type>::~FunctorCommon
() {}
30
31
template
<
class
Type>
32
void
FunctorCommon<Type>::set_param
(
unsigned
int
param_name,
double
param_value)
33
{
34
if
(param_name < param_.size())
35
{
36
param_[param_name] = param_value;
37
}
38
else
39
{
40
param_.push_back(param_value);
41
}
42
}
43
44
template
<
class
Type>
45
template
<
class
TType>
46
void
FunctorCommon<Type>::set_param_from_func
(
FunctorCommon<TType>
* func)
47
{
48
unsigned
int
n = func->
param_
.size();
49
//DebugOut().fmt("param_size = {}\n",n);
50
param_.resize(n);
51
52
for
(
unsigned
int
i=0; i < n; i++)
//copying vector
53
{
54
//DebugOut().fmt("get_param = {}\n",i);
55
param_[i] = func->
param
(i);
56
}
57
}
58
59
template
<
class
Type>
60
double
FunctorCommon<Type>::param
(
unsigned
int
param_name)
61
{
62
OLD_ASSERT
(param_name < param_.size(),
"Parameter of the functor was not set."
);
63
64
return
param_[param_name];
65
}
66
67
68
/************************************************ FunctorBase ************************************/
69
template
<
class
Type>
70
FunctorBase<Type>::FunctorBase
() :
FunctorCommon
<Type>::
FunctorCommon
() {}
71
72
template
<
class
Type>
73
FunctorBase<Type>::~FunctorBase
() {}
74
75
76
/************************************************ IFunctorBase ***********************************/
77
template
<
class
Type>
78
IFunctorBase<Type>::IFunctorBase
() :
FunctorCommon
<Type>::
FunctorCommon
() {}
79
80
template
<
class
Type>
81
IFunctorBase<Type>::~IFunctorBase
() {}
82
83
84
#endif //FUNCTORBASE_IMPL_H
FunctorCommon::param
double param(unsigned int param_name)
Returns parameter.
Definition:
functors_impl.hh:60
IFunctorBase::IFunctorBase
IFunctorBase()
Constructor.
Definition:
functors_impl.hh:78
FunctorCommon::set_param
void set_param(unsigned int param_name, double param_value)
Sets a functor's parameter.
Definition:
functors_impl.hh:32
FunctorCommon::param_
std::vector< double > param_
Definition:
functors.hh:68
FunctorCommon::FunctorCommon
friend class FunctorCommon
Setting these friend classes to be able to access param_ vector.
Definition:
functors.hh:71
FunctorBase::~FunctorBase
virtual ~FunctorBase()
Destructor.
Definition:
functors_impl.hh:73
FunctorBase::FunctorBase
FunctorBase()
Constructor.
Definition:
functors_impl.hh:70
FunctorCommon::~FunctorCommon
virtual ~FunctorCommon()
Destructor.
Definition:
functors_impl.hh:29
FunctorCommon::set_param_from_func
void set_param_from_func(FunctorCommon< TType > *func)
Sets a functor's parameters from another functor.
Definition:
functors_impl.hh:46
IFunctorBase::~IFunctorBase
virtual ~IFunctorBase()
Destructor.
Definition:
functors_impl.hh:81
OLD_ASSERT
#define OLD_ASSERT(...)
Definition:
global_defs.h:108
global_defs.h
Global macros to enhance readability and debugging, general constants.
functors.hh
FunctorCommon
Class provides common functionality for functors.
Definition:
functors.hh:36
Generated by
1.8.17