gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
HighOrder.cpp File Reference
#include <sstream>
#include <vector>
#include "GmshConfig.h"
#include "GModel.h"
#include "HighOrder.h"
#include "MLine.h"
#include "MTriangle.h"
#include "MQuadrangle.h"
#include "MTetrahedron.h"
#include "MHexahedron.h"
#include "MPrism.h"
#include "MPyramid.h"
#include "GmshMessage.h"
#include "OS.h"
#include "fullMatrix.h"
#include "BasisFactory.h"
#include "nodalBasis.h"
#include "InnerVertexPlacement.h"
#include "Context.h"
#include "MFace.h"
#include "ExtrudeParams.h"
Include dependency graph for HighOrder.cpp:

Go to the source code of this file.

Typedefs

typedef std::map< std::pair< MVertex *, MVertex * >, std::vector< MVertex * > > edgeContainer
 
typedef std::map< MFace, std::vector< MVertex * >, MFaceLessThanfaceContainer
 

Functions

static double mylength (GEdge *ge, int i, double *u)
 
static void myresid (int N, GEdge *ge, double *u, fullVector< double > &r, double *weight=nullptr)
 
static bool computeEquidistantParameters (GEdge *ge, double u0, double uN, int N, double *u, double underRelax)
 
static bool computeGLLParametersP6 (GEdge *ge, double u0, double uN, int N, double *u, double underRelax)
 
static bool computeEquidistantParameters (GFace *gf, double u0, double uN, double v0, double vN, SPoint3 &p0, SPoint3 &pN, int N, bool geodesic, double *u, double *v)
 
void createMatLob2LagP6 ()
 
static bool getEdgeVerticesOnGeo (GEdge *ge, MVertex *v0, MVertex *v1, std::vector< MVertex * > &ve, int nPts=1)
 
static bool getEdgeVerticesOnGeo (GFace *gf, MVertex *v0, MVertex *v1, std::vector< MVertex * > &ve, int nPts=1)
 
static void interpVerticesInExistingEdge (GEntity *ge, const MElement *edgeEl, std::vector< MVertex * > &veEdge, int nPts)
 
static bool getMinMaxVert (MVertex *v0, MVertex *v1, MVertex *&vMin, MVertex *&vMax)
 
static void getEdgeVertices (GEdge *ge, MElement *ele, std::vector< MVertex * > &ve, edgeContainer &edgeVertices, bool linear, int nPts=1)
 
static void getEdgeVertices (GFace *gf, MElement *ele, std::vector< MVertex * > &ve, edgeContainer &edgeVertices, bool linear, int nPts=1)
 
static void getEdgeVertices (GRegion *gr, MElement *ele, std::vector< MVertex * > &ve, edgeContainer &edgeVertices, int nPts=1)
 
static void reorientTrianglePoints (std::vector< MVertex * > &vtcs, int orientation, bool swap)
 
static void reorientQuadPoints (std::vector< MVertex * > &vtcs, int orientation, bool swap, int order)
 
static void interpVerticesInExistingFace (GEntity *ge, const fullMatrix< double > &coefficients, const std::vector< MVertex * > &vertices, std::vector< MVertex * > &vFace)
 
static bool getFaceVerticesOnExtrudedGeo (GFace *gf, const fullMatrix< double > &coefficients, const std::vector< MVertex * > &vertices, std::vector< MVertex * > &vf)
 
static void getFaceVerticesOnGeo (GFace *gf, const fullMatrix< double > &coefficients, const std::vector< MVertex * > &vertices, std::vector< MVertex * > &vf)
 
static void getFaceVertices (GFace *gf, MElement *ele, std::vector< MVertex * > &newVertices, faceContainer &faceVertices, bool linear, int nPts=1)
 
static int retrieveFaceBoundaryVertices (int k, int type, int nPts, const std::vector< MVertex * > &vCorner, const std::vector< MVertex * > &vEdges, std::vector< MVertex * > &v)
 
static void getFaceVertices (GRegion *gr, MElement *ele, std::vector< MVertex * > &newVertices, faceContainer &faceVertices, int nPts=1)
 
static void getVolumeVertices (GRegion *gr, MElement *ele, std::vector< MVertex * > &newVertices, int nPts=1)
 
static void setHighOrder (GEdge *ge, edgeContainer &edgeVertices, bool linear, int nbPts=1)
 
static MTrianglesetHighOrder (MTriangle *t, GFace *gf, edgeContainer &edgeVertices, faceContainer &faceVertices, bool linear, bool incomplete, int nPts)
 
static MQuadranglesetHighOrder (MQuadrangle *q, GFace *gf, edgeContainer &edgeVertices, faceContainer &faceVertices, bool linear, bool incomplete, int nPts)
 
static void setHighOrder (GFace *gf, edgeContainer &edgeVertices, faceContainer &faceVertices, bool linear, bool incomplete, int nPts=1)
 
static MTetrahedronsetHighOrder (MTetrahedron *t, GRegion *gr, edgeContainer &edgeVertices, faceContainer &faceVertices, bool incomplete, int nPts)
 
static MHexahedronsetHighOrder (MHexahedron *h, GRegion *gr, edgeContainer &edgeVertices, faceContainer &faceVertices, bool incomplete, int nPts)
 
static MPrismsetHighOrder (MPrism *p, GRegion *gr, edgeContainer &edgeVertices, faceContainer &faceVertices, bool incomplete, int nPts)
 
static MPyramidsetHighOrder (MPyramid *p, GRegion *gr, edgeContainer &edgeVertices, faceContainer &faceVertices, bool incomplete, int nPts)
 
static void setHighOrder (GRegion *gr, edgeContainer &edgeVertices, faceContainer &faceVertices, bool incomplete, int nPts=1)
 
template<class T >
static void setFirstOrder (GEntity *e, std::vector< T * > &elements, bool onlyVisible, bool skipDiscrete)
 
static void deleteHighOrderVertices (GEntity *e, bool onlyVisible, bool skipDiscrete)
 
void SetOrder1 (GModel *m, bool onlyVisible, bool skipDiscrete)
 
void checkHighOrderTriangles (const char *cc, GModel *m, std::vector< MElement * > &bad, double &minJGlob)
 
void checkHighOrderTetrahedron (const char *cc, GModel *m, std::vector< MElement * > &bad, double &minJGlob)
 
static int getOrder (GEntity *ge)
 
static void setHighOrderFromExistingMesh (GEdge *ge, edgeContainer &edgeVertices)
 
static void setHighOrderFromExistingMesh (GFace *gf, edgeContainer &edgeVertices, faceContainer &faceVertices)
 
void SetOrderN (GModel *m, int order, bool linear, bool incomplete, bool onlyVisible)
 

Variables

static fullMatrix< double > * lob2lagP6 = nullptr
 

Typedef Documentation

◆ edgeContainer

typedef std::map<std::pair<MVertex *, MVertex *>, std::vector<MVertex *> > edgeContainer

Definition at line 38 of file HighOrder.cpp.

◆ faceContainer

typedef std::map<MFace, std::vector<MVertex *>, MFaceLessThan> faceContainer

Definition at line 42 of file HighOrder.cpp.

Function Documentation

◆ checkHighOrderTetrahedron()

void checkHighOrderTetrahedron ( const char *  cc,
GModel m,
std::vector< MElement * > &  bad,
double &  minJGlob 
)

Definition at line 1310 of file HighOrder.cpp.

Referenced by SetOrderN().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkHighOrderTriangles()

void checkHighOrderTriangles ( const char *  cc,
GModel m,
std::vector< MElement * > &  bad,
double &  minJGlob 
)

Definition at line 1261 of file HighOrder.cpp.

Referenced by SetOrderN().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeEquidistantParameters() [1/2]

static bool computeEquidistantParameters ( GEdge ge,
double  u0,
double  uN,
int  N,
double *  u,
double  underRelax 
)
static

Definition at line 66 of file HighOrder.cpp.

Referenced by getEdgeVerticesOnGeo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeEquidistantParameters() [2/2]

static bool computeEquidistantParameters ( GFace gf,
double  u0,
double  uN,
double  v0,
double  vN,
SPoint3 p0,
SPoint3 pN,
int  N,
bool  geodesic,
double *  u,
double *  v 
)
static

Definition at line 180 of file HighOrder.cpp.

Here is the call graph for this function:

◆ computeGLLParametersP6()

static bool computeGLLParametersP6 ( GEdge ge,
double  u0,
double  uN,
int  N,
double *  u,
double  underRelax 
)
static

Definition at line 120 of file HighOrder.cpp.

Referenced by getEdgeVerticesOnGeo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createMatLob2LagP6()

void createMatLob2LagP6 ( )

Definition at line 212 of file HighOrder.cpp.

Referenced by getEdgeVerticesOnGeo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteHighOrderVertices()

static void deleteHighOrderVertices ( GEntity e,
bool  onlyVisible,
bool  skipDiscrete 
)
static

Definition at line 1217 of file HighOrder.cpp.

Referenced by SetOrder1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEdgeVertices() [1/3]

static void getEdgeVertices ( GEdge ge,
MElement ele,
std::vector< MVertex * > &  ve,
edgeContainer edgeVertices,
bool  linear,
int  nPts = 1 
)
static

Definition at line 400 of file HighOrder.cpp.

Referenced by setHighOrder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEdgeVertices() [2/3]

static void getEdgeVertices ( GFace gf,
MElement ele,
std::vector< MVertex * > &  ve,
edgeContainer edgeVertices,
bool  linear,
int  nPts = 1 
)
static

Definition at line 438 of file HighOrder.cpp.

Here is the call graph for this function:

◆ getEdgeVertices() [3/3]

static void getEdgeVertices ( GRegion gr,
MElement ele,
std::vector< MVertex * > &  ve,
edgeContainer edgeVertices,
int  nPts = 1 
)
static

Definition at line 485 of file HighOrder.cpp.

Here is the call graph for this function:

◆ getEdgeVerticesOnGeo() [1/2]

static bool getEdgeVerticesOnGeo ( GEdge ge,
MVertex v0,
MVertex v1,
std::vector< MVertex * > &  ve,
int  nPts = 1 
)
static

Definition at line 247 of file HighOrder.cpp.

Referenced by getEdgeVertices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEdgeVerticesOnGeo() [2/2]

static bool getEdgeVerticesOnGeo ( GFace gf,
MVertex v0,
MVertex v1,
std::vector< MVertex * > &  ve,
int  nPts = 1 
)
static

Definition at line 332 of file HighOrder.cpp.

Here is the call graph for this function:

◆ getFaceVertices() [1/2]

static void getFaceVertices ( GFace gf,
MElement ele,
std::vector< MVertex * > &  newVertices,
faceContainer faceVertices,
bool  linear,
int  nPts = 1 
)
static

Definition at line 755 of file HighOrder.cpp.

Referenced by setHighOrder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFaceVertices() [2/2]

static void getFaceVertices ( GRegion gr,
MElement ele,
std::vector< MVertex * > &  newVertices,
faceContainer faceVertices,
int  nPts = 1 
)
static

Definition at line 859 of file HighOrder.cpp.

Here is the call graph for this function:

◆ getFaceVerticesOnExtrudedGeo()

static bool getFaceVerticesOnExtrudedGeo ( GFace gf,
const fullMatrix< double > &  coefficients,
const std::vector< MVertex * > &  vertices,
std::vector< MVertex * > &  vf 
)
static

Definition at line 685 of file HighOrder.cpp.

Referenced by getFaceVertices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFaceVerticesOnGeo()

static void getFaceVerticesOnGeo ( GFace gf,
const fullMatrix< double > &  coefficients,
const std::vector< MVertex * > &  vertices,
std::vector< MVertex * > &  vf 
)
static

Definition at line 704 of file HighOrder.cpp.

Referenced by getFaceVertices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMinMaxVert()

static bool getMinMaxVert ( MVertex v0,
MVertex v1,
MVertex *&  vMin,
MVertex *&  vMax 
)
inlinestatic

Definition at line 384 of file HighOrder.cpp.

Referenced by getEdgeVertices(), and setHighOrderFromExistingMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOrder()

static int getOrder ( GEntity ge)
static

Definition at line 1341 of file HighOrder.cpp.

Referenced by SetOrderN().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVolumeVertices()

static void getVolumeVertices ( GRegion gr,
MElement ele,
std::vector< MVertex * > &  newVertices,
int  nPts = 1 
)
static

Definition at line 903 of file HighOrder.cpp.

Referenced by setHighOrder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpVerticesInExistingEdge()

static void interpVerticesInExistingEdge ( GEntity ge,
const MElement edgeEl,
std::vector< MVertex * > &  veEdge,
int  nPts 
)
static

Definition at line 370 of file HighOrder.cpp.

Referenced by getEdgeVertices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpVerticesInExistingFace()

static void interpVerticesInExistingFace ( GEntity ge,
const fullMatrix< double > &  coefficients,
const std::vector< MVertex * > &  vertices,
std::vector< MVertex * > &  vFace 
)
static

Definition at line 668 of file HighOrder.cpp.

Referenced by getFaceVertices(), and getFaceVerticesOnExtrudedGeo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mylength()

static double mylength ( GEdge ge,
int  i,
double *  u 
)
static

Definition at line 49 of file HighOrder.cpp.

Referenced by myresid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ myresid()

static void myresid ( int  N,
GEdge ge,
double *  u,
fullVector< double > &  r,
double *  weight = nullptr 
)
static

Definition at line 54 of file HighOrder.cpp.

Referenced by computeEquidistantParameters(), and computeGLLParametersP6().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reorientQuadPoints()

static void reorientQuadPoints ( std::vector< MVertex * > &  vtcs,
int  orientation,
bool  swap,
int  order 
)
static

Definition at line 547 of file HighOrder.cpp.

Referenced by getFaceVertices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reorientTrianglePoints()

static void reorientTrianglePoints ( std::vector< MVertex * > &  vtcs,
int  orientation,
bool  swap 
)
static

Definition at line 518 of file HighOrder.cpp.

Referenced by getFaceVertices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ retrieveFaceBoundaryVertices()

static int retrieveFaceBoundaryVertices ( int  k,
int  type,
int  nPts,
const std::vector< MVertex * > &  vCorner,
const std::vector< MVertex * > &  vEdges,
std::vector< MVertex * > &  v 
)
static

Definition at line 793 of file HighOrder.cpp.

Referenced by getFaceVertices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFirstOrder()

template<class T >
static void setFirstOrder ( GEntity e,
std::vector< T * > &  elements,
bool  onlyVisible,
bool  skipDiscrete 
)
static

Definition at line 1198 of file HighOrder.cpp.

Referenced by SetOrder1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setHighOrder() [1/9]

static void setHighOrder ( GEdge ge,
edgeContainer edgeVertices,
bool  linear,
int  nbPts = 1 
)
static

Definition at line 933 of file HighOrder.cpp.

Referenced by setHighOrder(), and SetOrderN().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setHighOrder() [2/9]

static void setHighOrder ( GFace gf,
edgeContainer edgeVertices,
faceContainer faceVertices,
bool  linear,
bool  incomplete,
int  nPts = 1 
)
static

Definition at line 1005 of file HighOrder.cpp.

Here is the call graph for this function:

◆ setHighOrder() [3/9]

static void setHighOrder ( GRegion gr,
edgeContainer edgeVertices,
faceContainer faceVertices,
bool  incomplete,
int  nPts = 1 
)
static

Definition at line 1148 of file HighOrder.cpp.

Here is the call graph for this function:

◆ setHighOrder() [4/9]

static MHexahedron* setHighOrder ( MHexahedron h,
GRegion gr,
edgeContainer edgeVertices,
faceContainer faceVertices,
bool  incomplete,
int  nPts 
)
static

Definition at line 1054 of file HighOrder.cpp.

Here is the call graph for this function:

◆ setHighOrder() [5/9]

static MPrism* setHighOrder ( MPrism p,
GRegion gr,
edgeContainer edgeVertices,
faceContainer faceVertices,
bool  incomplete,
int  nPts 
)
static

Definition at line 1096 of file HighOrder.cpp.

Here is the call graph for this function:

◆ setHighOrder() [6/9]

static MPyramid* setHighOrder ( MPyramid p,
GRegion gr,
edgeContainer edgeVertices,
faceContainer faceVertices,
bool  incomplete,
int  nPts 
)
static

Definition at line 1132 of file HighOrder.cpp.

Here is the call graph for this function:

◆ setHighOrder() [7/9]

static MQuadrangle* setHighOrder ( MQuadrangle q,
GFace gf,
edgeContainer edgeVertices,
faceContainer faceVertices,
bool  linear,
bool  incomplete,
int  nPts 
)
static

Definition at line 971 of file HighOrder.cpp.

Here is the call graph for this function:

◆ setHighOrder() [8/9]

static MTetrahedron* setHighOrder ( MTetrahedron t,
GRegion gr,
edgeContainer edgeVertices,
faceContainer faceVertices,
bool  incomplete,
int  nPts 
)
static

Definition at line 1031 of file HighOrder.cpp.

Here is the call graph for this function:

◆ setHighOrder() [9/9]

static MTriangle* setHighOrder ( MTriangle t,
GFace gf,
edgeContainer edgeVertices,
faceContainer faceVertices,
bool  linear,
bool  incomplete,
int  nPts 
)
static

Definition at line 953 of file HighOrder.cpp.

Here is the call graph for this function:

◆ setHighOrderFromExistingMesh() [1/2]

static void setHighOrderFromExistingMesh ( GEdge ge,
edgeContainer edgeVertices 
)
static

Definition at line 1348 of file HighOrder.cpp.

Referenced by SetOrderN().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setHighOrderFromExistingMesh() [2/2]

static void setHighOrderFromExistingMesh ( GFace gf,
edgeContainer edgeVertices,
faceContainer faceVertices 
)
static

Definition at line 1366 of file HighOrder.cpp.

Here is the call graph for this function:

◆ SetOrder1()

void SetOrder1 ( GModel m,
bool  onlyVisible,
bool  skipDiscrete 
)

Definition at line 1233 of file HighOrder.cpp.

Referenced by GenerateMesh(), and GModel::setOrderN().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetOrderN()

void SetOrderN ( GModel m,
int  order,
bool  linear,
bool  incomplete,
bool  onlyVisible 
)

Definition at line 1396 of file HighOrder.cpp.

Referenced by GenerateMesh(), RefineMesh(), and GModel::setOrderN().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ lob2lagP6

fullMatrix<double>* lob2lagP6 = nullptr
static

Definition at line 210 of file HighOrder.cpp.

Referenced by createMatLob2LagP6(), and getEdgeVerticesOnGeo().