ASL 0.1.7
Advanced Simulation Library
Loading...
Searching...
No Matches
aslTemplatesExtras.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 ASLTEMPLATESEXTRAS_H
25#define ASLTEMPLATESEXTRAS_H
26
27#include "aslTemplates.h"
28#include "aslMatrices.h"
29
30namespace acl {
31 class VectorOfElements;
32}
33
34namespace asl {
35
36
38
44 {
45 private:
46 void initCellMatrices();
47 public:
49 std::vector<unsigned int> edgePoint1;
50 std::vector<unsigned int> edgePoint2;
51 std::vector<AVec<int>> elementaryCells;
52 std::vector<AMatr<>> cellMatrices;
53
55 const std::vector<unsigned int> & ep1,
56 const std::vector<unsigned int> & ep2,
57 const std::vector<AVec<int>> & elCells);
58
61 unsigned int ic) const;
63 void getCellPoints(unsigned int ic, std::vector<AVec<>> & points) const;
64 };
65
66 inline unsigned int nD(const VTObjects vto);
67
70
72
75 double edgeWeight(const VTObjects & vto, unsigned int iEl, unsigned int i, unsigned int j);
76
77
79
84 const VTObjects & d2q5Objs();
85
87
92 const VTObjects & d3q7Objs();
93
95
100 const VTObjects & d2q9Objs();
101
103
109
111
117
118// ----------------------------- Implementation -------------------------
119
120 inline unsigned int nD(const VTObjects & vto)
121 {
122 return nD(*vto.vt);
123 }
124
125}// asl
126
127#endif // ASLTEMPLATESEXTRAS_H
The class represents several Element.
Defines andditionl features related to a VectorTemplate.
VTObjects(const VectorTemplate *vt, const std::vector< unsigned int > &ep1, const std::vector< unsigned int > &ep2, const std::vector< AVec< int > > &elCells)
std::vector< unsigned int > edgePoint1
acl::VectorOfElements cellGradient(const acl::VectorOfElements &val, unsigned int ic) const
computes gradient within the elementary cell ic and values in the corners val
std::vector< unsigned int > edgePoint2
void getCellPoints(unsigned int ic, std::vector< AVec<> > &points) const
fill points by corner coordinates of the cell ic
double edgeWeight(const VTObjects &vto, unsigned int iEl, unsigned int i, unsigned int j)
returns coefficient of the laplace operator corresponding to the direction of a cell edge
const VectorTemplate * vt
std::vector< AMatr<> > cellMatrices
std::vector< AVec< int > > elementaryCells
Defines set of vectros with several properties.
const unsigned int nD(const Block &b)
Definition aslBlocks.h:220
SPDataWrapperACLData generateDataContainerACL_SP(const Block &b, unsigned int n=1)
generates pointer to ACL Data field with n components
const VTObjects * vtObject(const VectorTemplate *)
Returns vtObjecs corresponding to the given VectorTemplate.
const VTObjects & d3q7Objs()
Vector template.
const VTObjects & d3q15Objs()
Vector template.
const VTObjects & d3q19Objs()
Vector template.
const VTObjects & d2q9Objs()
Vector template.
const VTObjects & d2q5Objs()
Vector template.
Advanced Computational Language.
Definition acl.h:41
Advanced Simulation Library.
Definition aslDataInc.h:31
Matrices.