aslTemplatesExtras.h
Go to the documentation of this file.
/*
* Advanced Simulation Library <http://asl.org.il>
*
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
*
*
* This file is part of Advanced Simulation Library (ASL).
*
* ASL is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, version 3 of the License.
*
* ASL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ASLTEMPLATESEXTRAS_H
#define ASLTEMPLATESEXTRAS_H
#include "aslTemplates.h"
#include "aslMatrices.h"
namespace acl {
class VectorOfElements;
}
namespace asl {
class VTObjects
{
private:
void initCellMatrices();
public:
const VectorTemplate * vt;
std::vector<unsigned int> edgePoint1;
std::vector<unsigned int> edgePoint2;
std::vector<AVec<int>> elementaryCells;
std::vector<AMatr<>> cellMatrices;
VTObjects(const VectorTemplate * vt,
const std::vector<unsigned int> & ep1,
const std::vector<unsigned int> & ep2,
const std::vector<AVec<int>> & elCells);
acl::VectorOfElements cellGradient(const acl::VectorOfElements & val,
unsigned int ic) const;
void getCellPoints(unsigned int ic, std::vector<AVec<>> & points) const;
};
inline unsigned int nD(const VTObjects vto);
const VTObjects* vtObject(const VectorTemplate *);
double edgeWeight(const VTObjects & vto, unsigned int iEl, unsigned int i, unsigned int j);
const VTObjects & d2q5Objs();
const VTObjects & d3q7Objs();
const VTObjects & d2q9Objs();
const VTObjects & d3q15Objs();
const VTObjects & d3q19Objs();
// ----------------------------- Implementation -------------------------
inline unsigned int nD(const VTObjects & vto)
{
return nD(*vto.vt);
}
}// asl
#endif // ASLTEMPLATESEXTRAS_H
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::AVec< int >
asl::VTObjects
Defines andditionl features related to a VectorTemplate.
Definition: aslTemplatesExtras.h:44
asl::VTObjects::edgePoint1
std::vector< unsigned int > edgePoint1
Definition: aslTemplatesExtras.h:49
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
asl::VTObjects::edgePoint2
std::vector< unsigned int > edgePoint2
Definition: aslTemplatesExtras.h:50
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::VTObjects::vt
const VectorTemplate * vt
Definition: aslTemplatesExtras.h:48
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)
asl::VTObjects::cellMatrices
std::vector< AMatr<> > cellMatrices
Definition: aslTemplatesExtras.h:52
asl::VTObjects::getCellPoints
void getCellPoints(unsigned int ic, std::vector< AVec<>> &points) const
fill points by corner coordinates of the cell ic
asl::VTObjects::elementaryCells
std::vector< AVec< int > > elementaryCells
Definition: aslTemplatesExtras.h:51
asl::VectorTemplate
Defines set of vectros with several properties.
Definition: aslTemplates.h:88
asl::nD
const unsigned int nD(const Block &b)
Definition: aslBlocks.h:220
asl::vtObject
const VTObjects * vtObject(const VectorTemplate *)
Returns vtObjecs corresponding to the given VectorTemplate.
asl::d3q7Objs
const VTObjects & d3q7Objs()
Vector template.
asl::d3q15Objs
const VTObjects & d3q15Objs()
Vector template.
asl::d3q19Objs
const VTObjects & d3q19Objs()
Vector template.
asl::d2q9Objs
const VTObjects & d2q9Objs()
Vector template.
asl::d2q5Objs
const VTObjects & d2q5Objs()
Vector template.
acl
Advanced Computational Language.
Definition: acl.h:41
asl
Advanced Simulation Library.
Definition: aslDataInc.h:31
aslMatrices.h
Matrices.
aslTemplates.h