ASL  0.1.7
Advanced Simulation Library
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 
30 namespace acl {
31  class VectorOfElements;
32 }
33 
34 namespace asl {
35 
36 
38 
43  class VTObjects
44  {
45  private:
46  void initCellMatrices();
47  public:
48  const VectorTemplate * vt;
49  std::vector<unsigned int> edgePoint1;
50  std::vector<unsigned int> edgePoint2;
51  std::vector<AVec<int>> elementaryCells;
52  std::vector<AMatr<>> cellMatrices;
53 
54  VTObjects(const VectorTemplate * vt,
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 
69  const VTObjects* vtObject(const VectorTemplate *);
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 
108  const VTObjects & d3q15Objs();
109 
111 
116  const VTObjects & d3q19Objs();
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
const VectorTemplate * vt
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 > edgePoint1
VTObjects(const VectorTemplate *vt, const std::vector< unsigned int > &ep1, const std::vector< unsigned int > &ep2, const std::vector< AVec< int >> &elCells)
Advanced Simulation Library.
Definition: aslDataInc.h:30
Advanced Computational Language.
Definition: acl.h:40
const VTObjects & d2q9Objs()
Vector template.
std::vector< unsigned int > edgePoint2
std::vector< AVec< int > > elementaryCells
Matrices.
const unsigned int nD(const Block &b)
Definition: aslBlocks.h:220
const VTObjects & d2q5Objs()
Vector template.
Defines andditionl features related to a VectorTemplate.
The class represents several Element.
const VTObjects & d3q19Objs()
Vector template.
const VTObjects & d3q7Objs()
Vector template.
const VTObjects * vtObject(const VectorTemplate *)
Returns vtObjecs corresponding to the given VectorTemplate.
const VTObjects & d3q15Objs()
Vector template.
std::vector< AMatr<> > cellMatrices
Defines set of vectros with several properties.
Definition: aslTemplates.h:87
void getCellPoints(unsigned int ic, std::vector< AVec<>> &points) const
fill points by corner coordinates of the cell ic