ASL
0.1.7
Advanced Simulation Library
Toggle main menu visibility
Loading...
Searching...
No Matches
src
num
aslDataResampling.h
Go to the documentation of this file.
1
/*
2
* Advanced Simulation Library <http://asl.org.il>
3
*
4
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
5
*
6
*
7
* This file is part of Advanced Simulation Library (ASL).
8
*
9
* ASL is free software: you can redistribute it and/or modify it
10
* under the terms of the GNU Affero General Public License as
11
* published by the Free Software Foundation, version 3 of the License.
12
*
13
* ASL is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Affero General Public License for more details.
17
*
18
* You should have received a copy of the GNU Affero General Public License
19
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
20
*
21
*/
22
23
24
#ifndef ASLDATARESAMPLING_H
25
#define ASLDATARESAMPLING_H
26
27
#include "
aslSingleKernelNM.h
"
28
#include "
math/aslVectors.h
"
29
//#include <CL/cl.hpp>
30
// Supply "cl.hpp" with ASL, since it is not present in OpenCL 2.0
31
// Remove the file after switching to OpenCL 2.1
32
#include "
acl/cl.hpp
"
33
34
namespace
acl
35
{
36
class
VectorOfElementsData
;
37
}
38
39
namespace
asl
40
{
41
class
VectorTemplate
;
42
template
<
typename
V>
class
DataWithGhostNodes
;
43
typedef
DataWithGhostNodes<acl::VectorOfElementsData>
DataWithGhostNodesACLData
;
44
typedef
std::shared_ptr<DataWithGhostNodesACLData>
SPDataWithGhostNodesACLData
;
45
class
AbstractDataWithGhostNodes
;
46
typedef
std::shared_ptr<AbstractDataWithGhostNodes>
SPAbstractDataWithGhostNodes
;
47
49
54
class
DataCoarser
:
public
SingleKernelNM
55
{
56
public
:
57
typedef
SPDataWithGhostNodesACLData
Data
;
58
59
private
:
60
Data
dataIn;
61
Data
dataOut;
62
const
VectorTemplate
* vectorTemplate;
63
64
virtual
void
init0
();
65
public
:
66
DataCoarser
();
67
DataCoarser
(
Data
dIn);
68
inline
Data
getDataOut
();
69
};
70
71
typedef
std::shared_ptr<DataCoarser>
SPDataCoarser
;
72
74
SPDataWithGhostNodesACLData
coarseData
(
SPDataWithGhostNodesACLData
d);
75
77
82
class
DataClipper
:
public
SingleKernelNM
83
{
84
public
:
85
typedef
SPDataWithGhostNodesACLData
Data
;
86
87
private
:
88
Data
dataIn;
89
Data
dataOut;
90
AVec<int>
a0;
91
AVec<int>
aE;
92
93
virtual
void
init0
();
94
public
:
95
DataClipper
();
96
DataClipper
(
Data
dIn,
AVec<int>
a0,
AVec<int>
aE);
97
inline
Data
getDataOut
();
98
};
99
100
typedef
std::shared_ptr<DataClipper>
SPDataClipper
;
101
103
inline
SPDataWithGhostNodesACLData
clipData
(
SPDataWithGhostNodesACLData
d,
104
AVec<int>
a0,
105
AVec<int>
aE);
106
107
//----------------------------- Implementation -----------------------
108
109
DataCoarser::Data
DataCoarser::getDataOut
()
110
{
111
return
dataOut;
112
}
113
114
DataClipper::Data
DataClipper::getDataOut
()
115
{
116
return
dataOut;
117
}
118
119
inline
SPDataWithGhostNodesACLData
coarseData
(
SPDataWithGhostNodesACLData
d)
120
{
121
DataCoarser
dc(d);
122
dc.
init
();
123
dc.
execute
();
124
return
dc.
getDataOut
();
125
126
}
127
128
inline
SPDataWithGhostNodesACLData
clipData
(
SPDataWithGhostNodesACLData
d,
129
AVec<int>
a0,
130
AVec<int>
aE)
131
{
132
asl::DataClipper
dcl(d, a0,aE);
133
dcl.
init
();
134
dcl.
execute
();
135
return
dcl.
getDataOut
();
136
}
137
138
139
}
// asl
140
#endif
// ASLDATARESAMPLING_H
aslSingleKernelNM.h
aslVectors.h
definition of class АVec<T>
cl.hpp
C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33) and OpenCL 1.2 (rev 15).
acl::VectorOfElementsData
The class represents several ElementData.
Definition
aclVectorOfElementsDef.h:57
asl::AVec
Definition
aslVectorsDynamicLength.h:40
asl::AbstractDataWithGhostNodes
Definition
aslDataWithGhostNodes.h:39
asl::DataClipper
Algorithm for generation of coarsed dataset.
Definition
aslDataResampling.h:83
asl::DataClipper::DataClipper
DataClipper(Data dIn, AVec< int > a0, AVec< int > aE)
asl::DataClipper::DataClipper
DataClipper()
asl::DataClipper::Data
SPDataWithGhostNodesACLData Data
Definition
aslDataResampling.h:85
asl::DataClipper::getDataOut
Data getDataOut()
Definition
aslDataResampling.h:114
asl::DataCoarser
Algorithm for generation of coarsed dataset.
Definition
aslDataResampling.h:55
asl::DataCoarser::getDataOut
Data getDataOut()
Definition
aslDataResampling.h:109
asl::DataCoarser::DataCoarser
DataCoarser(Data dIn)
asl::DataCoarser::DataCoarser
DataCoarser()
asl::DataCoarser::Data
SPDataWithGhostNodesACLData Data
Definition
aslDataResampling.h:57
asl::DataWithGhostNodes
Definition
aslDataWithGhostNodes.h:58
asl::SingleKernelNM::execute
virtual void execute()
Executes the numerical procedure.
asl::SingleKernelNM::SingleKernelNM
SingleKernelNM(const acl::KernelConfiguration &kernelCongig)
asl::SingleKernelNM::init
virtual void init()
Builds the necesery internal data and kernels.
asl::SingleKernelNM::init0
virtual void init0()=0
full initialisation but without kernel->setup()
asl::VectorTemplate
Defines set of vectros with several properties.
Definition
aslTemplates.h:88
asl::coarseData
SPDataWithGhostNodesACLData coarseData(SPDataWithGhostNodesACLData d)
Definition
aslDataResampling.h:119
asl::clipData
SPDataWithGhostNodesACLData clipData(SPDataWithGhostNodesACLData d, AVec< int > a0, AVec< int > aE)
Definition
aslDataResampling.h:128
acl
Advanced Computational Language.
Definition
acl.h:41
asl
Advanced Simulation Library.
Definition
aslDataInc.h:31
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition
aslGenerators.h:46
asl::SPDataClipper
std::shared_ptr< DataClipper > SPDataClipper
Definition
aslDataResampling.h:100
asl::SPDataCoarser
std::shared_ptr< DataCoarser > SPDataCoarser
Definition
aslDataResampling.h:71
asl::SPAbstractDataWithGhostNodes
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition
aslGenerators.h:51
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition
aslGenerators.h:47
Generated by
1.17.0