/usr/include/ASL/math/aslTemplatesExtras.h is in libasl-dev 0.1.7-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | /*
* 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 {
/// Defines andditionl features related to a VectorTemplate
/**
\ingroup Templates
contains list of edges for a template. this can be used in level
set and iso-surface extraction algorithms
*/
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);
/// computes gradient within the elementary cell \p ic and values in the corners \p val
acl::VectorOfElements cellGradient(const acl::VectorOfElements & val,
unsigned int ic) const;
/// fill \p points by corner coordinates of the cell \p ic
void getCellPoints(unsigned int ic, std::vector<AVec<>> & points) const;
};
inline unsigned int nD(const VTObjects vto);
/// Returns vtObjecs corresponding to the given VectorTemplate \ingroup Templates
const VTObjects* vtObject(const VectorTemplate *);
/// returns coefficient of the laplace operator corresponding to the direction of a cell edge
/**
\related VTObjects
*/
double edgeWeight(const VTObjects & vto, unsigned int iEl, unsigned int i, unsigned int j);
///Vector template
/**
\ingroup TemplatesNN
\image html t5.png
*/
const VTObjects & d2q5Objs();
///Vector template
/**
\ingroup TemplatesNN
\image html t7.png
*/
const VTObjects & d3q7Objs();
///Vector template
/**
\ingroup TemplatesNN
\image html t9.png
*/
const VTObjects & d2q9Objs();
///Vector template
/**
\ingroup TemplatesNN
\image html t15.png
*/
const VTObjects & d3q15Objs();
///Vector template
/**
\ingroup TemplatesNN
\image html t19.png
*/
const VTObjects & d3q19Objs();
// ----------------------------- Implementation -------------------------
inline unsigned int nD(const VTObjects & vto)
{
return nD(*vto.vt);
}
}// asl
#endif // ASLTEMPLATESEXTRAS_H
|