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 
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
asl::VTObjects::edgeWeight
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
asl::d2q5Objs
const VTObjects & d2q5Objs()
Vector template.
asl::VTObjects::vt
const VectorTemplate * vt
Definition: aslTemplatesExtras.h:48
asl::VTObjects::elementaryCells
std::vector< AVec< int > > elementaryCells
Definition: aslTemplatesExtras.h:51
asl::VTObjects::cellGradient
acl::VectorOfElements cellGradient(const acl::VectorOfElements &val, unsigned int ic) const
computes gradient within the elementary cell ic and values in the corners val
aslMatrices.h
Matrices.
asl::vtObject
const VTObjects * vtObject(const VectorTemplate *)
Returns vtObjecs corresponding to the given VectorTemplate.
asl::VTObjects::VTObjects
VTObjects(const VectorTemplate *vt, const std::vector< unsigned int > &ep1, const std::vector< unsigned int > &ep2, const std::vector< AVec< int >> &elCells)
aslTemplates.h
asl::nD
const unsigned int nD(const Block &b)
Definition: aslBlocks.h:220
asl::VTObjects::edgePoint2
std::vector< unsigned int > edgePoint2
Definition: aslTemplatesExtras.h:50
asl::d3q15Objs
const VTObjects & d3q15Objs()
Vector template.
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::d3q19Objs
const VTObjects & d3q19Objs()
Vector template.
asl::VTObjects::edgePoint1
std::vector< unsigned int > edgePoint1
Definition: aslTemplatesExtras.h:49
asl::d2q9Objs
const VTObjects & d2q9Objs()
Vector template.
asl::VTObjects::cellMatrices
std::vector< AMatr<> > cellMatrices
Definition: aslTemplatesExtras.h:52
asl::d3q7Objs
const VTObjects & d3q7Objs()
Vector template.
asl::VectorTemplate
Defines set of vectros with several properties.
Definition: aslTemplates.h:88
asl::VTObjects
Defines andditionl features related to a VectorTemplate.
Definition: aslTemplatesExtras.h:44
asl::VTObjects::getCellPoints
void getCellPoints(unsigned int ic, std::vector< AVec<>> &points) const
fill points by corner coordinates of the cell ic
asl::AVec< int >
asl
Advanced Simulation Library.
Definition: aslDataInc.h:31
acl
Advanced Computational Language.
Definition: acl.h:41