ASL  0.1.7
Advanced Simulation Library
aslBasicBC.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 ASLBASICBC_H
25 #define ASLBASICBC_H
26 
27 #include "aslBCond.h"
28 #include <data/aslDataWithGhostNodes.h>
29 #include <acl/aclMath/aclVectorOfElementsDef.h>
30 
31 
32 namespace acl{
33  class Kernel;
35 }
36 
37 
38 
39 namespace asl
40 {
41  template <typename T> class UValue;
42  class PositionFunction;
44 
45 
47 
50  class BCConstantValue:public BCond
51  {
52  public:
55  protected:
56  Data data;
58  public:
59  BCConstantValue(Data d, const acl::VectorOfElements & v);
60  virtual void execute();
61  virtual void init();
62  void setValue(const acl::VectorOfElements & v);
63  };
64 
66 
70  {
71  public:
74  protected:
75  Data data;
77  public:
78  BCConstantValueMap(Data d,
79  const acl::VectorOfElements & v,
80  Data map);
82  virtual void execute();
83  virtual void init();
84  void setValue(const acl::VectorOfElements & v);
85  };
86 
88 
92  {
93  public:
96  protected:
97  Data data;
99  public:
101  const acl::VectorOfElements & v,
102  Data map,
103  const VectorTemplate *const t);
105  virtual void execute();
106  virtual void init();
107  void setValue(const acl::VectorOfElements & v);
108  };
109 
111 
115  {
116  public:
119  protected:
120  Data data;
121  SPPositionFunction value;
122  public:
123  BCValuePFMap(Data d,
124  SPPositionFunction val,
125  Data map);
126  ~BCValuePFMap();
127  virtual void execute();
128  virtual void init();
129  void setValue(SPPositionFunction v);
130  };
131 
132 
134 
138  double v,
139  const std::vector<SlicesNames> & sl);
141 
145  UValue<double> & v,
146  const std::vector<SlicesNames> & sl);
148 
152  UValue<AVec<float>> & v,
153  const std::vector<SlicesNames> & sl);
155 
159  AVec<> v,
160  const std::vector<SlicesNames> & sl);
161 
164  double v,
166 
169  AVec<> v,
171 
174  SPPositionFunction v,
176 
179  double v,
181  const VectorTemplate *const t);
182 
185  AVec<> v,
187  const VectorTemplate *const t);
188 
189 
192  {
193  public:
196  protected:
197  Data data;
199  public:
200  BCConstantGradient(Data d,
201  const acl::VectorOfElements & v,
202  const VectorTemplate *const t);
203  virtual void execute();
204  virtual void init();
205  void setValue(const acl::VectorOfElements & value);
206  };
207 
210  {
211  public:
214  protected:
215  Data data;
217  public:
218  BCConstantGradientMap(Data d,
219  const acl::VectorOfElements & v,
220  Data map,
221  const VectorTemplate *const t);
222  BCConstantGradientMap(Data d,
223  const acl::VectorOfElements & v,
224  Data map,
225  Data computationalDomain,
226  const VectorTemplate *const t);
228  virtual void execute();
229  virtual void init();
230  void setValue(const acl::VectorOfElements & v);
231  };
232 
235  double v,
236  const VectorTemplate *const t,
237  const std::vector<SlicesNames> & sl);
238 
241  double v,
243  const VectorTemplate *const t);
246  double v,
248  SPAbstractDataWithGhostNodes computatinalDomain,
249  const VectorTemplate *const t);
250 
253  AVec<> v,
255  const VectorTemplate *const t);
256 
259  double v,
261  const VectorTemplate *const t);
264  double v,
266  SPAbstractDataWithGhostNodes computatinalDomain,
267  const VectorTemplate *const t);
268 
271  AVec<> v,
273  const VectorTemplate *const t);
274 
276 
279  class BCConstantSource:public BCond
280  {
281  public:
284  protected:
285  Data data;
286  cl_double value;
287  public:
288  BCConstantSource(Data d, cl_double v);
289  virtual void execute();
290  virtual void init();
291  void setValue(cl_double value);
292  };
293 
294 
296 
300  {
301  public:
304  protected:
305  Data & source;
306  Data & destination;
307  public:
308  BCDirectCopier(Data dSource,Data dDestination);
309  virtual void execute();
310  virtual void init();
311  };
312 
314 
318  {
319  public:
321  protected:
323  Data data;
324  cl_double value;
325  public:
326  BCSConstantValue(Data d, cl_double v);
327  virtual void execute();
328  virtual void init();
329  };
330 
331 
332 
333 } //asl
334 
335 #endif //ASLBASICBC_H
acl::VectorOfElements value
Definition: aslBasicBC.h:216
std::shared_ptr< PositionFunction > SPPositionFunction
Bondary condition that puts fixed value in each point.
Definition: aslBasicBC.h:69
SPNumMethod generateBCConstantValue(SPAbstractDataWithGhostNodes d, SPPositionFunction v, SPAbstractDataWithGhostNodes map)
Bondary condition that puts fixed value in each point.
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:94
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:212
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:194
Advanced Simulation Library.
Definition: aslDataInc.h:30
Advanced Computational Language.
Definition: acl.h:40
std::shared_ptr< Kernel > SPKernel
acl::VectorOfElements value
Definition: aslBasicBC.h:57
Virtual class describes general interface for boundary conditions.
Definition: aslBCond.h:58
Virtual class describes general interface for boundary conditions which connect two datas...
Definition: aslBCond.h:189
Bondary condition that puts fixed value in each point.
Definition: aslBasicBC.h:50
Bondary condition that puts fixed value in each boundary point.
Definition: aslBasicBC.h:91
Bondary condition that makes fixed gradient.
Definition: aslBasicBC.h:209
acl::VectorOfElements value
Definition: aslBasicBC.h:76
Bondary condition that puts fixed value in each point uses Slices.
Definition: aslBasicBC.h:317
acl::SPKernel kernel
Definition: aslBasicBC.h:73
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:53
Bondary condition that puts fixed value in each point.
Definition: aslBasicBC.h:114
Updatable value. This class stores value and its TimeStamp.
Definition: aslBasicBC.h:41
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:72
Bondary condition that copies directly the values from one data to another.
Definition: aslBasicBC.h:299
The class represents several Element.
SPNumMethod generateBCConstantGradient(SPAbstractDataWithGhostNodes d, AVec<> v, SPAbstractDataWithGhostNodes map, const VectorTemplate *const t)
Bondary condition that makes fixed gradient.
Bondary condition that makes fixed gradient.
Definition: aslBasicBC.h:191
std::shared_ptr< T > map(ElementData m)
Definition: aclMemBlock.h:68
SPNumMethod generateBCConstantGradient2(SPAbstractDataWithGhostNodes d, AVec<> v, SPAbstractDataWithGhostNodes map, const VectorTemplate *const t)
Bondary condition that makes fixed gradient, second order accuracy.
Virtual class describes general interface for boundary conditions.
Definition: aslBCond.h:100
SPDataWithGhostNodesACLData Data
Definition: aslBasicBC.h:320
acl::SPKernel kernel
Definition: aslBasicBC.h:195
Virtual class describes general interface for boundary conditions.
Definition: aslBCond.h:227
acl::SPKernel kernel
Definition: aslBasicBC.h:322
SPNumMethod generateBCConstantValueMiddlePoint(SPAbstractDataWithGhostNodes d, AVec<> v, SPAbstractDataWithGhostNodes map, const VectorTemplate *const t)
Bondary condition that puts fixed value in each point.
acl::VectorOfElements value
Definition: aslBasicBC.h:198
acl::SPKernel kernel
Definition: aslBasicBC.h:118
acl::SPKernel kernel
Definition: aslBasicBC.h:54
SPDataWithGhostNodesACLData Data
Definition: aslBasicBC.h:302
SPDataWithGhostNodesACLData Data
Definition: aslBasicBC.h:282
SPPositionFunction value
Definition: aslBasicBC.h:121
Defines set of vectros with several properties.
Definition: aslTemplates.h:87
acl::SPKernel kernel
Definition: aslBasicBC.h:303
acl::VectorOfElements value
Definition: aslBasicBC.h:98
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:117
acl::SPKernel kernel
Definition: aslBasicBC.h:283
Bondary condition that adds fixed value to one in each point.
Definition: aslBasicBC.h:279