/usr/include/gmsh/CondNumBasis.h is in libgmsh-dev 2.15.0+dfsg1-3.
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 | // Gmsh - Copyright (C) 1997-2016 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@onelab.info>.
#ifndef _CONDNUMBASIS_H_
#define _CONDNUMBASIS_H_
#include <map>
#include <vector>
#include "fullMatrix.h"
#include "JacobianBasis.h"
class CondNumBasis {
private:
const GradientBasis *_gradBasis;
const int _tag, _dim, _condNumOrder;
fullVector<double> primGradShapeBarycenterX, primGradShapeBarycenterY,
primGradShapeBarycenterZ;
int _nCondNumNodes;
int _nMapNodes, _nPrimMapNodes;
public :
CondNumBasis(int tag, int cnOrder = -1);
// Get methods
inline int getCondNumOrder() const { return _condNumOrder; }
inline int getNumCondNumNodes() const { return _nCondNumNodes; }
inline int getNumMapNodes() const { return _nMapNodes; }
inline int getNumPrimMapNodes() const { return _nPrimMapNodes; }
// Order calculation
static int condNumOrder(int tag);
static int condNumOrder(int parentType, int order);
// Condition number evaluation methods
inline void getInvCondNum(const fullMatrix<double> &nodesXYZ,
fullVector<double> &invCond) const {
getInvCondNumGeneral(_nCondNumNodes,
_gradBasis->gradShapeIdealMatX,
_gradBasis->gradShapeIdealMatY,
_gradBasis->gradShapeIdealMatZ,
nodesXYZ, invCond);
}
inline void getSignedInvCondNum(const fullMatrix<double> &nodesXYZ,
const fullMatrix<double> &normals,
fullVector<double> &invCond) const {
getSignedInvCondNumGeneral(_nCondNumNodes,
_gradBasis->gradShapeIdealMatX,
_gradBasis->gradShapeIdealMatY,
_gradBasis->gradShapeIdealMatZ,
nodesXYZ, normals, invCond);
}
inline void getInvCondNumAndGradients(const fullMatrix<double> &nodesXYZ,
fullMatrix<double> &IDI) const {
getInvCondNumAndGradientsGeneral(_nCondNumNodes,
_gradBasis->gradShapeIdealMatX,
_gradBasis->gradShapeIdealMatY,
_gradBasis->gradShapeIdealMatZ,
nodesXYZ, IDI);
}
inline void getSignedInvCondNumAndGradients(const fullMatrix<double> &nodesXYZ,
const fullMatrix<double> &normals,
fullMatrix<double> &IDI) const {
getSignedInvCondNumAndGradientsGeneral(_nCondNumNodes,
_gradBasis->gradShapeIdealMatX,
_gradBasis->gradShapeIdealMatY,
_gradBasis->gradShapeIdealMatZ,
nodesXYZ, normals, IDI);
}
private :
template<bool sign>
void getInvCondNumGeneral(int nCondNumNodes,
const fullMatrix<double> &gSMatX,
const fullMatrix<double> &gSMatY,
const fullMatrix<double> &gSMatZ,
const fullMatrix<double> &nodesXYZ,
const fullMatrix<double> &normals,
fullVector<double> &invCond) const;
void getInvCondNumGeneral(int nCondNumNodes,
const fullMatrix<double> &gSMatX,
const fullMatrix<double> &gSMatY,
const fullMatrix<double> &gSMatZ,
const fullMatrix<double> &nodesXYZ,
fullVector<double> &invCond) const;
void getSignedInvCondNumGeneral(int nCondNumNodes,
const fullMatrix<double> &gSMatX,
const fullMatrix<double> &gSMatY,
const fullMatrix<double> &gSMatZ,
const fullMatrix<double> &nodesXYZ,
const fullMatrix<double> &normals,
fullVector<double> &invCond) const;
template<bool sign>
void getInvCondNumAndGradientsGeneral(int nCondNumNodes,
const fullMatrix<double> &gSMatX,
const fullMatrix<double> &gSMatY,
const fullMatrix<double> &gSMatZ,
const fullMatrix<double> &nodesXYZ,
const fullMatrix<double> &normals,
fullMatrix<double> &IDI) const;
void getInvCondNumAndGradientsGeneral(int nCondNumNodes, // No normal given -> unsigned measure
const fullMatrix<double> &gSMatX,
const fullMatrix<double> &gSMatY,
const fullMatrix<double> &gSMatZ,
const fullMatrix<double> &nodesXYZ,
fullMatrix<double> &IDI) const;
void getSignedInvCondNumAndGradientsGeneral(int nCondNumNodes, // Normals given -> signed measure
const fullMatrix<double> &gSMatX,
const fullMatrix<double> &gSMatY,
const fullMatrix<double> &gSMatZ,
const fullMatrix<double> &nodesXYZ,
const fullMatrix<double> &normals,
fullMatrix<double> &IDI) const;
};
#endif
|