Back to index

salome-med  6.5.0
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
INTERP_KERNEL Namespace Reference

Namespaces

namespace  STLEXT

Classes

class  AutoPtr
protocol  INTERPKERNEL_EXPORT
 Class representing the bounding box of a number of points. More...
struct  hash
struct  hash< char * >
struct  hash< const char * >
struct  hash< char >
struct  hash< unsigned char >
struct  hash< signed char >
struct  hash< short >
struct  hash< unsigned short >
struct  hash< int >
struct  hash< unsigned int >
struct  hash< long >
struct  hash< unsigned long >
class  HashMap
class  HashMultiMap
struct  _Hashtable_node
struct  _Hashtable_iterator
struct  _Hashtable_const_iterator
class  hashtable
class  GenericMesh
class  CellModel
 This class descibes all static elements (different from polygons and polyhedron) 3D, 2D and 1D. More...
class  ConvexIntersector
class  CurveIntersector
class  CurveIntersectorP0P0
class  CurveIntersectorP0P1
class  CurveIntersectorP1P0
class  CurveIntersectorP1P1
class  AsmX86
class  PlusFunction
class  EdgeInfLin
class  Geometric2DIntersector
class  IntegralUniformIntersector
class  IntegralUniformIntersectorP0
class  IntegralUniformIntersectorP1
class  Matrix
class  Interpolation
class  Interpolation1D
class  Interpolation2D
class  Interpolation2D1D
 Contrary to its name this class deals with 1D mesh in source and 2D mesh in target. More...
class  InterpolationCC
 Interpolator of cartesian/cartesian meshes. More...
class  InterpolationCU
class  InterpolationCurve
class  InterpolationPlanar
class  OTT
class  OTT< ConnType, ALL_C_MODE >
class  OTT< ConnType, ALL_FORTRAN_MODE >
class  AngleLess
 Function that compares two angles from the values of the pairs (sin,cos) More...
class  Intersector3D
class  Intersector3DP0P0
class  Intersector3DP0P1
class  Intersector3DP1P0
class  Intersector3DP1P0Bary
class  Intersector3DP1P1
class  IntersectorCU
class  _StabIntersector
class  IntersectorCU1D
class  IntersectorCU2D
class  IntersectorCU3D
class  MeshElement
 Class representing a single element of a mesh together with its bounding box. More...
class  ElementBBoxOrder
 Class defining an order for MeshElements based on their bounding boxes. More...
class  MeshRegion
 Class representing a set of elements in a mesh together with their bounding box. More...
class  Planar2D1DIntersectorP0P0
class  PlanarIntersector
class  PlanarIntersectorP0P0
class  PlanarIntersectorP0P1
class  PlanarIntersectorP0P1PL
class  PlanarIntersectorP1P0
class  PlanarIntersectorP1P0Bary
class  PlanarIntersectorP1P0PL
class  PlanarIntersectorP1P1
class  PlanarIntersectorP1P1PL
class  PointLocator2DIntersector
class  PointLocator3DIntersectorP0P0
class  PointLocator3DIntersectorP0P1
class  PointLocator3DIntersectorP1P0
class  PointLocator3DIntersectorP1P1
class  VertexLess
class  PolygonAlgorithms
class  Polyhedron3D2DIntersectorP0P0
 Class responsible for calculating intersection between a hexahedron target element and the source elements. More...
class  PolyhedronIntersectorP0P0
 Class responsible for calculating intersection between a hexahedron target element and the source elements. More...
class  PolyhedronIntersectorP0P1
 Class responsible for calculating intersection between a hexahedron target element and the source elements. More...
class  PolyhedronIntersectorP1P0
 Class responsible for calculating intersection between a hexahedron target element and the source elements. More...
class  PolyhedronIntersectorP1P0Bary
 Class responsible for calculating intersection between a hexahedron target element and the source elements. More...
class  PolyhedronIntersectorP1P1
 Class responsible for calculating intersection between a hexahedron target element and the source elements. More...
class  RegionNode
 Class containing a tuplet of a source region and a target region. More...
class  TriangleFaceKey
 Class representing a triangular face, used as key in caching hash map in SplitterTetra. More...
class  hash< INTERP_KERNEL::TriangleFaceKey >
 Template specialization of INTERP_KERNEL::hash<T> function object for use with a with TriangleFaceKey as key class. More...
class  SplitterTetra
 Class calculating the volume of intersection between a tetrahedral target element and source elements with triangular or quadratilateral faces. More...
class  SplitterTetra2
class  TargetIntersector
 Abstract base class of Intersector classes. More...
class  ProjectedCentralCircularSortOrder
 Class representing a circular order of a set of points around their barycenter. More...
class  TriangulationIntersector
class  UnitTetraIntersectionBary
struct  hash< pair< int, int > >

Typedefs

typedef std::vector< double > DataVector
typedef std::vector< int > IndexVector

Enumerations

enum  { _S_num_primes = 28 }
enum  NumberingPolicy { ALL_C_MODE, ALL_FORTRAN_MODE }
enum  NormalizedCellType {
  NORM_POINT1 = 0, NORM_SEG2 = 1, NORM_SEG3 = 2, NORM_TRI3 = 3,
  NORM_POLYL = 33, NORM_QUAD4 = 4, NORM_POLYGON = 5, NORM_TRI6 = 6,
  NORM_QUAD8 = 8, NORM_QPOLYG = 32, NORM_TETRA4 = 14, NORM_PYRA5 = 15,
  NORM_PENTA6 = 16, NORM_HEXA8 = 18, NORM_TETRA10 = 20, NORM_HEXGP12 = 22,
  NORM_PYRA13 = 23, NORM_PENTA15 = 25, NORM_HEXA20 = 30, NORM_POLYHED = 31,
  NORM_ERROR = 40, NORM_MAXTYPE = 33
}
enum  Position { IN = 0, OUT = 1, ON_BOUNDARY_POS = 2, ON_BOUNDARY_NEG = 3 }
 Relative LOC. More...
enum  TypeOfFunction { SEG = 1, ARC_CIRCLE = 4, ARC_PARABOL = 8 }
enum  TypeOfMod4QuadEdge { CIRCLE = 0, PARABOL = 1 }
enum  TypeOfLocInEdge {
  START = 5, END = 1, INSIDE = 2, OUT_BEFORE = 3,
  OUT_AFTER = 4
}
enum  TypeOfEdgeLocInPolygon { FULL_IN_1 = 1, FULL_ON_1 = 4, FULL_OUT_1 = 2, FULL_UNKNOWN = 3 }
enum  TypeOfLocInPolygon {
  IN_1 = 7, ON_1 = 8, ON_LIM_1 = 12, ON_TANG_1 = 9,
  OUT_1 = 10, UNKNOWN = 11
}
enum  IntersectionType { Triangulation, Convex, Geometric2D, PointLocator }
enum  SplittingPolicy { PLANAR_FACE_5 = 5, PLANAR_FACE_6 = 6, GENERAL_24 = 24, GENERAL_48 = 48 }
 Type describing the different ways in which the hexahedron can be split into tetrahedra. The PLANAR_* policies persume that each face is to be considered planar, while the general policies make no such hypothesis. The integer at the end gives the number of tetrahedra that result from the split. More...
enum  { _X = 0, _Y, _Z }

Functions

std::size_t __stl_hash_string (const char *__s)
template<class _Key , class _Tp , class _HashFn , class _EqlKey , class _Alloc >
bool operator== (const HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &__hm1, const HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &__hm2)
template<class _Key , class _Tp , class _HashFn , class _EqlKey , class _Alloc >
bool operator!= (const HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &__hm1, const HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &__hm2)
template<class _Key , class _Tp , class _HashFn , class _EqlKey , class _Alloc >
void swap (HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &__hm1, HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &__hm2)
template<class _Key , class _Tp , class _HF , class _EqKey , class _Alloc >
bool operator== (const HashMultiMap< _Key, _Tp, _HF, _EqKey, _Alloc > &__hm1, const HashMultiMap< _Key, _Tp, _HF, _EqKey, _Alloc > &__hm2)
template<class _Key , class _Tp , class _HF , class _EqKey , class _Alloc >
bool operator!= (const HashMultiMap< _Key, _Tp, _HF, _EqKey, _Alloc > &__hm1, const HashMultiMap< _Key, _Tp, _HF, _EqKey, _Alloc > &__hm2)
template<class _Key , class _Tp , class _HashFn , class _EqlKey , class _Alloc >
void swap (HashMultiMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &__hm1, HashMultiMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &__hm2)
unsigned long __stl_next_prime (unsigned long __n)
template<class _Val , class _Key , class _HF , class _Ex , class _Eq , class _All >
bool operator== (const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &__ht1, const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &__ht2)
template<class _Val , class _Key , class _HF , class _Ex , class _Eq , class _All >
bool operator!= (const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &__ht1, const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &__ht2)
template<class _Val , class _Key , class _HF , class _Extract , class _EqKey , class _All >
void swap (hashtable< _Val, _Key, _HF, _Extract, _EqKey, _All > &__ht1, hashtable< _Val, _Key, _HF, _Extract, _EqKey, _All > &__ht2)
void computeEigenValues6 (const double *matrix, double *eigenVals)
 This method computes eigenvalues of a 3x3 symetric matrix stored with 6 values in 'matrix'.
void computeEigenVectorForEigenValue6 (const double *matrix, double eigenVal, double eps, double *eigenVector) throw (INTERP_KERNEL::Exception)
 This method computes one eigenvector of a 3x3 symetric matrix stored with 6 values in 'matrix'.
template<class U , NumberingPolicy type>
std::ostream & operator<< (std::ostream &in, const Matrix< U, type > &m)
template<class U , NumberingPolicy type>
std::istream & operator>> (std::istream &in, Matrix< U, type > &m)
template<class T , NumberingPolicy type>
std::ostream & operator<< (std::ostream &out, const Matrix< T, type > &m)
 output to an ascii file only nonzero elements are written
template<class T , NumberingPolicy type>
std::istream & operator>> (std::istream &in, Matrix< T, type > &m)
INTERPKERNEL_EXPORT double quadSkew (const double *coo)
INTERPKERNEL_EXPORT double quadEdgeRatio (const double *coo)
INTERPKERNEL_EXPORT double quadAspectRatio (const double *coo)
INTERPKERNEL_EXPORT double quadWarp (const double *coo)
INTERPKERNEL_EXPORT double triEdgeRatio (const double *coo)
INTERPKERNEL_EXPORT double triAspectRatio (const double *coo)
INTERPKERNEL_EXPORT double tetraEdgeRatio (const double *coo)
INTERPKERNEL_EXPORT double tetraAspectRatio (const double *coo)
double Surf_Tri (const double *P_1, const double *P_2, const double *P_3)
double mon_determinant (const double *P_1, const double *P_2, const double *P_3)
double norme_vecteur (const double *P_1, const double *P_2)
std::vector< double > calcul_cos_et_sin (const double *P_1, const double *P_2, const double *P_3)
template<int SPACEDIM>
void fillDualCellOfTri (const double *triIn, double *quadOut)
 This method builds a quadrangle built with the first point of 'triIn' the barycenter of two edges starting or ending with the first point of 'triIn' and the barycenter of 'triIn'.
template<int SPACEDIM>
void fillDualCellOfPolyg (const double *polygIn, int nPtsPolygonIn, double *polygOut)
 This method builds a potentially non-convex polygon cell built with the first point of 'triIn' the barycenter of two edges starting or ending with the first point of 'triIn' and the barycenter of 'triIn'.
std::vector< double > bary_poly (const std::vector< double > &V)
double computeTria6RefBase (const double *coeffs, const double *pos)
 Given 6 coeffs of a Tria6 returns the corresponding value of a given pos.
void computeWeightedCoeffsInTria6FromRefBase (const double *refCoo, double *weightedPos)
 Given xsi,eta in refCoo (length==2) return 6 coeffs in weightedPos.
double computeTetra10RefBase (const double *coeffs, const double *pos)
 Given 10 coeffs of a Tetra10 returns the corresponding value of a given pos.
void computeWeightedCoeffsInTetra10FromRefBase (const double *refCoo, double *weightedPos)
 Given xsi,eta,z in refCoo (length==3) return 10 coeffs in weightedPos.
template<unsigned nbRow>
bool solveSystemOfEquations (double M[nbRow][nbRow+1], double *sol)
 Solve system equation in matrix form using Gaussian elimination algorithm.
template<unsigned SZ, unsigned NB_OF_RES>
bool solveSystemOfEquations2 (const double *matrix, double *solutions, double eps)
 Solve system equation in matrix form using Gaussian elimination algorithm.
template<int SPACEDIM>
void barycentric_coords (const double *triaCoords, const double *p, double *bc)
void barycentric_coords (const std::vector< const double * > &n, const double *p, double *bc)
 Calculate barycentric coordinates of a point p with respect to triangle or tetra verices.
double Surf_Poly (const std::vector< double > &Poly)
bool point_dans_triangle (const double *P_0, const double *P_1, const double *P_2, const double *P_3, double eps)
void verif_point_dans_vect (const double *P, std::vector< double > &V, double absolute_precision)
void rajou_sommet_triangl (const double *P_1, const double *P_2, const double *P_3, const double *P_4, const double *P_5, const double *P_6, std::vector< double > &V, double dim_caracteristic, double precision)
void inters_de_segment (const double *P_1, const double *P_2, const double *P_3, const double *P_4, std::vector< double > &Vect, double dim_caracteristic, double precision)
void intersec_de_triangle (const double *P_1, const double *P_2, const double *P_3, const double *P_4, const double *P_5, const double *P_6, std::vector< double > &Vect, double dim_caracteristic, double precision)
void verif_maill_dans_vect (int Num, std::vector< int > &V)
std::vector< double > reconstruct_polygon (const std::vector< double > &V)
template<int DIM, NumberingPolicy numPol, class MyMeshType >
void getElemBB (double *bb, const double *coordsOfMesh, int iP, int nb_nodes)
template<int dim>
double dotprod (const double *a, const double *b)
template<int dim>
double norm (const double *v)
 Calculates norm of a double[3] vector.
template<int dim>
double distance2 (const double *a, const double *b)
template<class T , int dim>
double distance2 (T *a, int inda, T *b, int indb)
double determinant (double *a, double *b)
double determinant (double *a, double *b, double *c)
template<int dim>
void crossprod (const double *A, const double *B, const double *C, double *V)
template<>
void crossprod< 2 > (const double *A, const double *B, const double *C, double *V)
template<>
void crossprod< 3 > (const double *A, const double *B, const double *C, double *V)
template<>
void crossprod< 1 > (const double *, const double *, const double *, double *)
template<int dim>
double check_inside (const double *A, const double *B, const double *C, const double *D, const double *E, double *ABC, double *ADE)
template<int dim>
double angle (const double *A, const double *B, const double *C, double *n)
template<int dim>
double direct_frame (const double *A, const double *B, const double *C, double *n)
template<>
double direct_frame< 2 > (const double *A, const double *B, const double *C, double *n)
template<>
double direct_frame< 3 > (const double *A, const double *B, const double *C, double *n)
template<int DIM>
void intersec_de_polygone (const double *Coords_A, const double *Coords_B, int nb_NodesA, int nb_NodesB, std::vector< double > &inter, double dim_caracteristic, double precision)
template<int DIM>
double polygon_area (std::vector< double > &inter)
template<int DIM>
double polygon_area (std::deque< double > &inter)
double triple_product (const double *A, const double *B, const double *C, const double *X)
 Computes the triple product (XA^XB).XC (in 3D)
template<class T , int dim>
bool checkEqualPolygonsOneDirection (T *L1, T *L2, int size1, int size2, int istart1, int istart2, double epsilon, int sign)
 Subroutine of checkEqualPolygins that tests if two list of nodes (not necessarily distincts) describe the same polygon, assuming they share a comon point.
template<class T , int dim>
bool checkEqualPolygons (T *L1, T *L2, double epsilon)
 Tests if two list of nodes (not necessarily distincts) describe the same polygon.
template<class MyMeshType >
MyMeshType::MyConnType getGlobalNumberOfNode (typename MyMeshType::MyConnType node, typename MyMeshType::MyConnType element, const MyMeshType &mesh)
 Returns the global number of the node of an element.
template<class MyMeshType >
const double * getCoordsOfNode (typename MyMeshType::MyConnType node, typename MyMeshType::MyConnType element, const MyMeshType &mesh)
 Returns the coordinates of a node of an element.
template<class MyMeshType >
const double * getCoordsOfNode2 (typename MyMeshType::MyConnType node, typename MyMeshType::MyConnType element, const MyMeshType &mesh, typename MyMeshType::MyConnType &nodeId)
 Returns the coordinates of a node of an element.
template<class MyMeshType , int NB_NODES>
void getBarycentricCoordinates (const double *point, typename MyMeshType::MyConnType element, const MyMeshType &mesh, double *barycentricCoords)
 Returns the barycentric coordinates of a point within a triangle or tetrahedron.
bool samePoint (const double *p1, const double *p2)
template<int SPACEDIM>
double getDistanceBtw2Pts (const double *a, const double *b)
void copyVector3 (const double *src, double *dest)
 Copies a double[3] vector from src to dest.
const std::string vToStr (const double *pt)
 Creates a string representation of a double[3] vector.
void add (const double *v, double *res)
 Adds a double[3] - vector to another one.
void cross (const double *v1, const double *v2, double *res)
 Calculates the cross product of two double[3] - vectors.
double dot (const double *v1, const double *v2)
 Calculates the dot product of two double[3] - vectors.
bool epsilonEqual (const double x, const double y, const double errTol=DEFAULT_ABS_TOL)
 Compares doubles using an absolute tolerance This is suitable mainly for comparisons with 0.0.
bool epsilonEqualRelative (const double x, const double y, const double relTol=DEFAULT_REL_TOL, const double absTol=DEFAULT_ABS_TOL)
 Compares doubles using a relative tolerance This is suitable mainly for comparing larger values to each other.
void calculateBarycenterDyn (const double **pts, int nbPts, int dim, double *bary)
double calculateAreaForPolyg (const double **coords, int nbOfPtsInPolygs, int spaceDim)
double calculateLgthForSeg2 (const double *p1, const double *p2, int spaceDim)
double calculateAreaForTria (const double *p1, const double *p2, const double *p3, int spaceDim)
double calculateAreaForQuad (const double *p1, const double *p2, const double *p3, const double *p4, int spaceDim)
void calculateNormalForTria (const double *p1, const double *p2, const double *p3, double *normal)
void calculateNormalForQuad (const double *p1, const double *p2, const double *p3, const double *p4, double *normal)
void calculateNormalForPolyg (const double **coords, int nbOfPtsInPolygs, double *normal)
double calculateVolumeForTetra (const double *p1, const double *p2, const double *p3, const double *p4)
double calculateVolumeForPyra (const double *p1, const double *p2, const double *p3, const double *p4, const double *p5)
double calculateVolumeForPenta (const double *p1, const double *p2, const double *p3, const double *p4, const double *p5, const double *p6)
double calculateVolumeForHexa (const double *pt1, const double *pt2, const double *pt3, const double *pt4, const double *pt5, const double *pt6, const double *pt7, const double *pt8)
double calculateVolumeForPolyh (const double ***pts, const int *nbOfNodesPerFaces, int nbOfFaces, const double *bary)
template<class ConnType , NumberingPolicy numPol>
double calculateVolumeForPolyh2 (const ConnType *connec, int lgth, const double *coords)
 Calculate Volume for Generic Polyedron, even not convex one, WARNING !!! The polyedron's faces must be correctly ordered.
template<class ConnType , NumberingPolicy numPol>
void areaVectorOfPolygon (const ConnType *connec, int lgth, const double *coords, double *res)
 This method returns the area oriented vector of a polygon.
double integrationOverA3DLine (double u1, double v1, double u2, double v2, double A, double B, double C)
template<class ConnType , NumberingPolicy numPol>
void barycenterOfPolyhedron (const ConnType *connec, int lgth, const double *coords, double *res)
double calculateVolumeForPolyhAbs (const double ***pts, const int *nbOfNodesPerFaces, int nbOfFaces, const double *bary)
template<int N>
double addComponentsOfVec (const double **pts, int rk)
template<>
double addComponentsOfVec< 1 > (const double **pts, int rk)
template<int N, int DIM>
void calculateBarycenter (const double **pts, double *bary)
template<>
void calculateBarycenter< 2, 0 > (const double **, double *)
template<>
void calculateBarycenter< 3, 0 > (const double **, double *)
template<>
void calculateBarycenter< 4, 0 > (const double **, double *)
template<>
void calculateBarycenter< 5, 0 > (const double **, double *)
template<>
void calculateBarycenter< 6, 0 > (const double **, double *)
template<>
void calculateBarycenter< 7, 0 > (const double **, double *)
template<>
void calculateBarycenter< 8, 0 > (const double **, double *)
template<int SPACEDIM>
void calculateBarycenterDyn2 (const double *pts, int nbPts, double *bary)
template<class ConnType , NumberingPolicy numPol>
void computePolygonBarycenter2D (const ConnType *connec, int lgth, const double *coords, double *res)
template<class ConnType , NumberingPolicy numPol>
void computePolygonBarycenter3D (const ConnType *connec, int lgth, const double *coords, double *res)
template<class ConnType , NumberingPolicy numPolConn, int SPACEDIM>
double computeVolSurfOfCell (NormalizedCellType type, const ConnType *connec, int lgth, const double *coords)
template<class ConnType , NumberingPolicy numPolConn>
double computeVolSurfOfCell2 (NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim)
template<class ConnType , NumberingPolicy numPolConn, int SPACEDIM>
void computeBarycenter (NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, double *res)
template<class ConnType , NumberingPolicy numPolConn>
void computeBarycenter2 (NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim, double *res)

Variables

static const unsigned long __stl_prime_list [_S_num_primes]
const unsigned MAX_SIZE_OF_LINE_XFIG_FILE = 1024
const double VOL_PREC = 1.0e-6
 Precision used for tests of 3D part of INTERP_KERNEL.
const double DEFAULT_REL_TOL = 1.0e-6
 Default relative tolerance in epsilonEqualRelative.
const double DEFAULT_ABS_TOL = 5.0e-12
 Default absolute tolerance in epsilonEqual and epsilonEqualRelative.

Class Documentation

struct INTERP_KERNEL::hash

template<class _Key>
struct INTERP_KERNEL::hash< _Key >

Definition at line 56 of file InterpKernelHashFun.hxx.

Inheritance diagram for INTERP_KERNEL::hash< _Key >:
struct INTERP_KERNEL::_Hashtable_node

template<class _Val>
struct INTERP_KERNEL::_Hashtable_node< _Val >

Definition at line 63 of file InterpKernelHashTable.hxx.

Collaboration diagram for INTERP_KERNEL::_Hashtable_node< _Val >:
Class Members
_Hashtable_node * _M_next
_Val _M_val
class INTERP_KERNEL::OTT

template<class ConnType, NumberingPolicy numPol>
class INTERP_KERNEL::OTT< ConnType, numPol >

Definition at line 40 of file InterpolationUtils.hxx.


Typedef Documentation

typedef std::vector<double> INTERP_KERNEL::DataVector

Definition at line 31 of file InterpKernelGaussCoords.hxx.

typedef std::vector<int> INTERP_KERNEL::IndexVector

Definition at line 32 of file InterpKernelGaussCoords.hxx.


Enumeration Type Documentation

anonymous enum
Enumerator:
_S_num_primes 

Definition at line 178 of file InterpKernelHashTable.hxx.

{ _S_num_primes = 28 };
anonymous enum
Enumerator:
_X 
_Y 
_Z 

Definition at line 38 of file UnitTetraIntersectionBary.cxx.

{ _X=0, _Y, _Z };
Enumerator:
Triangulation 
Convex 
Geometric2D 
PointLocator 

Definition at line 29 of file InterpolationOptions.hxx.

Enumerator:
NORM_POINT1 
NORM_SEG2 
NORM_SEG3 
NORM_TRI3 
NORM_POLYL 
NORM_QUAD4 
NORM_POLYGON 
NORM_TRI6 
NORM_QUAD8 
NORM_QPOLYG 
NORM_TETRA4 
NORM_PYRA5 
NORM_PENTA6 
NORM_HEXA8 
NORM_TETRA10 
NORM_HEXGP12 
NORM_PYRA13 
NORM_PENTA15 
NORM_HEXA20 
NORM_POLYHED 
NORM_ERROR 
NORM_MAXTYPE 

Definition at line 32 of file NormalizedUnstructuredMesh.hxx.

Enumerator:
ALL_C_MODE 
ALL_FORTRAN_MODE 

Definition at line 25 of file NormalizedUnstructuredMesh.hxx.

Relative LOC.

Enumerator:
IN 
OUT 
ON_BOUNDARY_POS 
ON_BOUNDARY_NEG 

Definition at line 32 of file InterpKernelGeo2DBounds.hxx.

    {
      IN              = 0,
      OUT             = 1,
      ON_BOUNDARY_POS = 2,
      ON_BOUNDARY_NEG = 3
    } Position;

Type describing the different ways in which the hexahedron can be split into tetrahedra. The PLANAR_* policies persume that each face is to be considered planar, while the general policies make no such hypothesis. The integer at the end gives the number of tetrahedra that result from the split.

Enumerator:
PLANAR_FACE_5 
PLANAR_FACE_6 
GENERAL_24 
GENERAL_48 

Definition at line 34 of file InterpolationOptions.hxx.

Enumerator:
FULL_IN_1 
FULL_ON_1 
FULL_OUT_1 
FULL_UNKNOWN 

Definition at line 58 of file InterpKernelGeo2DEdge.hxx.

Enumerator:
SEG 
ARC_CIRCLE 
ARC_PARABOL 

Definition at line 36 of file InterpKernelGeo2DEdge.hxx.

Enumerator:
START 
END 
INSIDE 
OUT_BEFORE 
OUT_AFTER 

Definition at line 49 of file InterpKernelGeo2DEdge.hxx.

    {
      START       = 5,
      END         = 1,
      INSIDE      = 2,
      OUT_BEFORE  = 3,
      OUT_AFTER   = 4
    } TypeOfLocInEdge; //see Edge::OFFSET_FOR_TYPEOFLOCINEDGE
Enumerator:
IN_1 
ON_1 
ON_LIM_1 
ON_TANG_1 
OUT_1 
UNKNOWN 

Definition at line 33 of file InterpKernelGeo2DNode.hxx.

    {
      IN_1      =  7,
      ON_1      =  8,
      ON_LIM_1  = 12,
      ON_TANG_1 =  9,
      OUT_1     = 10,
      UNKNOWN   = 11
    } TypeOfLocInPolygon;
Enumerator:
CIRCLE 
PARABOL 

Definition at line 43 of file InterpKernelGeo2DEdge.hxx.


Function Documentation

std::size_t INTERP_KERNEL::__stl_hash_string ( const char *  __s) [inline]

Definition at line 58 of file InterpKernelHashFun.hxx.

  {
    unsigned long __h = 0;
    for ( ; *__s; ++__s)
      __h = 5 * __h + *__s;
    return std::size_t(__h);
  }

Here is the caller graph for this function:

unsigned long INTERP_KERNEL::__stl_next_prime ( unsigned long  __n) [inline]

Definition at line 191 of file InterpKernelHashTable.hxx.

  {
    const unsigned long* __first = __stl_prime_list;
    const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
    const unsigned long* pos = std::lower_bound(__first, __last, __n);
    return pos == __last ? *(__last - 1) : *pos;
  }

Here is the caller graph for this function:

void INTERP_KERNEL::add ( const double *  v,
double *  res 
) [inline]

Adds a double[3] - vector to another one.

Parameters:
vvector v
resvector in which to store the result res + v.

Definition at line 89 of file VectorUtils.hxx.

  {
    res[0] += v[0];
    res[1] += v[1];
    res[2] += v[2];
  }

Here is the caller graph for this function:

template<int N>
double INTERP_KERNEL::addComponentsOfVec ( const double **  pts,
int  rk 
) [inline]

Definition at line 560 of file VolSurfFormulae.hxx.

  {
    return pts[N-1][rk]+addComponentsOfVec<N-1>(pts,rk);
  }
template<>
double INTERP_KERNEL::addComponentsOfVec< 1 > ( const double **  pts,
int  rk 
) [inline]

Definition at line 566 of file VolSurfFormulae.hxx.

  {
    return pts[0][rk];
  }
template<int dim>
double INTERP_KERNEL::angle ( const double *  A,
const double *  B,
const double *  C,
double *  n 
) [inline]

Definition at line 916 of file InterpolationUtils.hxx.

  {   
    double AB[dim];
    double AC[dim];
    double orthAB[dim];

    for(int idim =0; idim<dim; idim++) AB[idim] = B[idim]-A[idim];//B-A;
    for(int idim =0; idim<dim; idim++) AC[idim] = C[idim]-A[idim];//C-A;

    double normAB= norm<dim>(AB);
    for(int idim =0; idim<dim; idim++) AB[idim]/=normAB;

    double normAC= norm<dim>(AC);
    double AB_dot_AC=dotprod<dim>(AB,AC);
    for(int idim =0; idim<dim; idim++) orthAB[idim] = AC[idim]-AB_dot_AC*AB[idim];

    double denom= normAC+AB_dot_AC;
    double numer=norm<dim>(orthAB);
    
    return 2*atan2(numer,denom);
  }    

Here is the caller graph for this function:

template<class ConnType , NumberingPolicy numPol>
void INTERP_KERNEL::areaVectorOfPolygon ( const ConnType *  connec,
int  lgth,
const double *  coords,
double *  res 
) [inline]

This method returns the area oriented vector of a polygon.

This method is useful for normal computation without any troubles if several edges are colinears.

Parameters:
resmust be of size at least 3 to store the result.

Definition at line 453 of file VolSurfFormulae.hxx.

  {
    res[0]=0.; res[1]=0.; res[2]=0.;
    for(int ptId=0;ptId<lgth;ptId++)
      {
        const double *pti=coords+3*OTT<ConnType,numPol>::coo2C(connec[ptId]);
        const double *pti1=coords+3*OTT<ConnType,numPol>::coo2C(connec[(ptId+1)%lgth]);
        res[0]+=pti[1]*pti1[2]-pti[2]*pti1[1];
        res[1]+=pti[2]*pti1[0]-pti[0]*pti1[2];
        res[2]+=pti[0]*pti1[1]-pti[1]*pti1[0];
      }
  }
std::vector<double> INTERP_KERNEL::bary_poly ( const std::vector< double > &  V) [inline]

Definition at line 189 of file InterpolationUtils.hxx.

  {
    std::vector<double> Bary;
    long taille=V.size();
    double x=0;
    double y=0;

    for(long i=0;i<taille/2;i++)
      {
        x=x+V[2*i];
        y=y+V[2*i+1];
      }
    double A=2*x/((double)taille);
    double B=2*y/((double)taille);
    Bary.push_back(A);//taille vecteur=2*nb de points.
    Bary.push_back(B);


    return Bary;
  }

Here is the caller graph for this function:

template<class ConnType , NumberingPolicy numPol>
void INTERP_KERNEL::barycenterOfPolyhedron ( const ConnType *  connec,
int  lgth,
const double *  coords,
double *  res 
) [inline]

Definition at line 473 of file VolSurfFormulae.hxx.

  {
    std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1;
    res[0]=0.; res[1]=0.; res[2]=0.;
    const int *work=connec;
    for(std::size_t i=0;i<nbOfFaces;i++)
      {
        const int *work2=std::find(work+1,connec+lgth,-1);
        int nbOfNodesOfCurFace=(int)std::distance(work,work2);
        // projection to (u,v) of each faces of polyh to compute integral(x^2/2) on each faces.
        double normal[3];
        areaVectorOfPolygon<ConnType,numPol>(work,nbOfNodesOfCurFace,coords,normal);
        double normOfNormal=sqrt(normal[0]*normal[0]+normal[1]*normal[1]+normal[2]*normal[2]);
        normal[0]/=normOfNormal; normal[1]/=normOfNormal; normal[2]/=normOfNormal;
        double u[2]={normal[1],-normal[0]};
        double s=sqrt(u[0]*u[0]+u[1]*u[1]);
        double c=normal[2];
        if(fabs(s)>1e-12)
          {
            u[0]/=std::abs(s); u[1]/=std::abs(s);
          }
        else
          { u[0]=1.; u[1]=0.; }
        //C : high in plane of polyhedron face : always constant
        double w=normal[0]*coords[3*OTT<ConnType,numPol>::coo2C(work[0])]+
          normal[1]*coords[3*OTT<ConnType,numPol>::coo2C(work[0])+1]+
          normal[2]*coords[3*OTT<ConnType,numPol>::coo2C(work[0])+2];
        // A,B,D,F,G,H,L,M,N coeffs of rotation matrix defined by (u,c,s)
        double A=u[0]*u[0]*(1-c)+c;
        double B=u[0]*u[1]*(1-c);
        double D=u[1]*s;
        double F=B;
        double G=u[1]*u[1]*(1-c)+c;
        double H=-u[0]*s;
        double L=-u[1]*s;
        double M=u[0]*s;
        double N=c;
        double CX=-w*D;
        double CY=-w*H;
        double CZ=-w*N;
        for(int j=0;j<nbOfNodesOfCurFace;j++)
          {
            const double *p1=coords+3*OTT<ConnType,numPol>::coo2C(work[j]);
            const double *p2=coords+3*OTT<ConnType,numPol>::coo2C(work[(j+1)%nbOfNodesOfCurFace]);
            double u1=A*p1[0]+B*p1[1]+D*p1[2];
            double u2=A*p2[0]+B*p2[1]+D*p2[2];
            double v1=F*p1[0]+G*p1[1]+H*p1[2];
            double v2=F*p2[0]+G*p2[1]+H*p2[2];
            //
            double gx=integrationOverA3DLine(u1,v1,u2,v2,A,B,CX);
            double gy=integrationOverA3DLine(u1,v1,u2,v2,F,G,CY);
            double gz=integrationOverA3DLine(u1,v1,u2,v2,L,M,CZ);
            res[0]+=gx*normal[0];
            res[1]+=gy*normal[1];
            res[2]+=gz*normal[2];
          }
        work=work2+1;
      }
    double vol=calculateVolumeForPolyh2<ConnType,numPol>(connec,lgth,coords);
    res[0]/=vol; res[1]/=vol; res[2]/=vol;
  }

Here is the call graph for this function:

template<int SPACEDIM>
void INTERP_KERNEL::barycentric_coords ( const double *  triaCoords,
const double *  p,
double *  bc 
) [inline]

Definition at line 391 of file InterpolationUtils.hxx.

  {
    // matrix 2x2
    double
      T11 = triaCoords[0]-triaCoords[2*SPACEDIM], T12 = triaCoords[SPACEDIM]-triaCoords[2*SPACEDIM],
      T21 = triaCoords[1]-triaCoords[2*SPACEDIM+1], T22 = triaCoords[SPACEDIM+1]-triaCoords[2*SPACEDIM+1];
    // matrix determinant
    double Tdet = T11*T22 - T12*T21;
    if ( fabs( Tdet ) < std::numeric_limits<double>::min() ) {
      bc[0]=1; bc[1]=0; bc[2]=0;
      return;
    }
    // matrix inverse
    double t11 = T22, t12 = -T12, t21 = -T21, t22 = T11;
    // vector
    double r11 = p[0]-triaCoords[2*SPACEDIM], r12 = p[1]-triaCoords[2*SPACEDIM+1];
    // barycentric coordinates: mutiply matrix by vector
    bc[0] = (t11 * r11 + t12 * r12)/Tdet;
    bc[1] = (t21 * r11 + t22 * r12)/Tdet;
    bc[2] = 1. - bc[0] - bc[1];
  }

Here is the caller graph for this function:

void INTERP_KERNEL::barycentric_coords ( const std::vector< const double * > &  n,
const double *  p,
double *  bc 
) [inline]

Calculate barycentric coordinates of a point p with respect to triangle or tetra verices.

This method makes 2 assumptions :

  • this is a simplex
  • spacedim == meshdim. For TRI3 and TRI6 spaceDim is expected to be equal to 2 and for TETRA4 spaceDim is expected to be equal to 3. If not the case (3D surf for example) a previous projection should be done before.

Definition at line 420 of file InterpolationUtils.hxx.

  {
    enum { _X, _Y, _Z };
    switch(n.size())
      {
      case 2:
        {// SEG 2
          double delta=n[0][0]-n[1][0];
          bc[0]=fabs((*p-n[1][0])/delta);
          bc[1]=fabs((*p-n[0][0])/delta);
          break;
        }
      case 3:
        { // TRIA3
          // matrix 2x2
          double
            T11 = n[0][_X]-n[2][_X], T12 = n[1][_X]-n[2][_X],
            T21 = n[0][_Y]-n[2][_Y], T22 = n[1][_Y]-n[2][_Y];
          // matrix determinant
          double Tdet = T11*T22 - T12*T21;
          if ( std::fabs( Tdet ) < std::numeric_limits<double>::min() )
            {
              bc[0]=1; bc[1]=bc[2]=0; // no solution
              return;
            }
          // matrix inverse
          double t11 = T22, t12 = -T12, t21 = -T21, t22 = T11;
          // vector
          double r11 = p[_X]-n[2][_X], r12 = p[_Y]-n[2][_Y];
          // barycentric coordinates: mutiply matrix by vector
          bc[0] = (t11 * r11 + t12 * r12)/Tdet;
          bc[1] = (t21 * r11 + t22 * r12)/Tdet;
          bc[2] = 1. - bc[0] - bc[1];
          break;
        }
      case 4:
        { // TETRA4
          // Find bc by solving system of 3 equations using Gaussian elimination algorithm
          // bc1*( x1 - x4 ) + bc2*( x2 - x4 ) + bc3*( x3 - x4 ) = px - x4
          // bc1*( y1 - y4 ) + bc2*( y2 - y4 ) + bc3*( y3 - y4 ) = px - y4
          // bc1*( z1 - z4 ) + bc2*( z2 - z4 ) + bc3*( z3 - z4 ) = px - z4
          
          double T[3][4]=
            {{ n[0][_X]-n[3][_X], n[1][_X]-n[3][_X], n[2][_X]-n[3][_X], p[_X]-n[3][_X] },
             { n[0][_Y]-n[3][_Y], n[1][_Y]-n[3][_Y], n[2][_Y]-n[3][_Y], p[_Y]-n[3][_Y] },
             { n[0][_Z]-n[3][_Z], n[1][_Z]-n[3][_Z], n[2][_Z]-n[3][_Z], p[_Z]-n[3][_Z] }};
          
          if ( !solveSystemOfEquations<3>( T, bc ) )
            bc[0]=1., bc[1] = bc[2] = bc[3] = 0;
          else
            bc[ 3 ] = 1. - bc[0] - bc[1] - bc[2];
          break;
        }
      case 6:
        {
          // TRIA6
          double matrix2[48]={1., 0., 0., 0., 0., 0., 0., 0.,
                              1., 0., 0., 0., 0., 0., 1., 0., 
                              1., 0., 0., 0., 0., 0., 0., 1.,
                              1., 0., 0., 0., 0., 0., 0.5, 0.,
                              1., 0., 0., 0., 0., 0., 0.5, 0.5,
                              1., 0., 0., 0., 0., 0., 0.,0.5};
          for(int i=0;i<6;i++)
            {
              matrix2[8*i+1]=n[i][0];
              matrix2[8*i+2]=n[i][1];
              matrix2[8*i+3]=n[i][0]*n[i][0];
              matrix2[8*i+4]=n[i][0]*n[i][1];
              matrix2[8*i+5]=n[i][1]*n[i][1];
            }
          double res[12];
          solveSystemOfEquations2<6,2>(matrix2,res,std::numeric_limits<double>::min());
          double refCoo[2];
          refCoo[0]=computeTria6RefBase(res,p);
          refCoo[1]=computeTria6RefBase(res+6,p);
          computeWeightedCoeffsInTria6FromRefBase(refCoo,bc);
          break;
        }
      case 10:
        {//TETRA10
          double matrix2[130]={1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.5, 0., 0.,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.5, 0.5, 0.,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,0.5, 0.,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.5,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.5, 0., 0.5,
                               1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.5, 0.5};
          for(int i=0;i<10;i++)
            {
              matrix2[13*i+1]=n[i][0];
              matrix2[13*i+2]=n[i][1];
              matrix2[13*i+3]=n[i][2];
              matrix2[13*i+4]=n[i][0]*n[i][0];
              matrix2[13*i+5]=n[i][0]*n[i][1];
              matrix2[13*i+6]=n[i][0]*n[i][2];
              matrix2[13*i+7]=n[i][1]*n[i][1];
              matrix2[13*i+8]=n[i][1]*n[i][2];
              matrix2[13*i+9]=n[i][2]*n[i][2];
            }
          double res[30];
          solveSystemOfEquations2<10,3>(matrix2,res,std::numeric_limits<double>::min());
          double refCoo[3];
          refCoo[0]=computeTetra10RefBase(res,p);
          refCoo[1]=computeTetra10RefBase(res+10,p);
          refCoo[2]=computeTetra10RefBase(res+20,p);
          computeWeightedCoeffsInTetra10FromRefBase(refCoo,bc);
          break;
        }
      default:
        throw INTERP_KERNEL::Exception("INTERP_KERNEL::barycentric_coords : unrecognized simplex !");
      }
  }

Here is the call graph for this function:

std::vector<double> INTERP_KERNEL::calcul_cos_et_sin ( const double *  P_1,
const double *  P_2,
const double *  P_3 
) [inline]

Definition at line 106 of file InterpolationUtils.hxx.

  {
       
    std::vector<double> Vect;
    double P1_P2=norme_vecteur(P_1,P_2);
    double P2_P3=norme_vecteur(P_2,P_3);
    double P3_P1=norme_vecteur(P_3,P_1);
       
    double N=P1_P2*P1_P2+P3_P1*P3_P1-P2_P3*P2_P3;
    double D=2.0*P1_P2*P3_P1;
    double COS=N/D;
    if (COS>1.0) COS=1.0;
    if (COS<-1.0) COS=-1.0;
    Vect.push_back(COS);
    double V=mon_determinant(P_2,P_3,P_1);
    double D_1=P1_P2*P3_P1;
    double SIN=V/D_1;
    if (SIN>1.0) SIN=1.0;
    if (SIN<-1.0) SIN=-1.0;
    Vect.push_back(SIN);
       
    return Vect;
       
  }

Here is the call graph for this function:

Here is the caller graph for this function:

double INTERP_KERNEL::calculateAreaForPolyg ( const double **  coords,
int  nbOfPtsInPolygs,
int  spaceDim 
) [inline]

Definition at line 185 of file VolSurfFormulae.hxx.

  {
    double ret=0.;
    double coordOfBary[3];

    calculateBarycenterDyn(coords,nbOfPtsInPolygs,spaceDim,coordOfBary);
    for ( int i=0; i<nbOfPtsInPolygs; i++ )
      {
        double tmp = calculateAreaForTria(coords[i],coords[(i+1)%nbOfPtsInPolygs],
                                          coordOfBary,spaceDim);
        ret+=tmp;
      }
    return ret;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

double INTERP_KERNEL::calculateAreaForQuad ( const double *  p1,
const double *  p2,
const double *  p3,
const double *  p4,
int  spaceDim 
) [inline]

Definition at line 79 of file VolSurfFormulae.hxx.

  {
    double area ;

    if (spaceDim==2)
      {
        double a1 = (p2[0]-p1[0])/4.0, a2 = (p2[1]-p1[1])/4.0;
        double b1 = (p3[0]-p4[0])/4.0, b2 = (p3[1]-p4[1])/4.0;
        double c1 = (p3[0]-p2[0])/4.0, c2 = (p3[1]-p2[1])/4.0;
        double d1 = (p4[0]-p1[0])/4.0, d2 = (p4[1]-p1[1])/4.0;

        area = - 4.0*(  b1*c2 - c1*b2 + a1*c2 - c1*a2
                        + b1*d2 - d1*b2 + a1*d2 - d1*a2);
      }
    else
      {
        area = (sqrt(((p2[1]-p1[1])*(p4[2]-p1[2]) - (p4[1]-p1[1])*(p2[2]-p1[2]))*
                     ((p2[1]-p1[1])*(p4[2]-p1[2]) - (p4[1]-p1[1])*(p2[2]-p1[2]))
                     + ((p4[0]-p1[0])*(p2[2]-p1[2]) - (p2[0]-p1[0])*(p4[2]-p1[2]))*
                     ((p4[0]-p1[0])*(p2[2]-p1[2]) - (p2[0]-p1[0])*(p4[2]-p1[2]))
                     + ((p2[0]-p1[0])*(p4[1]-p1[1]) - (p4[0]-p1[0])*(p2[1]-p1[1]))*
                     ((p2[0]-p1[0])*(p4[1]-p1[1]) - (p4[0]-p1[0])*(p2[1]-p1[1])))
                +
                sqrt(((p4[1]-p3[1])*(p2[2]-p3[2]) - (p2[1]-p3[1])*(p4[2]-p3[2]))*
                     ((p4[1]-p3[1])*(p2[2]-p3[2]) - (p2[1]-p3[1])*(p4[2]-p3[2]))
                     + ((p2[0]-p3[0])*(p4[2]-p3[2]) - (p4[0]-p3[0])*(p2[2]-p3[2]))*
                     ((p2[0]-p3[0])*(p4[2]-p3[2]) - (p4[0]-p3[0])*(p2[2]-p3[2]))
                     + ((p4[0]-p3[0])*(p2[1]-p3[1]) - (p2[0]-p3[0])*(p4[1]-p3[1]))*
                     ((p4[0]-p3[0])*(p2[1]-p3[1]) - (p2[0]-p3[0])*(p4[1]-p3[1])))
                )/2.0;
      }

    return area ;
  }

Here is the caller graph for this function:

double INTERP_KERNEL::calculateAreaForTria ( const double *  p1,
const double *  p2,
const double *  p3,
int  spaceDim 
) [inline]

Definition at line 52 of file VolSurfFormulae.hxx.

  {
    double area ;

    if ( spaceDim == 2 )
      {
        area = -((p2[0]-p1[0])*(p3[1]-p1[1]) - (p3[0]-p1[0])*(p2[1]-p1[1]))/2.0;
      }
    else
      {
        area = sqrt(((p2[1]-p1[1])*(p3[2]-p1[2]) - (p3[1]-p1[1])*(p2[2]-p1[2]))*
                    ((p2[1]-p1[1])*(p3[2]-p1[2]) - (p3[1]-p1[1])*(p2[2]-p1[2]))
                    +
                    ((p3[0]-p1[0])*(p2[2]-p1[2]) - (p2[0]-p1[0])*(p3[2]-p1[2]))*
                    ((p3[0]-p1[0])*(p2[2]-p1[2]) - (p2[0]-p1[0])*(p3[2]-p1[2]))
                    +
                    ((p2[0]-p1[0])*(p3[1]-p1[1]) - (p3[0]-p1[0])*(p2[1]-p1[1]))*
                    ((p2[0]-p1[0])*(p3[1]-p1[1]) - (p3[0]-p1[0])*(p2[1]-p1[1])))/2.0;
      }

    return area ;
  }

Here is the caller graph for this function:

template<int N, int DIM>
void INTERP_KERNEL::calculateBarycenter ( const double **  pts,
double *  bary 
) [inline]

Definition at line 572 of file VolSurfFormulae.hxx.

  {
    bary[DIM-1]=addComponentsOfVec<N>(pts,DIM-1)/N;
    calculateBarycenter<N,DIM-1>(pts,bary);
  }
template<>
void INTERP_KERNEL::calculateBarycenter< 2, 0 > ( const double **  ,
double *   
) [inline]

Definition at line 579 of file VolSurfFormulae.hxx.

  {
  }
template<>
void INTERP_KERNEL::calculateBarycenter< 3, 0 > ( const double **  ,
double *   
) [inline]

Definition at line 584 of file VolSurfFormulae.hxx.

  {
  }
template<>
void INTERP_KERNEL::calculateBarycenter< 4, 0 > ( const double **  ,
double *   
) [inline]

Definition at line 589 of file VolSurfFormulae.hxx.

  {
  }
template<>
void INTERP_KERNEL::calculateBarycenter< 5, 0 > ( const double **  ,
double *   
) [inline]

Definition at line 594 of file VolSurfFormulae.hxx.

  {
  }
template<>
void INTERP_KERNEL::calculateBarycenter< 6, 0 > ( const double **  ,
double *   
) [inline]

Definition at line 599 of file VolSurfFormulae.hxx.

  {
  }
template<>
void INTERP_KERNEL::calculateBarycenter< 7, 0 > ( const double **  ,
double *   
) [inline]

Definition at line 604 of file VolSurfFormulae.hxx.

  {
  }
template<>
void INTERP_KERNEL::calculateBarycenter< 8, 0 > ( const double **  ,
double *   
) [inline]

Definition at line 609 of file VolSurfFormulae.hxx.

  {
  }
void INTERP_KERNEL::calculateBarycenterDyn ( const double **  pts,
int  nbPts,
int  dim,
double *  bary 
) [inline]

Definition at line 613 of file VolSurfFormulae.hxx.

  {
    for(int i=0;i<dim;i++)
      {
        double temp=0.;
        for(int j=0;j<nbPts;j++)
          {
            temp+=pts[j][i];
          }
        bary[i]=temp/nbPts;
      }
  }

Here is the caller graph for this function:

template<int SPACEDIM>
void INTERP_KERNEL::calculateBarycenterDyn2 ( const double *  pts,
int  nbPts,
double *  bary 
) [inline]

Definition at line 628 of file VolSurfFormulae.hxx.

  {
    for(int i=0;i<SPACEDIM;i++)
      {
        double temp=0.;
        for(int j=0;j<nbPts;j++)
          {
            temp+=pts[j*SPACEDIM+i];
          }
        bary[i]=temp/nbPts;
      }
  }
double INTERP_KERNEL::calculateLgthForSeg2 ( const double *  p1,
const double *  p2,
int  spaceDim 
) [inline]

Definition at line 36 of file VolSurfFormulae.hxx.

  {
    if(spaceDim==1)
      return *p2-*p1;
    else
      {
        double ret=0;
        for(int i=0;i<spaceDim;i++)
          ret+=(p2[i]-p1[i])*(p2[i]-p1[i]);
        return sqrt(ret);
      }
  }
void INTERP_KERNEL::calculateNormalForPolyg ( const double **  coords,
int  nbOfPtsInPolygs,
double *  normal 
) [inline]

Definition at line 150 of file VolSurfFormulae.hxx.

  {
    double coordOfBary[3];

    calculateBarycenterDyn(coords,nbOfPtsInPolygs,3,coordOfBary);
    double xnormal1 = (coords[0][1]-coords[1][1]) * (coordOfBary[2]-coords[1][2])
      - (coords[0][2]-coords[1][2]) * (coordOfBary[1]-coords[1][1]);

    double xnormal2 = (coords[0][2]-coords[1][2]) * (coordOfBary[0]-coords[1][0])
      - (coords[0][0]-coords[1][0]) * (coordOfBary[2]-coords[1][2]);

    double xnormal3 = (coords[0][0]-coords[1][0]) * (coordOfBary[1]-coords[1][1])
      - (coords[0][1]-coords[1][1]) * (coordOfBary[0]-coords[1][0]);

    double xarea=sqrt(xnormal1*xnormal1 + xnormal2*xnormal2 + xnormal3*xnormal3);

    if ( xarea < 1.e-6 )
      {
        //std::string diagnosis"Can not calculate normal - polygon is singular";
        throw std::exception();
      }

    xnormal1 = -xnormal1/xarea;
    xnormal2 = -xnormal2/xarea;
    xnormal3 = -xnormal3/xarea;
    xarea = calculateAreaForPolyg(coords,nbOfPtsInPolygs,3);
    normal[0] = xnormal1*xarea ;
    normal[1] = xnormal2*xarea ;
    normal[2] = xnormal3*xarea ;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void INTERP_KERNEL::calculateNormalForQuad ( const double *  p1,
const double *  p2,
const double *  p3,
const double *  p4,
double *  normal 
) [inline]

Definition at line 130 of file VolSurfFormulae.hxx.

  {
    double xnormal1 = (p2[1]-p1[1])*(p4[2]-p1[2]) - (p4[1]-p1[1])*(p2[2]-p1[2]);
    double xnormal2 = (p4[0]-p1[0])*(p2[2]-p1[2]) - (p2[0]-p1[0])*(p4[2]-p1[2]);
    double xnormal3 = (p2[0]-p1[0])*(p4[1]-p1[1]) - (p4[0]-p1[0])*(p2[1]-p1[1]);
    double xarea = sqrt(xnormal1*xnormal1 + xnormal2*xnormal2 + xnormal3*xnormal3);
    xnormal1 = xnormal1/xarea;
    xnormal2 = xnormal2/xarea;
    xnormal3 = xnormal3/xarea;
    xarea = calculateAreaForQuad(p1,p2,p3,p4,3);
    normal[0] = xnormal1*xarea ;
    normal[1] = xnormal2*xarea ;
    normal[2] = xnormal3*xarea ;
  }

Here is the call graph for this function:

void INTERP_KERNEL::calculateNormalForTria ( const double *  p1,
const double *  p2,
const double *  p3,
double *  normal 
) [inline]

Definition at line 119 of file VolSurfFormulae.hxx.

  {
    normal[0] = ((p2[1]-p1[1])*(p3[2]-p1[2]) - (p3[1]-p1[1])*(p2[2]-p1[2]))/2.0;
    normal[1] = ((p3[0]-p1[0])*(p2[2]-p1[2]) - (p2[0]-p1[0])*(p3[2]-p1[2]))/2.0;
    normal[2] = ((p2[0]-p1[0])*(p3[1]-p1[1]) - (p3[0]-p1[0])*(p2[1]-p1[1]))/2.0;
  }
double INTERP_KERNEL::calculateVolumeForHexa ( const double *  pt1,
const double *  pt2,
const double *  pt3,
const double *  pt4,
const double *  pt5,
const double *  pt6,
const double *  pt7,
const double *  pt8 
) [inline]

Definition at line 276 of file VolSurfFormulae.hxx.

  {
    double a1=(pt3[0]-pt4[0])/8.0, a2=(pt3[1]-pt4[1])/8.0, a3=(pt3[2]-pt4[2])/8.0;
    double b1=(pt2[0]-pt1[0])/8.0, b2=(pt2[1]-pt1[1])/8.0, b3=(pt2[2]-pt1[2])/8.0;
    double c1=(pt7[0]-pt8[0])/8.0, c2=(pt7[1]-pt8[1])/8.0, c3=(pt7[2]-pt8[2])/8.0;
    double d1=(pt6[0]-pt5[0])/8.0, d2=(pt6[1]-pt5[1])/8.0, d3=(pt6[2]-pt5[2])/8.0;
    double e1=(pt3[0]-pt2[0])/8.0, e2=(pt3[1]-pt2[1])/8.0, e3=(pt3[2]-pt2[2])/8.0;
    double f1=(pt4[0]-pt1[0])/8.0, f2=(pt4[1]-pt1[1])/8.0, f3=(pt4[2]-pt1[2])/8.0;
    double h1=(pt7[0]-pt6[0])/8.0, h2=(pt7[1]-pt6[1])/8.0, h3=(pt7[2]-pt6[2])/8.0;
    double p1=(pt8[0]-pt5[0])/8.0, p2=(pt8[1]-pt5[1])/8.0, p3=(pt8[2]-pt5[2])/8.0;
    double q1=(pt3[0]-pt7[0])/8.0, q2=(pt3[1]-pt7[1])/8.0, q3=(pt3[2]-pt7[2])/8.0;
    double r1=(pt4[0]-pt8[0])/8.0, r2=(pt4[1]-pt8[1])/8.0, r3=(pt4[2]-pt8[2])/8.0;
    double s1=(pt2[0]-pt6[0])/8.0, s2=(pt2[1]-pt6[1])/8.0, s3=(pt2[2]-pt6[2])/8.0;
    double t1=(pt1[0]-pt5[0])/8.0, t2=(pt1[1]-pt5[1])/8.0, t3=(pt1[2]-pt5[2])/8.0;

    double A = a1*e2*q3 - a1*e3*q2 - a2*e1*q3 + a2*e3*q1 + a3*e1*q2 - a3*e2*q1;
    double B = c1*h2*q3 - c1*h3*q2 - c2*h1*q3 + c2*h3*q1 + c3*h1*q2 - c3*h2*q1;
    double C = (a1*h2 + c1*e2)*q3 - (a1*h3 + c1*e3)*q2
      - (a2*h1 + c2*e1)*q3 + (a2*h3 + c2*e3)*q1
      + (a3*h1 + c3*e1)*q2 - (a3*h2 + c3*e2)*q1;
    double D = b1*e2*s3 - b1*e3*s2 - b2*e1*s3 + b2*e3*s1 + b3*e1*s2 - b3*e2*s1;
    double E = d1*h2*s3 - d1*h3*s2 - d2*h1*s3 + d2*h3*s1 + d3*h1*s2 - d3*h2*s1;
    double F = (b1*h2 + d1*e2)*s3 - (b1*h3 + d1*e3)*s2
      - (b2*h1 + d2*e1)*s3 + (b2*h3 + d2*e3)*s1
      + (b3*h1 + d3*e1)*s2 - (b3*h2 + d3*e2)*s1;
    double G = (a1*e2*s3 + b1*e2*q3) - (a1*e3*s2 + b1*e3*q2)
      - (a2*e1*s3 + b2*e1*q3) + (a2*e3*s1 + b2*e3*q1)
      + (a3*e1*s2 + b3*e1*q2) - (a3*e2*s1 + b3*e2*q1);
    double H = (c1*h2*s3 + d1*h2*q3) - (c1*h3*s2 + d1*h3*q2)
      - (c2*h1*s3 + d2*h1*q3) + (c2*h3*s1 + d2*h3*q1)
      + (c3*h1*s2 + d3*h1*q2) - (c3*h2*s1 + d3*h2*q1);
    double I = ((a1*h2 + c1*e2)*s3 + (b1*h2 + d1*e2)*q3)
      - ((a1*h3 + c1*e3)*s2 + (b1*h3 + d1*e3)*q2)
      - ((a2*h1 + c2*e1)*s3 + (b2*h1 + d2*e1)*q3)
      + ((a2*h3 + c2*e3)*s1 + (b2*h3 + d2*e3)*q1)
      + ((a3*h1 + c3*e1)*s2 + (b3*h1 + d3*e1)*q2)
      - ((a3*h2 + c3*e2)*s1 + (b3*h2 + d3*e2)*q1);
    double J = a1*f2*r3 - a1*f3*r2 - a2*f1*r3 + a2*f3*r1 + a3*f1*r2 - a3*f2*r1;
    double K = c1*p2*r3 - c1*p3*r2 - c2*p1*r3 + c2*p3*r1 + c3*p1*r2 - c3*p2*r1;
    double L = (a1*p2 + c1*f2)*r3 - (a1*p3 + c1*f3)*r2
      - (a2*p1 + c2*f1)*r3 + (a2*p3 + c2*f3)*r1
      + (a3*p1 + c3*f1)*r2 - (a3*p2 + c3*f2)*r1;
    double M = b1*f2*t3 - b1*f3*t2 - b2*f1*t3 + b2*f3*t1 + b3*f1*t2 - b3*f2*t1;
    double N = d1*p2*t3 - d1*p3*t2 - d2*p1*t3 + d2*p3*t1 + d3*p1*t2 - d3*p2*t1;
    double O = (b1*p2 + d1*f2)*t3 - (b1*p3 + d1*f3)*t2
      - (b2*p1 + d2*f1)*t3 + (b2*p3 + d2*f3)*t1
      + (b3*p1 + d3*f1)*t2 - (b3*p2 + d3*f2)*t1;
    double P = (a1*f2*t3 + b1*f2*r3) - (a1*f3*t2 + b1*f3*r2)
      - (a2*f1*t3 + b2*f1*r3) + (a2*f3*t1 + b2*f3*r1)
      + (a3*f1*t2 + b3*f1*r2) - (a3*f2*t1 + b3*f2*r1);
    double Q = (c1*p2*t3 + d1*p2*r3) - (c1*p3*t2 + d1*p3*r2)
      - (c2*p1*t3 + d2*p1*r3) + (c2*p3*t1 + d2*p3*r1)
      + (c3*p1*t2 + d3*p1*r2) - (c3*p2*t1 + d3*p2*r1);
    double R = ((a1*p2 + c1*f2)*t3 + (b1*p2 + d1*f2)*r3)
      - ((a1*p3 + c1*f3)*t2 + (b1*p3 + d1*f3)*r2)
      - ((a2*p1 + c2*f1)*t3 + (b2*p1 + d2*f1)*r3)
      + ((a2*p3 + c2*f3)*t1 + (b2*p3 + d2*f3)*r1)
      + ((a3*p1 + c3*f1)*t2 + (b3*p1 + d3*f1)*r2)
      - ((a3*p2 + c3*f2)*t1 + (b3*p2 + d3*f2)*r1);
    double S = (a1*e2*r3 + a1*f2*q3) - (a1*e3*r2 + a1*f3*q2)
      - (a2*e1*r3 + a2*f1*q3) + (a2*e3*r1 + a2*f3*q1)
      + (a3*e1*r2 + a3*f1*q2) - (a3*e2*r1 + a3*f2*q1);
    double T = (c1*h2*r3 + c1*p2*q3) - (c1*h3*r2 + c1*p3*q2)
      - (c2*h1*r3 + c2*p1*q3) + (c2*h3*r1 + c2*p3*q1)
      + (c3*h1*r2 + c3*p1*q2) - (c3*h2*r1 + c3*p2*q1);
    double U = ((a1*h2 + c1*e2)*r3 + (a1*p2 + c1*f2)*q3)
      - ((a1*h3 + c1*e3)*r2 + (a1*p3 + c1*f3)*q2)
      - ((a2*h1 + c2*e1)*r3 + (a2*p1 + c2*f1)*q3)
      + ((a2*h3 + c2*e3)*r1 + (a2*p3 + c2*f3)*q1)
      + ((a3*h1 + c3*e1)*r2 + (a3*p1 + c3*f1)*q2)
      - ((a3*h2 + c3*e2)*r1 + (a3*p2 + c3*f2)*q1);
    double V = (b1*e2*t3 + b1*f2*s3) - (b1*e3*t2 + b1*f3*s2)
      - (b2*e1*t3 + b2*f1*s3) + (b2*e3*t1 + b2*f3*s1)
      + (b3*e1*t2 + b3*f1*s2) - (b3*e2*t1 + b3*f2*s1);
    double W = (d1*h2*t3 + d1*p2*s3) - (d1*h3*t2 + d1*p3*s2)
      - (d2*h1*t3 + d2*p1*s3) + (d2*h3*t1 + d2*p3*s1)
      + (d3*h1*t2 + d3*p1*s2) - (d3*h2*t1 + d3*p2*s1);
    double X = ((b1*h2 + d1*e2)*t3 + (b1*p2 + d1*f2)*s3)
      - ((b1*h3 + d1*e3)*t2 + (b1*p3 + d1*f3)*s2)
      - ((b2*h1 + d2*e1)*t3 + (b2*p1 + d2*f1)*s3)
      + ((b2*h3 + d2*e3)*t1 + (b2*p3 + d2*f3)*s1)
      + ((b3*h1 + d3*e1)*t2 + (b3*p1 + d3*f1)*s2)
      - ((b3*h2 + d3*e2)*t1 + (b3*p2 + d3*f2)*s1);
    double Y = (a1*e2*t3 + a1*f2*s3 + b1*e2*r3 + b1*f2*q3)
      - (a1*e3*t2 + a1*f3*s2 + b1*e3*r2 + b1*f3*q2)
      - (a2*e1*t3 + a2*f1*s3 + b2*e1*r3 + b2*f1*q3)
      + (a2*e3*t1 + a2*f3*s1 + b2*e3*r1 + b2*f3*q1)
      + (a3*e1*t2 + a3*f1*s2 + b3*e1*r2 + b3*f1*q2)
      - (a3*e2*t1 + a3*f2*s1 + b3*e2*r1 + b3*f2*q1);
    double Z = (c1*h2*t3 + c1*p2*s3 + d1*h2*r3 + d1*p2*q3)
      - (c1*h3*t2 + c1*p3*s2 + d1*h3*r2 + d1*p3*q2)
      - (c2*h1*t3 + c2*p1*s3 + d2*h1*r3 + d2*p1*q3)
      + (c2*h3*t1 + c2*p3*s1 + d2*h3*r1 + d2*p3*q1)
      + (c3*h1*t2 + c3*p1*s2 + d3*h1*r2 + d3*p1*q2)
      - (c3*h2*t1 + c3*p2*s1 + d3*h2*r1 + d3*p2*q1);
    double AA = ((a1*h2 + c1*e2)*t3 + (a1*p2 + c1*f2)*s3
                 +(b1*h2 + d1*e2)*r3 + (b1*p2 + d1*f2)*q3)
      - ((a1*h3 + c1*e3)*t2 + (a1*p3 + c1*f3)*s2
         +(b1*h3 + d1*e3)*r2 + (b1*p3 + d1*f3)*q2)
      - ((a2*h1 + c2*e1)*t3 + (a2*p1 + c2*f1)*s3
         +(b2*h1 + d2*e1)*r3 + (b2*p1 + d2*f1)*q3)
      + ((a2*h3 + c2*e3)*t1 + (a2*p3 + c2*f3)*s1
         +(b2*h3 + d2*e3)*r1 + (b2*p3 + d2*f3)*q1)
      + ((a3*h1 + c3*e1)*t2 + (a3*p1 + c3*f1)*s2
         +(b3*h1 + d3*e1)*r2 + (b3*p1 + d3*f1)*q2)
      - ((a3*h2 + c3*e2)*t1 + (a3*p2 + c3*f2)*s1
         + (b3*h2 + d3*e2)*r1 + (b3*p2 + d3*f2)*q1);

    return  64.0*(  8.0*(A + B + D + E + J + K + M + N)
                    + 4.0*(C + F + G + H + L + O + P + Q + S + T + V + W)
                    + 2.0*(I + R + U + X + Y + Z) + AA ) / 27.0 ;
  }
double INTERP_KERNEL::calculateVolumeForPenta ( const double *  p1,
const double *  p2,
const double *  p3,
const double *  p4,
const double *  p5,
const double *  p6 
) [inline]

Definition at line 242 of file VolSurfFormulae.hxx.

  {
    double a1 = (p2[0]-p3[0])/2.0, a2 = (p2[1]-p3[1])/2.0, a3 = (p2[2]-p3[2])/2.0;
    double b1 = (p5[0]-p6[0])/2.0, b2 = (p5[1]-p6[1])/2.0, b3 = (p5[2]-p6[2])/2.0;
    double c1 = (p4[0]-p1[0])/2.0, c2 = (p4[1]-p1[1])/2.0, c3 = (p4[2]-p1[2])/2.0;
    double d1 = (p5[0]-p2[0])/2.0, d2 = (p5[1]-p2[1])/2.0, d3 = (p5[2]-p2[2])/2.0;
    double e1 = (p6[0]-p3[0])/2.0, e2 = (p6[1]-p3[1])/2.0, e3 = (p6[2]-p3[2])/2.0;
    double f1 = (p1[0]-p3[0])/2.0, f2 = (p1[1]-p3[1])/2.0, f3 = (p1[2]-p3[2])/2.0;
    double h1 = (p4[0]-p6[0])/2.0, h2 = (p4[1]-p6[1])/2.0, h3 = (p4[2]-p6[2])/2.0;

    double A = a1*c2*f3 - a1*c3*f2 - a2*c1*f3 + a2*c3*f1 + a3*c1*f2 - a3*c2*f1;
    double B = b1*c2*h3 - b1*c3*h2 - b2*c1*h3 + b2*c3*h1 + b3*c1*h2 - b3*c2*h1;
    double C = (a1*c2*h3 + b1*c2*f3) - (a1*c3*h2 + b1*c3*f2)
      - (a2*c1*h3 + b2*c1*f3) + (a2*c3*h1 + b2*c3*f1)
      + (a3*c1*h2 + b3*c1*f2) - (a3*c2*h1 + b3*c2*f1);
    double D = a1*d2*f3 - a1*d3*f2 - a2*d1*f3 + a2*d3*f1 + a3*d1*f2 - a3*d2*f1;
    double E = b1*d2*h3 - b1*d3*h2 - b2*d1*h3 + b2*d3*h1 + b3*d1*h2 - b3*d2*h1;
    double F = (a1*d2*h3 + b1*d2*f3) - (a1*d3*h2 + b1*d3*f2)
      - (a2*d1*h3 + b2*d1*f3) + (a2*d3*h1 + b2*d3*f1)
      + (a3*d1*h2 + b3*d1*f2) - (a3*d2*h1 + b3*d2*f1);
    double G = a1*e2*f3 - a1*e3*f2 - a2*e1*f3 + a2*e3*f1 + a3*e1*f2 - a3*e2*f1;
    double H = b1*e2*h3 - b1*e3*h2 - b2*e1*h3 + b2*e3*h1 + b3*e1*h2 - b3*e2*h1;
    double P = (a1*e2*h3 + b1*e2*f3) - (a1*e3*h2 + b1*e3*f2)
      - (a2*e1*h3 + b2*e1*f3) + (a2*e3*h1 + b2*e3*f1)
      + (a3*e1*h2 + b3*e1*f2) - (a3*e2*h1 + b3*e2*f1);

    return (-2.0*(2.0*(A + B + D + E + G + H) + C + F + P)/9.0);
  }
double INTERP_KERNEL::calculateVolumeForPolyh ( const double ***  pts,
const int *  nbOfNodesPerFaces,
int  nbOfFaces,
const double *  bary 
) [inline]

Definition at line 395 of file VolSurfFormulae.hxx.

  {
    double volume=0.;

    for ( int i=0; i<nbOfFaces; i++ )
      {
        double normal[3];
        double vecForAlt[3];

        calculateNormalForPolyg(pts[i],nbOfNodesPerFaces[i],normal);
        vecForAlt[0]=bary[0]-pts[i][0][0];
        vecForAlt[1]=bary[1]-pts[i][0][1];
        vecForAlt[2]=bary[2]-pts[i][0][2];
        volume+=vecForAlt[0]*normal[0]+vecForAlt[1]*normal[1]+vecForAlt[2]*normal[2];
      }
    return -volume/3.;
  }

Here is the call graph for this function:

template<class ConnType , NumberingPolicy numPol>
double INTERP_KERNEL::calculateVolumeForPolyh2 ( const ConnType *  connec,
int  lgth,
const double *  coords 
) [inline]

Calculate Volume for Generic Polyedron, even not convex one, WARNING !!! The polyedron's faces must be correctly ordered.

2nd API avoiding to create double** arrays. The returned value could be negative if polyhedrons faces are not oriented with normal outside of the polyhedron

Definition at line 422 of file VolSurfFormulae.hxx.

  {
    std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1;
    double volume=0.;
    const int *work=connec;
    for(std::size_t iFace=0;iFace<nbOfFaces;iFace++)
      {
        const int *work2=std::find(work+1,connec+lgth,-1);
        std::size_t nbOfNodesOfCurFace=std::distance(work,work2);
        double areaVector[3]={0.,0.,0.};
        for(std::size_t ptId=0;ptId<nbOfNodesOfCurFace;ptId++)
          {
            const double *pti=coords+3*OTT<ConnType,numPol>::coo2C(work[ptId]);
            const double *pti1=coords+3*OTT<ConnType,numPol>::coo2C(work[(ptId+1)%nbOfNodesOfCurFace]);
            areaVector[0]+=pti[1]*pti1[2]-pti[2]*pti1[1];
            areaVector[1]+=pti[2]*pti1[0]-pti[0]*pti1[2];
            areaVector[2]+=pti[0]*pti1[1]-pti[1]*pti1[0];
          }
        const double *pt=coords+3*work[0];
        volume+=pt[0]*areaVector[0]+pt[1]*areaVector[1]+pt[2]*areaVector[2];
        work=work2+1;
      }
    return volume/6.;
  }
double INTERP_KERNEL::calculateVolumeForPolyhAbs ( const double ***  pts,
const int *  nbOfNodesPerFaces,
int  nbOfFaces,
const double *  bary 
) [inline]

Definition at line 538 of file VolSurfFormulae.hxx.

  {
    double volume=0.;
    
    for ( int i=0; i<nbOfFaces; i++ )
      {
        double normal[3];
        double vecForAlt[3];

        calculateNormalForPolyg(pts[i],nbOfNodesPerFaces[i],normal);
        vecForAlt[0]=bary[0]-pts[i][0][0];
        vecForAlt[1]=bary[1]-pts[i][0][1];
        vecForAlt[2]=bary[2]-pts[i][0][2];
        volume+=fabs(vecForAlt[0]*normal[0]+vecForAlt[1]*normal[1]+vecForAlt[2]*normal[2]);
      }
    return volume/3.;
  }

Here is the call graph for this function:

double INTERP_KERNEL::calculateVolumeForPyra ( const double *  p1,
const double *  p2,
const double *  p3,
const double *  p4,
const double *  p5 
) [inline]

Definition at line 219 of file VolSurfFormulae.hxx.

  {
    return ( ((p3[0]-p1[0])*(  (p2[1]-p1[1])*(p5[2]-p1[2])
                               - (p2[2]-p1[2])*(p5[1]-p1[1]) )
              -(p2[0]-p1[0])*(  (p3[1]-p1[1])*(p5[2]-p1[2])
                                - (p3[2]-p1[2])*(p5[1]-p1[1]) )
              +(p5[0]-p1[0])*(  (p3[1]-p1[1])*(p2[2]-p1[2])
                                - (p3[2]-p1[2])*(p2[1]-p1[1]) ))
             +
             ((p4[0]-p1[0])*(  (p3[1]-p1[1])*(p5[2]-p1[2])
                               - (p3[2]-p1[2])*(p5[1]-p1[1]) )
              -(p3[0]-p1[0])*(  (p4[1]-p1[1])*(p5[2]-p1[2])
                                - (p4[2]-p1[2])*(p5[1]-p1[1]))
              +(p5[0]-p1[0])*(  (p4[1]-p1[1])*(p3[2]-p1[2])
                                - (p4[2]-p1[2])*(p3[1]-p1[1]) ))
             ) / 6.0 ;
  }
double INTERP_KERNEL::calculateVolumeForTetra ( const double *  p1,
const double *  p2,
const double *  p3,
const double *  p4 
) [inline]

Definition at line 204 of file VolSurfFormulae.hxx.

  {
    return (  (p3[0]-p1[0])*(  (p2[1]-p1[1])*(p4[2]-p1[2])
                               - (p2[2]-p1[2])*(p4[1]-p1[1]) )
              - (p2[0]-p1[0])*(  (p3[1]-p1[1])*(p4[2]-p1[2])
                                 - (p3[2]-p1[2])*(p4[1]-p1[1]) )
              + (p4[0]-p1[0])*(  (p3[1]-p1[1])*(p2[2]-p1[2])
                                 - (p3[2]-p1[2])*(p2[1]-p1[1]) )
              ) / 6.0 ;
  }

Here is the caller graph for this function:

template<int dim>
double INTERP_KERNEL::check_inside ( const double *  A,
const double *  B,
const double *  C,
const double *  D,
const double *  E,
double *  ABC,
double *  ADE 
) [inline]

Definition at line 904 of file InterpolationUtils.hxx.

  {
    crossprod<dim>(A,B,C,ABC);
    crossprod<dim>(A,D,E,ADE);
    return dotprod<dim>(ABC,ADE);
  }   
template<class T , int dim>
bool INTERP_KERNEL::checkEqualPolygons ( T *  L1,
T *  L2,
double  epsilon 
)

Tests if two list of nodes (not necessarily distincts) describe the same polygon.

Existence of multiple points in the list is considered.

Definition at line 1081 of file InterpolationUtils.hxx.

  {
    if(L1==NULL || L2==NULL) 
      {
        std::cout << "Warning InterpolationUtils.hxx:checkEqualPolygonsPointer: Null pointer " << std::endl;
        throw(Exception("big error: not closed polygon..."));
      }
    
    int size1 = (*L1).size()/dim;
    int size2 = (*L2).size()/dim;
    int istart1 = 0;
    int istart2 = 0;
    
    while( istart2 < size2  && distance2<T,dim>(L1,istart1*dim, L2,istart2*dim) > epsilon ) istart2++;
  
    if(istart2 == size2)
      {  
        return (size1 == 0) && (size2 == 0);
      }
    else 
      return   checkEqualPolygonsOneDirection<T,dim>( L1, L2, size1, size2, istart1, istart2, epsilon,  1)
        || checkEqualPolygonsOneDirection<T,dim>( L1, L2, size1, size2, istart1, istart2, epsilon, -1);

  }
template<class T , int dim>
bool INTERP_KERNEL::checkEqualPolygonsOneDirection ( T *  L1,
T *  L2,
int  size1,
int  size2,
int  istart1,
int  istart2,
double  epsilon,
int  sign 
)

Subroutine of checkEqualPolygins that tests if two list of nodes (not necessarily distincts) describe the same polygon, assuming they share a comon point.

Indexes istart1 and istart2 designate two points P1 in L1 and P2 in L2 that have identical coordinates. Generally called with istart1=0.

Integer sign ( 1 or -1) indicate the direction used in going all over L2.

Definition at line 1042 of file InterpolationUtils.hxx.

  {
    int i1 = istart1;
    int i2 = istart2;
    int i1next = ( i1 + 1 ) % size1;
    int i2next = ( i2 + sign +size2) % size2;
    
    while(true)
      {
        while( i1next!=istart1 && distance2<T,dim>(L1,i1*dim, L1,i1next*dim) < epsilon ) i1next = (  i1next + 1 ) % size1;  
        while( i2next!=istart2 && distance2<T,dim>(L2,i2*dim, L2,i2next*dim) < epsilon ) i2next = (  i2next + sign +size2 ) % size2;  
        
        if(i1next == istart1)
          {
            if(i2next == istart2)
              return true;
            else return false;
          }
        else
          if(i2next == istart2)
            return false;
          else 
            {
              if(distance2<T,dim>(L1,i1next*dim, L2,i2next*dim) > epsilon )
                return false;
              else
                {
                  i1 = i1next;
                  i2 = i2next;
                  i1next = ( i1 + 1 ) % size1;
                  i2next = ( i2 + sign + size2 ) % size2;
                }
            }
      }
  }
template<class ConnType , NumberingPolicy numPolConn, int SPACEDIM>
void INTERP_KERNEL::computeBarycenter ( NormalizedCellType  type,
const ConnType *  connec,
int  lgth,
const double *  coords,
double *  res 
)
template<class ConnType , NumberingPolicy numPolConn>
void INTERP_KERNEL::computeBarycenter2 ( NormalizedCellType  type,
const ConnType *  connec,
int  lgth,
const double *  coords,
int  spaceDim,
double *  res 
)
void INTERP_KERNEL::computeEigenValues6 ( const double *  matrix,
double *  eigenVals 
)

This method computes eigenvalues of a 3x3 symetric matrix stored with 6 values in 'matrix'.

The convension chosen for 'matrix' is described here: matrix[0]=m_xx, matrix[1]=m_yy, matrix[2]=m_zz, matrix[3]=m_xy, matrix[4]=m_yz, matrix[5]=m_xz This method returns the 3 eigenvalues in 'eigenVals'.

Definition at line 35 of file GenMathFormulae.hxx.

  {
    double tr=(matrix[0]+matrix[1]+matrix[2])/3.;
    double K[6]={matrix[0]-tr,matrix[1]-tr,matrix[2]-tr,matrix[3],matrix[4],matrix[5]};
    double q=(K[0]*K[1]*K[2]+2.*K[4]*K[5]*K[3]-K[0]*K[4]*K[4]-K[2]*K[3]*K[3]-K[1]*K[5]*K[5])/2.;
    double p=K[0]*K[0]+K[1]*K[1]+K[2]*K[2]+2*(K[3]*K[3]+K[4]*K[4]+K[5]*K[5]);
    p/=6.;
    double sqp=sqrt(p);
    double tmp=p*sqp;
    double phi;
    if(fabs(q)<=fabs(tmp))
      phi=1./3.*acos(q/tmp);
    else
      phi=0.;
    if(phi<0.)
      phi+=M_PI/3.;
    eigenVals[0]=tr+2.*sqp*cos(phi);
    eigenVals[1]=tr-sqp*(cos(phi)+sqrt(3.)*sin(phi));
    eigenVals[2]=tr-sqp*(cos(phi)-sqrt(3.)*sin(phi));
  }

Here is the caller graph for this function:

void INTERP_KERNEL::computeEigenVectorForEigenValue6 ( const double *  matrix,
double  eigenVal,
double  eps,
double *  eigenVector 
) throw (INTERP_KERNEL::Exception)

This method computes one eigenvector of a 3x3 symetric matrix stored with 6 values in 'matrix'.

The convension chosen for 'matrix' is described here: matrix[0]=m_xx, matrix[1]=m_yy, matrix[2]=m_zz, matrix[3]=m_xy, matrix[4]=m_yz, matrix[5]=m_xz This method returns the eigenvector of the corresponding eigenvalue in 'eigenVal'. The returned eigenValue is normalized.

Definition at line 62 of file GenMathFormulae.hxx.

  {
    //if(fabs(eigenVal)>eps)
      {
        const double m9[9]={matrix[0]-eigenVal,matrix[3],matrix[5],matrix[3],matrix[1]-eigenVal,matrix[4],matrix[5],matrix[4],matrix[2]-eigenVal};
        for(int i=0;i<3;i++)
          {
            double w[9]={m9[0+3*i],m9[1+3*i],m9[2+3*i],m9[0+(3*(i+1))%6],m9[1+(3*(i+1))%6],m9[2+(3*(i+1))%6],1.,1.,1.};
            double det=w[0]*w[4]*w[8]+w[1]*w[5]*w[6]+w[2]*w[3]*w[7]-w[0]*w[5]*w[7]-w[1]*w[3]*w[8]-w[2]*w[4]*w[6];
            if(fabs(det)>eps)
              {
                eigenVector[0]=(w[1]*w[5]-w[4]*w[2])/det;
                eigenVector[1]=(w[2]*w[3]-w[0]*w[5])/det;
                eigenVector[2]=(w[0]*w[4]-w[1]*w[3])/det;
                double norm=sqrt(eigenVector[0]*eigenVector[0]+eigenVector[1]*eigenVector[1]+eigenVector[2]*eigenVector[2]);
                eigenVector[0]/=norm;
                eigenVector[1]/=norm;
                eigenVector[2]/=norm;
                return;
              }
          }
      }
      //else
      {
        eigenVector[0]=0.;
        eigenVector[1]=0.;
        eigenVector[2]=0.;
        return;
      }
      //throw INTERP_KERNEL::Exception("computeEigenVector : Do not succed in finding eigen vector !");
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class ConnType , NumberingPolicy numPol>
void INTERP_KERNEL::computePolygonBarycenter2D ( const ConnType *  connec,
int  lgth,
const double *  coords,
double *  res 
) [inline]

Definition at line 642 of file VolSurfFormulae.hxx.

  {
    double area=0.;
    res[0]=0.; res[1]=0.;
    for(int i=0;i<lgth;i++)
      {
        double cp=coords[2*OTT<ConnType,numPol>::coo2C(connec[i])]*coords[2*OTT<ConnType,numPol>::coo2C(connec[(i+1)%lgth])+1]-
          coords[2*OTT<ConnType,numPol>::coo2C(connec[i])+1]*coords[2*OTT<ConnType,numPol>::coo2C(connec[(i+1)%lgth])];
        area+=cp;
        res[0]+=cp*(coords[2*OTT<ConnType,numPol>::coo2C(connec[i])]+coords[2*OTT<ConnType,numPol>::coo2C(connec[(i+1)%lgth])]);
        res[1]+=cp*(coords[2*OTT<ConnType,numPol>::coo2C(connec[i])+1]+coords[2*OTT<ConnType,numPol>::coo2C(connec[(i+1)%lgth])+1]);
      }
    res[0]/=3.*area;
    res[1]/=3.*area;
  }
template<class ConnType , NumberingPolicy numPol>
void INTERP_KERNEL::computePolygonBarycenter3D ( const ConnType *  connec,
int  lgth,
const double *  coords,
double *  res 
) [inline]

Definition at line 659 of file VolSurfFormulae.hxx.

  {
    double area[3];
    areaVectorOfPolygon<ConnType,numPol>(connec,lgth,coords,area);
    double norm=sqrt(area[0]*area[0]+area[1]*area[1]+area[2]*area[2]);
    area[0]/=norm; area[1]/=norm; area[2]/=norm;
    res[0]=0.; res[1]=0.; res[2]=0.;
    for(int i=1;i<lgth-1;i++)
      {
        double v[3];
        double tmpArea[3];
        v[0]=(coords[3*OTT<ConnType,numPol>::coo2C(connec[0])]+
              coords[3*OTT<ConnType,numPol>::coo2C(connec[i])]+
              coords[3*OTT<ConnType,numPol>::coo2C(connec[i+1])])/3.;
        v[1]=(coords[3*OTT<ConnType,numPol>::coo2C(connec[0])+1]+
              coords[3*OTT<ConnType,numPol>::coo2C(connec[i])+1]+
              coords[3*OTT<ConnType,numPol>::coo2C(connec[i+1])+1])/3.;
        v[2]=(coords[3*OTT<ConnType,numPol>::coo2C(connec[0])+2]+
              coords[3*OTT<ConnType,numPol>::coo2C(connec[i])+2]+
              coords[3*OTT<ConnType,numPol>::coo2C(connec[i+1])+2])/3.;
        ConnType tmpConn[3]={connec[0],connec[i],connec[i+1]};
        areaVectorOfPolygon<ConnType,numPol>(tmpConn,3,coords,tmpArea);
        double norm2=sqrt(tmpArea[0]*tmpArea[0]+tmpArea[1]*tmpArea[1]+tmpArea[2]*tmpArea[2]);
        if(norm2>1e-12)
          {
            tmpArea[0]/=norm2; tmpArea[1]/=norm2; tmpArea[2]/=norm2;
            double signOfArea=area[0]*tmpArea[0]+area[1]*tmpArea[1]+area[2]*tmpArea[2];
            res[0]+=signOfArea*norm2*v[0]/norm; res[1]+=signOfArea*norm2*v[1]/norm; res[2]+=signOfArea*norm2*v[2]/norm;
          }
      }   
  }

Here is the call graph for this function:

double INTERP_KERNEL::computeTetra10RefBase ( const double *  coeffs,
const double *  pos 
) [inline]

Given 10 coeffs of a Tetra10 returns the corresponding value of a given pos.

Definition at line 234 of file InterpolationUtils.hxx.

  {
    return coeffs[0]+coeffs[1]*pos[0]+coeffs[2]*pos[1]+coeffs[3]*pos[2]+
      coeffs[4]*pos[0]*pos[0]+coeffs[5]*pos[0]*pos[1]+coeffs[6]*pos[0]*pos[2]+
      coeffs[7]*pos[1]*pos[1]+coeffs[8]*pos[1]*pos[2]+coeffs[9]*pos[2]*pos[2];
  }

Here is the caller graph for this function:

double INTERP_KERNEL::computeTria6RefBase ( const double *  coeffs,
const double *  pos 
) [inline]

Given 6 coeffs of a Tria6 returns the corresponding value of a given pos.

Definition at line 213 of file InterpolationUtils.hxx.

  {
    return coeffs[0]+coeffs[1]*pos[0]+coeffs[2]*pos[1]+coeffs[3]*pos[0]*pos[0]+coeffs[4]*pos[0]*pos[1]+coeffs[5]*pos[1]*pos[1];
  }

Here is the caller graph for this function:

template<class ConnType , NumberingPolicy numPolConn, int SPACEDIM>
double INTERP_KERNEL::computeVolSurfOfCell ( NormalizedCellType  type,
const ConnType *  connec,
int  lgth,
const double *  coords 
)
template<class ConnType , NumberingPolicy numPolConn>
double INTERP_KERNEL::computeVolSurfOfCell2 ( NormalizedCellType  type,
const ConnType *  connec,
int  lgth,
const double *  coords,
int  spaceDim 
)
void INTERP_KERNEL::computeWeightedCoeffsInTetra10FromRefBase ( const double *  refCoo,
double *  weightedPos 
) [inline]

Given xsi,eta,z in refCoo (length==3) return 10 coeffs in weightedPos.

Definition at line 244 of file InterpolationUtils.hxx.

  {
    //http://www.cadfamily.com/download/CAE/ABAQUS/The%20Finite%20Element%20Method%20-%20A%20practical%20course%20abaqus.pdf page 217
    //L1=1-refCoo[0]-refCoo[1]-refCoo[2]
    //L2=refCoo[0] L3=refCoo[1] L4=refCoo[2]
    weightedPos[0]=(-2.*(refCoo[0]+refCoo[1]+refCoo[2])+1)*(1-refCoo[0]-refCoo[1]-refCoo[2]);//(2*L1-1)*L1
    weightedPos[1]=(2.*refCoo[0]-1.)*refCoo[0];//(2*L2-1)*L2
    weightedPos[2]=(2.*refCoo[1]-1.)*refCoo[1];//(2*L3-1)*L3
    weightedPos[3]=(2.*refCoo[2]-1.)*refCoo[2];//(2*L4-1)*L4
    weightedPos[4]=4.*(1-refCoo[0]-refCoo[1]-refCoo[2])*refCoo[0];//4*L1*L2
    weightedPos[5]=4.*refCoo[0]*refCoo[1];//4*L2*L3
    weightedPos[6]=4.*(1-refCoo[0]-refCoo[1]-refCoo[2])*refCoo[1];//4*L1*L3
    weightedPos[7]=4.*(1-refCoo[0]-refCoo[1]-refCoo[2])*refCoo[2];//4*L1*L4
    weightedPos[8]=4.*refCoo[0]*refCoo[2];//4*L2*L4
    weightedPos[9]=4.*refCoo[1]*refCoo[2];//4*L3*L4
  }

Here is the caller graph for this function:

void INTERP_KERNEL::computeWeightedCoeffsInTria6FromRefBase ( const double *  refCoo,
double *  weightedPos 
) [inline]

Given xsi,eta in refCoo (length==2) return 6 coeffs in weightedPos.

Definition at line 221 of file InterpolationUtils.hxx.

  {
    weightedPos[0]=(1.-refCoo[0]-refCoo[1])*(1.-2*refCoo[0]-2.*refCoo[1]);
    weightedPos[1]=refCoo[0]*(2.*refCoo[0]-1.);
    weightedPos[2]=refCoo[1]*(2.*refCoo[1]-1.);
    weightedPos[3]=4.*refCoo[0]*(1.-refCoo[0]-refCoo[1]);
    weightedPos[4]=4.*refCoo[0]*refCoo[1];
    weightedPos[5]=4.*refCoo[1]*(1.-refCoo[0]-refCoo[1]);
  }

Here is the caller graph for this function:

void INTERP_KERNEL::copyVector3 ( const double *  src,
double *  dest 
) [inline]

Copies a double[3] vector from src to dest.

Parameters:
srcsource vector
destdestination vector

Definition at line 64 of file VectorUtils.hxx.

  {
    for(int i = 0 ; i < 3 ; ++i)
      dest[i] = src[i];
  }

Here is the caller graph for this function:

void INTERP_KERNEL::cross ( const double *  v1,
const double *  v2,
double *  res 
) [inline]

Calculates the cross product of two double[3] - vectors.

Parameters:
v1vector v1
v2vector v2
resvector in which to store the result v1 x v2. It should not be one of v1 and v2.

Definition at line 103 of file VectorUtils.hxx.

  {
    res[0] = v1[1]*v2[2] - v1[2]*v2[1];
    res[1] = v1[2]*v2[0] - v1[0]*v2[2];
    res[2] = v1[0]*v2[1] - v1[1]*v2[0];
  }
template<int dim>
void INTERP_KERNEL::crossprod ( const double *  A,
const double *  B,
const double *  C,
double *  V 
) [inline]
template<>
void INTERP_KERNEL::crossprod< 1 > ( const double *  ,
const double *  ,
const double *  ,
double *   
) [inline]

Definition at line 895 of file InterpolationUtils.hxx.

  {
    // just to be able to compile
  }
template<>
void INTERP_KERNEL::crossprod< 2 > ( const double *  A,
const double *  B,
const double *  C,
double *  V 
) [inline]

Definition at line 872 of file InterpolationUtils.hxx.

  {   
    double AB[2];
    double AC[2];
    for(int idim =0; idim<2; idim++) AB[idim] = B[idim]-A[idim];//B-A
    for(int idim =0; idim<2; idim++) AC[idim] = C[idim]-A[idim];//C-A;

    V[0]=determinant(AB,AC);
    V[1]=0;
  }

Here is the call graph for this function:

template<>
void INTERP_KERNEL::crossprod< 3 > ( const double *  A,
const double *  B,
const double *  C,
double *  V 
) [inline]

Definition at line 883 of file InterpolationUtils.hxx.

  {   
    double AB[3];
    double AC[3];
    for(int idim =0; idim<3; idim++) AB[idim] = B[idim]-A[idim];//B-A
    for(int idim =0; idim<3; idim++) AC[idim] = C[idim]-A[idim];//C-A;

    V[0]=AB[1]*AC[2]-AB[2]*AC[1];
    V[1]=-AB[0]*AC[2]+AB[2]*AC[0];
    V[2]=AB[0]*AC[1]-AB[1]*AC[0];    
  }

Here is the caller graph for this function:

double INTERP_KERNEL::determinant ( double *  a,
double *  b 
) [inline]

Definition at line 856 of file InterpolationUtils.hxx.

  {
    return a[0]*b[1]-a[1]*b[0];
  }

Here is the caller graph for this function:

double INTERP_KERNEL::determinant ( double *  a,
double *  b,
double *  c 
) [inline]

Definition at line 860 of file InterpolationUtils.hxx.

  {
    return a[0]*determinant(b+1,c+1)-b[0]*determinant(a+1,c+1)+c[0]*determinant(a+1,b+1);
  }

Here is the call graph for this function:

template<int dim>
double INTERP_KERNEL::direct_frame ( const double *  A,
const double *  B,
const double *  C,
double *  n 
) [inline]
template<>
double INTERP_KERNEL::direct_frame< 2 > ( const double *  A,
const double *  B,
const double *  C,
double *  n 
) [inline]

Definition at line 943 of file InterpolationUtils.hxx.

  {
    double AB[2];
    double AC[2];
    for(int idim =0; idim<2; idim++) AB[idim] = B[idim]-A[idim];//B-A;
    for(int idim =0; idim<2; idim++) AC[idim] = C[idim]-A[idim];//C-A;
    
    return  determinant(AB,AC)*n[0];
  }

Here is the call graph for this function:

template<>
double INTERP_KERNEL::direct_frame< 3 > ( const double *  A,
const double *  B,
const double *  C,
double *  n 
) [inline]

Definition at line 953 of file InterpolationUtils.hxx.

  {
    double AB[3];
    double AC[3];
    for(int idim =0; idim<3; idim++) AB[idim] = B[idim]-A[idim];//B-A;
    for(int idim =0; idim<3; idim++) AC[idim] = C[idim]-A[idim];//C-A;
    
    return determinant(AB,AC,n)>0;
  }

Here is the call graph for this function:

template<int dim>
double INTERP_KERNEL::distance2 ( const double *  a,
const double *  b 
) [inline]

Definition at line 840 of file InterpolationUtils.hxx.

  {   
    double result =0;
    for(int idim =0; idim<dim; idim++) result+=(a[idim]-b[idim])*(a[idim]-b[idim]);
    return result;
  }
template<class T , int dim>
double INTERP_KERNEL::distance2 ( T *  a,
int  inda,
T *  b,
int  indb 
) [inline]

Definition at line 847 of file InterpolationUtils.hxx.

  {   
    double result =0;
    for(int idim =0; idim<dim; idim++) result += ((*a)[inda+idim] - (*b)[indb+idim])* ((*a)[inda+idim] - (*b)[indb+idim]);
    return result;
  }
double INTERP_KERNEL::dot ( const double *  v1,
const double *  v2 
) [inline]

Calculates the dot product of two double[3] - vectors.

Parameters:
v1vector v1
v2vector v2
Returns:
dot (scalar) product v1.v2

Definition at line 117 of file VectorUtils.hxx.

  {
    return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
  }

Here is the caller graph for this function:

template<int dim>
double INTERP_KERNEL::dotprod ( const double *  a,
const double *  b 
) [inline]

Definition at line 820 of file InterpolationUtils.hxx.

  {
    double result=0;
    for(int idim = 0; idim < dim ; idim++) result += a[idim]*b[idim];
    return result;
  }
bool INTERP_KERNEL::epsilonEqual ( const double  x,
const double  y,
const double  errTol = DEFAULT_ABS_TOL 
) [inline]

Compares doubles using an absolute tolerance This is suitable mainly for comparisons with 0.0.

Parameters:
xfirst value
ysecond value
errTolmaximum allowed absolute difference that is to be treated as equality
Returns:
true if |x - y| < errTol, false otherwise

Definition at line 142 of file VectorUtils.hxx.

  {
    return y < x ? x - y < errTol : y - x < errTol;
    //    return std::fabs(x - y) < errTol;
  }

Here is the caller graph for this function:

bool INTERP_KERNEL::epsilonEqualRelative ( const double  x,
const double  y,
const double  relTol = DEFAULT_REL_TOL,
const double  absTol = DEFAULT_ABS_TOL 
) [inline]

Compares doubles using a relative tolerance This is suitable mainly for comparing larger values to each other.

Before performing the relative test, an absolute test is performed to guard from problems when comparing to 0.0

Parameters:
xfirst value
ysecond value
relTolmaximum allowed relative difference that is to be treated as equality
absTolmaximum allowed absolute difference that is to be treated as equality
Returns:
true if |x - y| <= absTol or |x - y|/max(|x|,|y|) <= relTol, false otherwise

Definition at line 159 of file VectorUtils.hxx.

  {
    // necessary for comparing values close to zero
    // in order to avoid division by very small numbers
    if(std::fabs(x - y) < absTol)
      {
        return true;
      }

    const double relError = std::fabs((x - y) / std::max(std::fabs(x), std::fabs(y)));

    return relError < relTol;
  }
template<int SPACEDIM>
void INTERP_KERNEL::fillDualCellOfPolyg ( const double *  polygIn,
int  nPtsPolygonIn,
double *  polygOut 
) [inline]

This method builds a potentially non-convex polygon cell built with the first point of 'triIn' the barycenter of two edges starting or ending with the first point of 'triIn' and the barycenter of 'triIn'.

Parameters:
triInis a 6 doubles array in full interlace mode, that represents a triangle.
quadOutis a 8 doubles array filled after the following call.

Definition at line 165 of file InterpolationUtils.hxx.

  {
    //1st point
    std::copy(polygIn,polygIn+SPACEDIM,polygOut);
    std::transform(polygIn,polygIn+SPACEDIM,polygIn+SPACEDIM,polygOut+SPACEDIM,std::plus<double>());
    //2nd point
    std::transform(polygOut+SPACEDIM,polygOut+2*SPACEDIM,polygOut+SPACEDIM,std::bind2nd(std::multiplies<double>(),0.5));
    double tmp[SPACEDIM];
    //
    for(int i=0;i<nPtsPolygonIn-2;i++)
      {
        std::transform(polygIn,polygIn+SPACEDIM,polygIn+(i+2)*SPACEDIM,tmp,std::plus<double>());
        std::transform(tmp,tmp+SPACEDIM,polygOut+(2*i+3)*SPACEDIM,std::bind2nd(std::multiplies<double>(),0.5));
        std::transform(polygIn+(i+1)*SPACEDIM,polygIn+(i+2)*SPACEDIM,tmp,tmp,std::plus<double>());
        std::transform(tmp,tmp+SPACEDIM,polygOut+(2*i+2)*SPACEDIM,std::bind2nd(std::multiplies<double>(),1./3.));
      }
  }
template<int SPACEDIM>
void INTERP_KERNEL::fillDualCellOfTri ( const double *  triIn,
double *  quadOut 
) [inline]

This method builds a quadrangle built with the first point of 'triIn' the barycenter of two edges starting or ending with the first point of 'triIn' and the barycenter of 'triIn'.

Parameters:
triInis a 6 doubles array in full interlace mode, that represents a triangle.
quadOutis a 8 doubles array filled after the following call.

Definition at line 141 of file InterpolationUtils.hxx.

  {
    //1st point
    std::copy(triIn,triIn+SPACEDIM,quadOut);
    double tmp[SPACEDIM];
    std::transform(triIn,triIn+SPACEDIM,triIn+SPACEDIM,tmp,std::plus<double>());
    //2nd point
    std::transform(tmp,tmp+SPACEDIM,quadOut+SPACEDIM,std::bind2nd(std::multiplies<double>(),0.5));
    std::transform(tmp,tmp+SPACEDIM,triIn+2*SPACEDIM,tmp,std::plus<double>());
    //3rd point
    std::transform(tmp,tmp+SPACEDIM,quadOut+2*SPACEDIM,std::bind2nd(std::multiplies<double>(),1/3.));
    //4th point
    std::transform(triIn,triIn+SPACEDIM,triIn+2*SPACEDIM,tmp,std::plus<double>());
    std::transform(tmp,tmp+SPACEDIM,quadOut+3*SPACEDIM,std::bind2nd(std::multiplies<double>(),0.5));
  }
template<class MyMeshType , int NB_NODES>
void INTERP_KERNEL::getBarycentricCoordinates ( const double *  point,
typename MyMeshType::MyConnType  element,
const MyMeshType &  mesh,
double *  barycentricCoords 
) [inline]

Returns the barycentric coordinates of a point within a triangle or tetrahedron.

Parameters:
pointthe point for which the barycentric coordinates are sought
elementan element of the mesh
mesha mesh
barycentricCoordsan array of 3 doubles containing the coordinates of the node

Definition at line 100 of file MeshUtils.hxx.

  {
    std::vector<const double*> nodes( NB_NODES );
    for ( int node = 0; node < NB_NODES; ++node )
      {
        nodes[ node ] = getCoordsOfNode( node, element, mesh );
      }
    barycentric_coords( nodes, point, barycentricCoords );
  }

Here is the call graph for this function:

template<class MyMeshType >
const double* INTERP_KERNEL::getCoordsOfNode ( typename MyMeshType::MyConnType  node,
typename MyMeshType::MyConnType  element,
const MyMeshType &  mesh 
) [inline]

Returns the coordinates of a node of an element.

Parameters:
nodethe node for which the coordinates are sought. In C mode.
elementan element of the mesh. In mesh policy.
mesha mesh
Returns:
pointer to an array of 3 doubles containing the coordinates of the node

Definition at line 66 of file MeshUtils.hxx.

  {
    typedef typename MyMeshType::MyConnType ConnType;
    const ConnType connIdx = getGlobalNumberOfNode(node, element, mesh);
    const double *ret=mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*connIdx;
    return ret;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class MyMeshType >
const double* INTERP_KERNEL::getCoordsOfNode2 ( typename MyMeshType::MyConnType  node,
typename MyMeshType::MyConnType  element,
const MyMeshType &  mesh,
typename MyMeshType::MyConnType &  nodeId 
) [inline]

Returns the coordinates of a node of an element.

Parameters:
nodethe node for which the coordinates are sought. In C mode.
elementan element of the mesh. In mesh policy.
mesha mesh
nodeIdglobale nodeId in whole mesh point of view in C mode.
Returns:
pointer to an array of 3 doubles containing the coordinates of the node

Definition at line 84 of file MeshUtils.hxx.

  {
    typedef typename MyMeshType::MyConnType ConnType;
    nodeId= getGlobalNumberOfNode(node, element, mesh);
    return mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*nodeId;
  }

Here is the call graph for this function:

template<int SPACEDIM>
double INTERP_KERNEL::getDistanceBtw2Pts ( const double *  a,
const double *  b 
) [inline]
Parameters:
afirst point. Should point on a array of size at least equal to SPACEDIM.
bsecond point. Should point on a array of size at least equal to SPACEDIM.

Definition at line 45 of file VectorUtils.hxx.

  {
    double ret2=0.;
    for(int i=0;i<SPACEDIM;i++)
      ret2+=(a[i]-b[i])*(a[i]-b[i]);
    return sqrt(ret2);
  }
template<int DIM, NumberingPolicy numPol, class MyMeshType >
void INTERP_KERNEL::getElemBB ( double *  bb,
const double *  coordsOfMesh,
int  iP,
int  nb_nodes 
) [inline]

Definition at line 793 of file InterpolationUtils.hxx.

  {
    bb[0]=std::numeric_limits<double>::max();
    bb[1]=-std::numeric_limits<double>::max();
    bb[2]=std::numeric_limits<double>::max();
    bb[3]=-std::numeric_limits<double>::max();
    bb[4]=std::numeric_limits<double>::max();
    bb[5]=-std::numeric_limits<double>::max();
    
    for (int i=0; i<nb_nodes; i++)
      {
        double x = coordsOfMesh[3*(iP+i)];
        double y = coordsOfMesh[3*(iP+i)+1];
        double z = coordsOfMesh[3*(iP+i)+2];
        bb[0]=(x<bb[0])?x:bb[0];
        bb[1]=(x>bb[1])?x:bb[1];
        bb[2]=(y<bb[2])?y:bb[2];
        bb[3]=(y>bb[3])?y:bb[3];
        bb[4]=(z<bb[4])?z:bb[4];
        bb[5]=(z>bb[5])?z:bb[5];
      }              
  }
template<class MyMeshType >
MyMeshType::MyConnType INTERP_KERNEL::getGlobalNumberOfNode ( typename MyMeshType::MyConnType  node,
typename MyMeshType::MyConnType  element,
const MyMeshType &  mesh 
) [inline]

Returns the global number of the node of an element.

Parameters:
nodethe node for which the global number is sought (ALWAYS in C mode)
elementan element of the mesh (in numPol policy)
mesha mesh
Returns:
the node's global number so that (its coordinates in the coordinates array are at [SPACEDIM*globalNumber, SPACEDIM*globalNumber + SPACEDIM]

Definition at line 36 of file MeshUtils.hxx.

  {
    typedef typename MyMeshType::MyConnType ConnType;
    const NumberingPolicy numPol=MyMeshType::My_numPol;
    const ConnType elemIdx=OTT<ConnType,numPol>::conn2C(mesh.getConnectivityIndexPtr()[OTT<ConnType,numPol>::ind2C(element)]);
    if(mesh.getTypeOfElement(element)!=INTERP_KERNEL::NORM_POLYHED)
      return OTT<ConnType,numPol>::coo2C(mesh.getConnectivityPtr()[elemIdx + node]);
    else
      {
        const ConnType *startNodalConnOfElem=mesh.getConnectivityPtr()+elemIdx;
        ConnType ptr=0,ret=0;
        while(startNodalConnOfElem[ret]==-1 || ptr!=node)
          {
            ret++;
            if(startNodalConnOfElem[ret]!=-1)
              ptr++;
          }
        return OTT<ConnType,numPol>::coo2C(startNodalConnOfElem[ret]);
      }
  }

Here is the caller graph for this function:

double INTERP_KERNEL::integrationOverA3DLine ( double  u1,
double  v1,
double  u2,
double  v2,
double  A,
double  B,
double  C 
) [inline]

Definition at line 466 of file VolSurfFormulae.hxx.

  {
    return (u1-u2)*(6.*C*C*(v1+v2)+B*B*(v1*v1*v1+v1*v1*v2+v1*v2*v2+v2*v2*v2)+A*A*(2.*u1*u2*(v1+v2)+u1*u1*(3.*v1+v2)+u2*u2*(v1+3.*v2))+ 
                    4.*C*(A*(2*u1*v1+u2*v1+u1*v2+2.*u2*v2)+B*(v1*v1+v1*v2+v2*v2))+A*B*(u1*(3.*v1*v1+2.*v1*v2+v2*v2)+u2*(v1*v1+2.*v1*v2+3.*v2*v2)))/24.;
  }

Here is the caller graph for this function:

void INTERP_KERNEL::inters_de_segment ( const double *  P_1,
const double *  P_2,
const double *  P_3,
const double *  P_4,
std::vector< double > &  Vect,
double  dim_caracteristic,
double  precision 
) [inline]

Definition at line 630 of file InterpolationUtils.hxx.

  {
    // calcul du determinant de P_1P_2 et P_3P_4.
    double det=(P_2[0]-P_1[0])*(P_4[1]-P_3[1])-(P_4[0]-P_3[0])*(P_2[1]-P_1[1]);

    double absolute_precision = dim_caracteristic*precision;
    if(fabs(det)>absolute_precision)
      {
        double k_1=-((P_3[1]-P_4[1])*(P_3[0]-P_1[0])+(P_4[0]-P_3[0])*(P_3[1]-P_1[1]))/det;

        if (k_1 >= -absolute_precision && k_1 <= 1+absolute_precision)
          //if( k_1 >= -precision && k_1 <= 1+precision)
          {
            double k_2= ((P_1[1]-P_2[1])*(P_1[0]-P_3[0])+(P_2[0]-P_1[0])*(P_1[1]-P_3[1]))/det;

            if (k_2 >= -absolute_precision && k_2 <= 1+absolute_precision)
              //if( k_2 >= -precision && k_2 <= 1+precision)
              {
                double P_0[2];
                P_0[0]=P_1[0]+k_1*(P_2[0]-P_1[0]);
                P_0[1]=P_1[1]+k_1*(P_2[1]-P_1[1]);
                verif_point_dans_vect(P_0,Vect,absolute_precision);
              }
          }
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<int DIM>
void INTERP_KERNEL::intersec_de_polygone ( const double *  Coords_A,
const double *  Coords_B,
int  nb_NodesA,
int  nb_NodesB,
std::vector< double > &  inter,
double  dim_caracteristic,
double  precision 
) [inline]

Definition at line 968 of file InterpolationUtils.hxx.

  {
    for(int i_A = 1; i_A<nb_NodesA-1; i_A++)
      {
        for(int i_B = 1; i_B<nb_NodesB-1; i_B++)
          {
            INTERP_KERNEL::intersec_de_triangle(&Coords_A[0],&Coords_A[DIM*i_A],&Coords_A[DIM*(i_A+1)],
                                                &Coords_B[0],&Coords_B[DIM*i_B],&Coords_B[DIM*(i_B+1)],
                                                inter, dim_caracteristic, precision);
          }
      }
    int nb_inter=((int)inter.size())/DIM;
    if(nb_inter >3) inter=INTERP_KERNEL::reconstruct_polygon(inter);
  }

Here is the call graph for this function:

void INTERP_KERNEL::intersec_de_triangle ( const double *  P_1,
const double *  P_2,
const double *  P_3,
const double *  P_4,
const double *  P_5,
const double *  P_6,
std::vector< double > &  Vect,
double  dim_caracteristic,
double  precision 
) [inline]

Definition at line 668 of file InterpolationUtils.hxx.

  {
    inters_de_segment(P_1,P_2,P_4,P_5,Vect, dim_caracteristic, precision);
    inters_de_segment(P_1,P_2,P_5,P_6,Vect, dim_caracteristic, precision);
    inters_de_segment(P_1,P_2,P_6,P_4,Vect, dim_caracteristic, precision);
    inters_de_segment(P_2,P_3,P_4,P_5,Vect, dim_caracteristic, precision);
    inters_de_segment(P_2,P_3,P_5,P_6,Vect, dim_caracteristic, precision);
    inters_de_segment(P_2,P_3,P_6,P_4,Vect, dim_caracteristic, precision);
    inters_de_segment(P_3,P_1,P_4,P_5,Vect, dim_caracteristic, precision);
    inters_de_segment(P_3,P_1,P_5,P_6,Vect, dim_caracteristic, precision);
    inters_de_segment(P_3,P_1,P_6,P_4,Vect, dim_caracteristic, precision);
    rajou_sommet_triangl(P_1,P_2,P_3,P_4,P_5,P_6,Vect, dim_caracteristic, precision);
    rajou_sommet_triangl(P_4,P_5,P_6,P_1,P_2,P_3,Vect, dim_caracteristic, precision);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

double INTERP_KERNEL::mon_determinant ( const double *  P_1,
const double *  P_2,
const double *  P_3 
) [inline]

Definition at line 83 of file InterpolationUtils.hxx.

  {
    double mon_det=(P_1[0]-P_3[0])*(P_2[1]-P_3[1])-(P_2[0]-P_3[0])*(P_1[1]-P_3[1]);
    return mon_det;
  }

Here is the caller graph for this function:

template<int dim>
double INTERP_KERNEL::norm ( const double *  v) [inline]

Calculates norm of a double[3] vector.

Parameters:
va vector v
Returns:
euclidean norm of v

Definition at line 830 of file InterpolationUtils.hxx.

  {   
    double result =0;
    for(int idim =0; idim<dim; idim++) result+=v[idim]*v[idim];
    return sqrt(result);
  }

Here is the caller graph for this function:

double INTERP_KERNEL::norme_vecteur ( const double *  P_1,
const double *  P_2 
) [inline]

Definition at line 94 of file InterpolationUtils.hxx.

  {
    double X=P_1[0]-P_2[0];
    double Y=P_1[1]-P_2[1];
    double norme=sqrt(X*X+Y*Y);
    return norme;
  }

Here is the caller graph for this function:

template<class _Key , class _Tp , class _HashFn , class _EqlKey , class _Alloc >
bool INTERP_KERNEL::operator!= ( const HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &  __hm1,
const HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &  __hm2 
) [inline]

Definition at line 184 of file InterpKernelHashMap.hxx.

  { return !(__hm1 == __hm2); }
template<class _Key , class _Tp , class _HF , class _EqKey , class _Alloc >
bool INTERP_KERNEL::operator!= ( const HashMultiMap< _Key, _Tp, _HF, _EqKey, _Alloc > &  __hm1,
const HashMultiMap< _Key, _Tp, _HF, _EqKey, _Alloc > &  __hm2 
) [inline]

Definition at line 319 of file InterpKernelHashMap.hxx.

  { return !(__hm1 == __hm2); }
template<class _Val , class _Key , class _HF , class _Ex , class _Eq , class _All >
bool INTERP_KERNEL::operator!= ( const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &  __ht1,
const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &  __ht2 
) [inline]

Definition at line 627 of file InterpKernelHashTable.hxx.

  { return !(__ht1 == __ht2); }
template<class U , NumberingPolicy type>
std::ostream& INTERP_KERNEL::operator<< ( std::ostream &  in,
const Matrix< U, type > &  m 
)
template<class T , NumberingPolicy type>
std::ostream& INTERP_KERNEL::operator<< ( std::ostream &  out,
const Matrix< T, type > &  m 
)

output to an ascii file only nonzero elements are written

  • the first line contains the indexing (0 or 1)
  • the second line contains the number of rows.
  • for each row, a line contains:
  • the number of nonzero coeffs
  • and for each coeff : icol, value

for instance, matrix | 1.0 0.0 0.5 | | 0.0 1.0 0.0 | | 0.2 0.0 1.0 | will be displayed in 0-indexing as 0 3 2 0 1.0 2 0.5 1 1 1.0 2 0 0.2 2 1.0

Definition at line 379 of file InterpKernelMatrix.hxx.

  {
    if (m._is_configured)
      {
        out << OTT<unsigned int,type>::indFC(0) <<std::endl;
        out << m._nb_rows<<std::endl;
        for (unsigned int i=0; i<m._nb_rows; i++)
          {
            out << m._ncols_offset[i+1]-m._ncols_offset[i];
            for (unsigned int j=m._ncols_offset[i]; j<m._ncols_offset[i+1]; j++)
              out <<"\t"<< OTT<unsigned int,type>::indFC(m._cols[j]) <<"\t"<<m._coeffs[j];
            out<<std::endl;
          }
      }
    else
      {
        out << OTT<unsigned int,type>::indFC(0) <<"\n";
        out << m._nb_rows <<"\n";
        for (unsigned int i=0; i<m._nb_rows; i++)
          {
            out<< m._auxiliary_matrix[i].size();
            for (unsigned int j=0; j<m._auxiliary_matrix[i].size(); j++)
              out << "\t" <<m._auxiliary_matrix[i][j].first <<"\t"
                  <<m._auxiliary_matrix[i][j].second;
            out <<"\n";
          }
      }
    return out;
  }
template<class _Key , class _Tp , class _HashFn , class _EqlKey , class _Alloc >
bool INTERP_KERNEL::operator== ( const HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &  __hm1,
const HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &  __hm2 
) [inline]

Definition at line 179 of file InterpKernelHashMap.hxx.

  { return __hm1._M_ht == __hm2._M_ht; }
template<class _Val , class _Key , class _HF , class _Ex , class _Eq , class _All >
bool INTERP_KERNEL::operator== ( const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &  __ht1,
const hashtable< _Val, _Key, _HF, _Ex, _Eq, _All > &  __ht2 
)

Definition at line 587 of file InterpKernelHashTable.hxx.

  {
    typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node;
    
    if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
      return false;
    
    for (std::size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n)
      {
        _Node* __cur1 = __ht1._M_buckets[__n];
        _Node* __cur2 = __ht2._M_buckets[__n];
        // Check same length of lists
        for (; __cur1 && __cur2;
             __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
          { } 
        if (__cur1 || __cur2)
          return false;
        // Now check one's elements are in the other
        for (__cur1 = __ht1._M_buckets[__n] ; __cur1;
             __cur1 = __cur1->_M_next)
          {
            bool _found__cur1 = false;
            for (__cur2 = __ht2._M_buckets[__n];
                 __cur2; __cur2 = __cur2->_M_next)
              {
                if (__cur1->_M_val == __cur2->_M_val)
                  {
                    _found__cur1 = true;
                    break;
                  }
              }
            if (!_found__cur1)
              return false;
          }
      }
    return true;
  }
template<class _Key , class _Tp , class _HF , class _EqKey , class _Alloc >
bool INTERP_KERNEL::operator== ( const HashMultiMap< _Key, _Tp, _HF, _EqKey, _Alloc > &  __hm1,
const HashMultiMap< _Key, _Tp, _HF, _EqKey, _Alloc > &  __hm2 
) [inline]

Definition at line 314 of file InterpKernelHashMap.hxx.

  { return __hm1._M_ht == __hm2._M_ht; }
template<class U , NumberingPolicy type>
std::istream& INTERP_KERNEL::operator>> ( std::istream &  in,
Matrix< U, type > &  m 
)
template<class T , NumberingPolicy type>
std::istream& INTERP_KERNEL::operator>> ( std::istream &  in,
Matrix< T, type > &  m 
)

Definition at line 410 of file InterpKernelMatrix.hxx.

  {
    int index_base_test;
    in >> index_base_test;
    if (index_base_test!=OTT<unsigned int,type>::indFC(0))
      {
        std::cerr << "file index is "<<index_base_test<<std::endl;
        throw Exception("incompatible indexing reading matrix");
      }
    in >> m._nb_rows;
    m._auxiliary_matrix.resize(m._nb_rows);
    for (unsigned int i=0; i<m._nb_rows; i++)
      {
        unsigned int ncols;
        in >> ncols;
        m._auxiliary_matrix[i].resize(ncols);
        double value;
        unsigned int col;
        for (unsigned int j=0; j<ncols; j++)
          {
            in>>col;
            in>>value;
            m._auxiliary_matrix[i].push_back(std::make_pair(col, value));
          }
      }
    return in;
  }
bool INTERP_KERNEL::point_dans_triangle ( const double *  P_0,
const double *  P_1,
const double *  P_2,
const double *  P_3,
double  eps 
) [inline]

Definition at line 558 of file InterpolationUtils.hxx.

  {

    bool A=false;
    double det_1=mon_determinant(P_1,P_3,P_0);
    double det_2=mon_determinant(P_3,P_2,P_0);
    double det_3=mon_determinant(P_2,P_1,P_0);
    if( (det_1>=-eps && det_2>=-eps && det_3>=-eps) || (det_1<=eps && det_2<=eps && det_3<=eps) )
      {
        A=true;
      }

    return A;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<int DIM>
double INTERP_KERNEL::polygon_area ( std::vector< double > &  inter) [inline]

Definition at line 990 of file InterpolationUtils.hxx.

  {
    double result=0.;
    double area[DIM];
                  
    for(int i = 1; i<(int)inter.size()/DIM-1; i++)
      {
        INTERP_KERNEL::crossprod<DIM>(&inter[0],&inter[DIM*i],&inter[DIM*(i+1)],area);
        result +=0.5*norm<DIM>(area);
      }
    return result;
  }
template<int DIM>
double INTERP_KERNEL::polygon_area ( std::deque< double > &  inter) [inline]

Definition at line 1003 of file InterpolationUtils.hxx.

  {
    double result=0.;
    double area[DIM];
                  
    for(int i = 1; i<(int)inter.size()/DIM-1; i++)
      {
        INTERP_KERNEL::crossprod<DIM>(&inter[0],&inter[DIM*i],&inter[DIM*(i+1)],area);
        result +=0.5*norm<DIM>(area);
      }
    return result;
  }
double INTERP_KERNEL::quadAspectRatio ( const double *  coo)

Definition at line 68 of file InterpKernelMeshQuality.cxx.

{
  double a=sqrt((coo[3]-coo[0])*(coo[3]-coo[0])+(coo[4]-coo[1])*(coo[4]-coo[1])+(coo[5]-coo[2])*(coo[5]-coo[2]));
  double b=sqrt((coo[6]-coo[3])*(coo[6]-coo[3])+(coo[7]-coo[4])*(coo[7]-coo[4])+(coo[8]-coo[5])*(coo[8]-coo[5]));
  double c=sqrt((coo[9]-coo[6])*(coo[9]-coo[6])+(coo[10]-coo[7])*(coo[10]-coo[7])+(coo[11]-coo[8])*(coo[11]-coo[8]));
  double d=sqrt((coo[0]-coo[9])*(coo[0]-coo[9])+(coo[1]-coo[10])*(coo[1]-coo[10])+(coo[2]-coo[11])*(coo[2]-coo[11]));
  double ma=a>b?a:b;
  double mb=c>d?c:d;
  double hm=ma>mb?ma:mb;
  double ab[3]={(coo[4]-coo[1])*(coo[8]-coo[5])-(coo[7]-coo[4])*(coo[5]-coo[2]),
                (coo[5]-coo[2])*(coo[6]-coo[3])-(coo[3]-coo[0])*(coo[8]-coo[5]),
                (coo[3]-coo[0])*(coo[7]-coo[4])-(coo[4]-coo[1])*(coo[6]-coo[3])};
  double cd[3]={(coo[10]-coo[7])*(coo[2]-coo[11])-(coo[1]-coo[10])*(coo[11]-coo[8]),
                (coo[11]-coo[8])*(coo[0]-coo[9])-(coo[9]-coo[6])*(coo[2]-coo[11]),
                (coo[9]-coo[6])*(coo[1]-coo[10])-(coo[10]-coo[7])*(coo[0]-coo[9])};
  double e=sqrt(ab[0]*ab[0]+ab[1]*ab[1]+ab[2]*ab[2])+sqrt(cd[0]*cd[0]+cd[1]*cd[1]+cd[2]*cd[2]);
  if(d>1e-15)
    return 0.5*(a+b+c+d)*hm/e;
  else
    return std::numeric_limits<double>::max();
}

Here is the caller graph for this function:

double INTERP_KERNEL::quadEdgeRatio ( const double *  coo)

Definition at line 50 of file InterpKernelMeshQuality.cxx.

{
  double a2=(coo[3]-coo[0])*(coo[3]-coo[0])+(coo[4]-coo[1])*(coo[4]-coo[1])+(coo[5]-coo[2])*(coo[5]-coo[2]);
  double b2=(coo[6]-coo[3])*(coo[6]-coo[3])+(coo[7]-coo[4])*(coo[7]-coo[4])+(coo[8]-coo[5])*(coo[8]-coo[5]);
  double c2=(coo[9]-coo[6])*(coo[9]-coo[6])+(coo[10]-coo[7])*(coo[10]-coo[7])+(coo[11]-coo[8])*(coo[11]-coo[8]);
  double d2=(coo[0]-coo[9])*(coo[0]-coo[9])+(coo[1]-coo[10])*(coo[1]-coo[10])+(coo[2]-coo[11])*(coo[2]-coo[11]);
  double mab=a2<b2?a2:b2;
  double Mab=a2<b2?b2:a2;
  double mcd=c2<d2?c2:d2;
  double Mcd=c2<d2?d2:c2;
  double m2=mab<mcd?mab:mcd;
  double M2=Mab>Mcd?Mab:Mcd;
  if(m2>1.e-15)
    return sqrt(M2/m2);
  else
    return std::numeric_limits<double>::max();
}

Here is the caller graph for this function:

double INTERP_KERNEL::quadSkew ( const double *  coo)

Definition at line 27 of file InterpKernelMeshQuality.cxx.

{
  double pa0[3]={
    coo[3]+coo[6]-coo[0]-coo[9],
    coo[4]+coo[7]-coo[1]-coo[10],
    coo[5]+coo[8]-coo[2]-coo[11]
  };
  double pa1[3]={
    coo[6]+coo[9]-coo[0]-coo[3],
    coo[7]+coo[10]-coo[1]-coo[4],
    coo[8]+coo[11]-coo[2]-coo[5],
  };
  double l0=sqrt(pa0[0]*pa0[0]+pa0[1]*pa0[1]+pa0[2]*pa0[2]);
  double l1=sqrt(pa1[0]*pa1[0]+pa1[1]*pa1[1]+pa1[2]*pa1[2]);
  if(l0<1.e-15)
    return 0.;
  if(l1<1.e-15)
    return 0.;
  pa0[0]/=l0; pa0[1]/=l0; pa0[2]/=l0;
  pa1[0]/=l1; pa1[1]/=l1; pa1[2]/=l1;
  return pa0[0]*pa1[0]+pa0[1]*pa1[1]+pa0[2]*pa1[2];
}

Here is the caller graph for this function:

double INTERP_KERNEL::quadWarp ( const double *  coo)

Definition at line 90 of file InterpKernelMeshQuality.cxx.

{
  double e0[3]={coo[3]-coo[0],coo[4]-coo[1],coo[5]-coo[2]};
  double e1[3]={coo[6]-coo[3],coo[7]-coo[4],coo[8]-coo[5]};
  double e2[3]={coo[9]-coo[6],coo[10]-coo[7],coo[11]-coo[8]};
  double e3[3]={coo[0]-coo[9],coo[1]-coo[10],coo[2]-coo[11]};
  
  double n0[3]={e3[1]*e0[2]-e3[2]*e0[1],e3[2]*e0[0]-e3[0]*e0[2],e3[0]*e0[1]-e3[1]*e0[0]};
  double n1[3]={e0[1]*e1[2]-e0[2]*e1[1],e0[2]*e1[0]-e0[0]*e1[2],e0[0]*e1[1]-e0[1]*e1[0]};
  double n2[3]={e1[1]*e2[2]-e1[2]*e2[1],e1[2]*e2[0]-e1[0]*e2[2],e1[0]*e2[1]-e1[1]*e2[0]};
  double n3[3]={e2[1]*e3[2]-e2[2]*e3[1],e2[2]*e3[0]-e2[0]*e3[2],e2[0]*e3[1]-e2[1]*e3[0]};

  double l0=sqrt(n0[0]*n0[0]+n0[1]*n0[1]+n0[2]*n0[2]);
  double l1=sqrt(n1[0]*n1[0]+n1[1]*n1[1]+n1[2]*n1[2]);
  double l2=sqrt(n2[0]*n2[0]+n2[1]*n2[1]+n2[2]*n2[2]);
  double l3=sqrt(n3[0]*n3[0]+n3[1]*n3[1]+n3[2]*n3[2]);

  if(l0<1.e-15 || l1<1.e-15 || l2<1.e-15 || l3<1e-15)
    return std::numeric_limits<double>::min();

  double warp=std::min(n0[0]/l0*n2[0]/l2+n0[1]/l0*n2[1]/l2+n0[2]/l0*n2[2]/l2,n1[0]/l1*n3[0]/l3+n1[1]/l1*n3[1]/l3+n1[2]/l1*n3[2]/l3);
  return warp*warp*warp;
}

Here is the caller graph for this function:

void INTERP_KERNEL::rajou_sommet_triangl ( const double *  P_1,
const double *  P_2,
const double *  P_3,
const double *  P_4,
const double *  P_5,
const double *  P_6,
std::vector< double > &  V,
double  dim_caracteristic,
double  precision 
) [inline]

Definition at line 606 of file InterpolationUtils.hxx.

  {

    double absolute_precision = precision*dim_caracteristic;
    bool A_1=INTERP_KERNEL::point_dans_triangle(P_1,P_4,P_5,P_6,absolute_precision);
    if(A_1)
      verif_point_dans_vect(P_1,V,absolute_precision);
    bool A_2=INTERP_KERNEL::point_dans_triangle(P_2,P_4,P_5,P_6,absolute_precision);
    if(A_2)
      verif_point_dans_vect(P_2,V,absolute_precision);
    bool A_3=INTERP_KERNEL::point_dans_triangle(P_3,P_4,P_5,P_6,absolute_precision);
    if(A_3)
      verif_point_dans_vect(P_3,V,absolute_precision);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector<double> INTERP_KERNEL::reconstruct_polygon ( const std::vector< double > &  V) [inline]

Definition at line 732 of file InterpolationUtils.hxx.

  {

    std::size_t taille=V.size();

    //VB : why 6 ?

    if(taille<=6)
      {return V;}
    else
      {
        double *COS=new double[taille/2];
        double *SIN=new double[taille/2];
        //double *angle=new double[taille/2];
        std::vector<double> Bary=bary_poly(V);
        COS[0]=1.0;
        SIN[0]=0.0;
        //angle[0]=0.0;
        for(std::size_t i=0; i<taille/2-1;i++)
          {
            std::vector<double> Trigo=calcul_cos_et_sin(&Bary[0],&V[0],&V[2*(i+1)]);
            COS[i+1]=Trigo[0];
            SIN[i+1]=Trigo[1];
            //if(SIN[i+1]>=0)
            //    {angle[i+1]=atan2(SIN[i+1],COS[i+1]);}
            //             else
            //               {angle[i+1]=-atan2(SIN[i+1],COS[i+1]);}
          }
                     
        //ensuite on ordonne les angles.
        std::vector<double> Pt_ordonne;
        Pt_ordonne.reserve(taille);
        //        std::multimap<double,int> Ordre;
        std::multimap<std::pair<double,double>,int, AngleLess> CosSin;
        for(std::size_t i=0;i<taille/2;i++)       
          {
            //  Ordre.insert(std::make_pair(angle[i],i));
            CosSin.insert(std::make_pair(std::make_pair(SIN[i],COS[i]),i));
          }
        //        std::multimap <double,int>::iterator mi;
        std::multimap<std::pair<double,double>,int, AngleLess>::iterator   micossin;
        //         for(mi=Ordre.begin();mi!=Ordre.end();mi++)
        //           {
        //             int j=(*mi).second;
        //             Pt_ordonne.push_back(V[2*j]);
        //             Pt_ordonne.push_back(V[2*j+1]);
        //           }
        for(micossin=CosSin.begin();micossin!=CosSin.end();micossin++)
          {
            int j=(*micossin).second;
            Pt_ordonne.push_back(V[2*j]);
            Pt_ordonne.push_back(V[2*j+1]);
          }
        delete [] COS;
        delete [] SIN;
        //        delete [] angle;
        return Pt_ordonne;
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool INTERP_KERNEL::samePoint ( const double *  p1,
const double *  p2 
) [inline]

Definition at line 40 of file UnitTetraIntersectionBary.cxx.

  {
    return ( epsilonEqual( p1[0], p2[0]) &&
             epsilonEqual( p1[1], p2[1]) &&
             epsilonEqual( p1[2], p2[2]));
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<unsigned nbRow>
bool INTERP_KERNEL::solveSystemOfEquations ( double  M[nbRow][nbRow+1],
double *  sol 
)

Solve system equation in matrix form using Gaussian elimination algorithm.

Parameters:
M- N x N+1 matrix
sol- vector of N solutions
Return values:
bool- true if succeeded

Definition at line 268 of file InterpolationUtils.hxx.

  {
    const int nbCol=nbRow+1;

    // make upper triangular matrix (forward elimination)

    int iR[nbRow];// = { 0, 1, 2 };
    for ( int i = 0; i < (int) nbRow; ++i )
      iR[i] = i;
    for ( int i = 0; i < (int)(nbRow-1); ++i ) // nullify nbRow-1 rows
      {
        // swap rows to have max value of i-th column in i-th row
        double max = std::fabs( M[ iR[i] ][i] );
        for ( int r = i+1; r < (int)nbRow; ++r )
          {
            double m = std::fabs( M[ iR[r] ][i] );
            if ( m > max )
              {
                max = m;
                std::swap( iR[r], iR[i] );
              }
          }
        if ( max < std::numeric_limits<double>::min() )
          {
            //sol[0]=1; sol[1]=sol[2]=sol[3]=0;
            return false; // no solution
          }
        // make 0 below M[i][i] (actually we do not modify i-th column)
        double* tUpRow = M[ iR[i] ];
        for ( int r = i+1; r < (int)nbRow; ++r )
          {
            double* mRow = M[ iR[r] ];
            double coef = mRow[ i ] / tUpRow[ i ];
            for ( int c = i+1; c < nbCol; ++c )
              mRow[ c ] -= tUpRow[ c ] * coef;
          }
      }
    double* mRow = M[ iR[nbRow-1] ];
    if ( std::fabs( mRow[ nbRow-1 ] ) < std::numeric_limits<double>::min() )
      {
        //sol[0]=1; sol[1]=sol[2]=sol[3]=0;
        return false; // no solution
      }
    mRow[ nbRow ] /= mRow[ nbRow-1 ];

    // calculate solution (back substitution)

    sol[ nbRow-1 ] = mRow[ nbRow ];

    for ( int i = nbRow-2; i+1; --i )
      {
        mRow = M[ iR[i] ];
        sol[ i ] = mRow[ nbRow ];
        for ( int j = nbRow-1; j > i; --j )
          sol[ i ] -= sol[j]*mRow[ j ];
        sol[ i ] /= mRow[ i ];
      }

    return true;
  }

Here is the call graph for this function:

template<unsigned SZ, unsigned NB_OF_RES>
bool INTERP_KERNEL::solveSystemOfEquations2 ( const double *  matrix,
double *  solutions,
double  eps 
)

Solve system equation in matrix form using Gaussian elimination algorithm.

Parameters:
M- N x N+NB_OF_VARS matrix
sol- vector of N solutions
Return values:
bool- true if succeeded

Definition at line 337 of file InterpolationUtils.hxx.

  {
    unsigned k,j;
    int nr,n,m,np;
    double s,g;
    int mb;
    //
    double B[SZ*(SZ+NB_OF_RES)];
    std::copy(matrix,matrix+SZ*(SZ+NB_OF_RES),B);
    //
    nr=SZ+NB_OF_RES;
    for(k=0;k<SZ;k++)
      {
        np=nr*k+k;
        if(fabs(B[np])<eps)
          {
            n=k;
            do
              {
                n++;
                if(fabs(B[nr*k+n])>eps)
                  {/* Rows permutation */
                    for(m=0;m<nr;m++)
                      std::swap(B[nr*k+m],B[nr*n+m]);
                  }
              }
            while (n<(int)SZ);
          }
        s=B[np];//s is the Pivot
        std::transform(B+k*nr,B+(k+1)*nr,B+k*nr,std::bind2nd(std::divides<double>(),s));
        for(j=0;j<SZ;j++)
          {
            if(j!=k)
              {
                g=B[j*nr+k];
                for(mb=k;mb<nr;mb++)
                  B[j*nr+mb]-=B[k*nr+mb]*g;
              }
          }
      }
    for(j=0;j<NB_OF_RES;j++)
      for(k=0;k<SZ;k++)
        solutions[j*SZ+k]=B[nr*k+SZ+j];
    //
    return true;
  }

Here is the call graph for this function:

double INTERP_KERNEL::Surf_Poly ( const std::vector< double > &  Poly) [inline]

Definition at line 540 of file InterpolationUtils.hxx.

  { 

    double Surface=0;
    for(unsigned long i=0; i<(Poly.size())/2-2; i++)
      {
        double Surf=Surf_Tri( &Poly[0],&Poly[2*(i+1)],&Poly[2*(i+2)] ); 
        Surface=Surface + Surf ;
      }
    return Surface ;
  }

Here is the call graph for this function:

double INTERP_KERNEL::Surf_Tri ( const double *  P_1,
const double *  P_2,
const double *  P_3 
) [inline]

Definition at line 68 of file InterpolationUtils.hxx.

  {
    double A=(P_3[1]-P_1[1])*(P_2[0]-P_1[0])-(P_2[1]-P_1[1])*(P_3[0]-P_1[0]);
    double Surface = 0.5*fabs(A);
    return Surface;
  }

Here is the caller graph for this function:

template<class _Key , class _Tp , class _HashFn , class _EqlKey , class _Alloc >
void INTERP_KERNEL::swap ( HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &  __hm1,
HashMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &  __hm2 
) [inline]

Definition at line 189 of file InterpKernelHashMap.hxx.

  { __hm1.swap(__hm2); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class _Key , class _Tp , class _HashFn , class _EqlKey , class _Alloc >
void INTERP_KERNEL::swap ( HashMultiMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &  __hm1,
HashMultiMap< _Key, _Tp, _HashFn, _EqlKey, _Alloc > &  __hm2 
) [inline]

Definition at line 324 of file InterpKernelHashMap.hxx.

  { __hm1.swap(__hm2); }

Here is the call graph for this function:

template<class _Val , class _Key , class _HF , class _Extract , class _EqKey , class _All >
void INTERP_KERNEL::swap ( hashtable< _Val, _Key, _HF, _Extract, _EqKey, _All > &  __ht1,
hashtable< _Val, _Key, _HF, _Extract, _EqKey, _All > &  __ht2 
) [inline]

Definition at line 632 of file InterpKernelHashTable.hxx.

  { __ht1.swap(__ht2); }

Here is the call graph for this function:

double INTERP_KERNEL::tetraAspectRatio ( const double *  coo)

Definition at line 174 of file InterpKernelMeshQuality.cxx.

{
  static const double normalizeCoeff=sqrt(6.)/12.;
  double ab[3]={coo[3]-coo[0],coo[4]-coo[1],coo[5]-coo[2]};
  double ac[3]={coo[6]-coo[0],coo[7]-coo[1],coo[8]-coo[2]};
  double ad[3]={coo[9]-coo[0],coo[10]-coo[1],coo[11]-coo[2]};
  double detTet=(ab[0]*(ac[1]*ad[2]-ac[2]*ad[1]))+(ab[1]*(ac[2]*ad[0]-ac[0]*ad[2]))+(ab[2]*(ac[0]*ad[1]-ac[1]*ad[0]));
  //if(detTet<1.e-15)
  //  return std::numeric_limits<double>::max();
  double bc[3]={coo[6]-coo[3],coo[7]-coo[4],coo[8]-coo[5]};
  double bd[3]={coo[9]-coo[3],coo[10]-coo[4],coo[11]-coo[5]};
  double cd[3]={coo[9]-coo[6],coo[10]-coo[7],coo[11]-coo[8]};

  double ab2=ab[0]*ab[0]+ab[1]*ab[1]+ab[2]*ab[2];
  double bc2=bc[0]*bc[0]+bc[1]*bc[1]+bc[2]*bc[2];
  double ac2=ac[0]*ac[0]+ac[1]*ac[1]+ac[2]*ac[2];
  double ad2=ad[0]*ad[0]+ad[1]*ad[1]+ad[2]*ad[2];
  double bd2=bd[0]*bd[0]+bd[1]*bd[1]+bd[2]*bd[2];
  double cd2=cd[0]*cd[0]+cd[1]*cd[1]+cd[2]*cd[2];

  double A=ab2>bc2?ab2:bc2;
  double B=ac2>ad2?ac2:ad2;
  double C=bd2>cd2?bd2:cd2;
  double D=A>B?A:B;
  double hm=D>C?sqrt(D):sqrt(C);

  bd[0]=ab[1]*bc[2]-ab[2]*bc[1]; bd[1]=ab[2]*bc[0]-ab[0]*bc[2]; bd[2]=ab[0]*bc[1]-ab[1]*bc[0];
  A=sqrt(bd[0]*bd[0]+bd[1]*bd[1]+bd[2]*bd[2]);
  bd[0]=ab[1]*ad[2]-ab[2]*ad[1]; bd[1]=ab[2]*ad[0]-ab[0]*ad[2]; bd[2]=ab[0]*ad[1]-ab[1]*ad[0];
  B=sqrt(bd[0]*bd[0]+bd[1]*bd[1]+bd[2]*bd[2]);
  bd[0]=ac[1]*ad[2]-ac[2]*ad[1]; bd[1]=ac[2]*ad[0]-ac[0]*ad[2]; bd[2]=ac[0]*ad[1]-ac[1]*ad[0];
  C=sqrt(bd[0]*bd[0]+bd[1]*bd[1]+bd[2]*bd[2]);
  bd[0]=bc[1]*cd[2]-bc[2]*cd[1]; bd[1]=bc[2]*cd[0]-bc[0]*cd[2]; bd[2]=bc[0]*cd[1]-bc[1]*cd[0];
  D=sqrt(bd[0]*bd[0]+bd[1]*bd[1]+bd[2]*bd[2]);
  return normalizeCoeff*hm*(A+B+C+D)/fabs(detTet);
}

Here is the caller graph for this function:

double INTERP_KERNEL::tetraEdgeRatio ( const double *  coo)

Definition at line 149 of file InterpKernelMeshQuality.cxx.

{
  double a[3]={coo[3]-coo[0],coo[4]-coo[1],coo[5]-coo[2]};
  double b[3]={coo[6]-coo[3],coo[7]-coo[4],coo[8]-coo[5]};
  double c[3]={coo[0]-coo[6],coo[1]-coo[7],coo[2]-coo[8]};
  double d[3]={coo[9]-coo[0],coo[10]-coo[1],coo[11]-coo[2]};
  double e[3]={coo[9]-coo[3],coo[10]-coo[4],coo[11]-coo[5]};
  double f[3]={coo[9]-coo[6],coo[10]-coo[7],coo[11]-coo[8]};
  
  double l2[6]=
    {a[0]*a[0]+a[1]*a[1]+a[2]*a[2],
     b[0]*b[0]+b[1]*b[1]+b[2]*b[2],
     c[0]*c[0]+c[1]*c[1]+c[2]*c[2],
     d[0]*d[0]+d[1]*d[1]+d[2]*d[2],
     e[0]*e[0]+e[1]*e[1]+e[2]*e[2],
     f[0]*f[0]+f[1]*f[1]+f[2]*f[2]};

  double M2=*std::max_element(l2,l2+6);
  double m2=*std::min_element(l2,l2+6);
  if(m2>1e-15)
    return sqrt(M2/m2);
  else
    return std::numeric_limits<double>::max();
}

Here is the caller graph for this function:

double INTERP_KERNEL::triAspectRatio ( const double *  coo)

Definition at line 129 of file InterpKernelMeshQuality.cxx.

{
  double a=sqrt((coo[3]-coo[0])*(coo[3]-coo[0])+(coo[4]-coo[1])*(coo[4]-coo[1])+(coo[5]-coo[2])*(coo[5]-coo[2]));
  double b=sqrt((coo[6]-coo[3])*(coo[6]-coo[3])+(coo[7]-coo[4])*(coo[7]-coo[4])+(coo[8]-coo[5])*(coo[8]-coo[5]));
  double c=sqrt((coo[0]-coo[6])*(coo[0]-coo[6])+(coo[1]-coo[7])*(coo[1]-coo[7])+(coo[2]-coo[8])*(coo[2]-coo[8]));
 
  double hm=a>b?a:b;
  hm=hm>c?hm:c;

  double ab[3]={(coo[4]-coo[1])*(coo[8]-coo[5])-(coo[7]-coo[4])*(coo[5]-coo[2]),
                (coo[5]-coo[2])*(coo[6]-coo[3])-(coo[3]-coo[0])*(coo[8]-coo[5]),
                (coo[3]-coo[0])*(coo[7]-coo[4])-(coo[4]-coo[1])*(coo[6]-coo[3])};
  double d=sqrt(ab[0]*ab[0]+ab[1]*ab[1]+ab[2]*ab[2]);
  static const double normalizeCoeff=sqrt(3.)/6.;
  if(d>1.e-15) 
    return normalizeCoeff*hm*(a+b+c)/d;
  else
    return std::numeric_limits<double>::max();
}

Here is the caller graph for this function:

double INTERP_KERNEL::triEdgeRatio ( const double *  coo)

Definition at line 114 of file InterpKernelMeshQuality.cxx.

{
  double a2=(coo[3]-coo[0])*(coo[3]-coo[0])+(coo[4]-coo[1])*(coo[4]-coo[1])+(coo[5]-coo[2])*(coo[5]-coo[2]);
  double b2=(coo[6]-coo[3])*(coo[6]-coo[3])+(coo[7]-coo[4])*(coo[7]-coo[4])+(coo[8]-coo[5])*(coo[8]-coo[5]);
  double c2=(coo[0]-coo[6])*(coo[0]-coo[6])+(coo[1]-coo[7])*(coo[1]-coo[7])+(coo[2]-coo[8])*(coo[2]-coo[8]);
  double mab=a2<b2?a2:b2;
  double Mab=a2<b2?b2:a2;
  double m2=c2>mab?mab:c2;
  double M2=c2>Mab?c2:Mab;
  if(m2>1.e-15)
    return sqrt(M2/m2);
  else
    return std::numeric_limits<double>::max();
}

Here is the caller graph for this function:

double INTERP_KERNEL::triple_product ( const double *  A,
const double *  B,
const double *  C,
const double *  X 
) [inline]

Computes the triple product (XA^XB).XC (in 3D)

Definition at line 1017 of file InterpolationUtils.hxx.

  {
    double XA[3];
    XA[0]=A[0]-X[0];
    XA[1]=A[1]-X[1];
    XA[2]=A[2]-X[2];
    double XB[3];
    XB[0]=B[0]-X[0];
    XB[1]=B[1]-X[1];
    XB[2]=B[2]-X[2];
    double XC[3];
    XC[0]=C[0]-X[0];
    XC[1]=C[1]-X[1];
    XC[2]=C[2]-X[2];
    
    return 
      (XA[1]*XB[2]-XA[2]*XB[1])*XC[0]+
      (XA[2]*XB[0]-XA[0]*XB[2])*XC[1]+
      (XA[0]*XB[1]-XA[1]*XB[0])*XC[2];
  }
void INTERP_KERNEL::verif_maill_dans_vect ( int  Num,
std::vector< int > &  V 
) [inline]

Definition at line 690 of file InterpolationUtils.hxx.

  {
    long taille=V.size();
    int A=0;
    for(long i=0;i<taille;i++)
      {
        if(Num==V[i])
          {
            A=1;
            break;
          } 
      }
    if(A==0)
      {V.push_back(Num); }
  }
void INTERP_KERNEL::verif_point_dans_vect ( const double *  P,
std::vector< double > &  V,
double  absolute_precision 
) [inline]

Definition at line 580 of file InterpolationUtils.hxx.

  {
    long taille=V.size();
    bool isPresent=false;
    for(long i=0;i<taille/2;i++) 
      {
        if (sqrt(((P[0]-V[2*i])*(P[0]-V[2*i])+(P[1]-V[2*i+1])*(P[1]-V[2*i+1])))<absolute_precision)
          isPresent=true;
      
      }
    if(!isPresent)
      {
      
        V.push_back(P[0]);
        V.push_back(P[1]);    
      }
  }

Here is the caller graph for this function:

const std::string INTERP_KERNEL::vToStr ( const double *  pt) [inline]

Creates a string representation of a double[3] vector.

Parameters:
pta 3-vector
Returns:
a string of the form [x, y, z]

Definition at line 76 of file VectorUtils.hxx.

  {
    std::stringstream ss(std::ios::out);
    ss << "[" << pt[0] << ", " << pt[1] << ", " << pt[2] << "]";
    return ss.str();
  }

Variable Documentation

const unsigned long INTERP_KERNEL::__stl_prime_list[_S_num_primes] [static]
Initial value:
    {
      53ul,         97ul,         193ul,       389ul,       769ul,
      1543ul,       3079ul,       6151ul,      12289ul,     24593ul,
      49157ul,      98317ul,      196613ul,    393241ul,    786433ul,
      1572869ul,    3145739ul,    6291469ul,   12582917ul,  25165843ul,
      50331653ul,   100663319ul,  201326611ul, 402653189ul, 805306457ul,
      1610612741ul, 3221225473ul, 4294967291ul
    }

Definition at line 180 of file InterpKernelHashTable.hxx.

const double INTERP_KERNEL::DEFAULT_ABS_TOL = 5.0e-12

Default absolute tolerance in epsilonEqual and epsilonEqualRelative.

Definition at line 38 of file VectorUtils.hxx.

const double INTERP_KERNEL::DEFAULT_REL_TOL = 1.0e-6

Default relative tolerance in epsilonEqualRelative.

Definition at line 35 of file VectorUtils.hxx.

Definition at line 39 of file InterpKernelGeo2DQuadraticPolygon.cxx.

const double INTERP_KERNEL::VOL_PREC = 1.0e-6

Precision used for tests of 3D part of INTERP_KERNEL.

Definition at line 32 of file VectorUtils.hxx.