gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
#include <assert.h>
#include <fcntl.h>
#include <limits.h>
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "libol1.h"
Go to the source code of this file.
Classes | |
struct | VerSct |
struct | EdgSct |
struct | TriSct |
struct | QadSct |
struct | TetSct |
struct | PyrSct |
struct | PriSct |
struct | HexSct |
struct | LnkSctPtr |
struct | MemSctPtr |
struct | MshThrSct |
struct | MshSct |
struct | OctSctPtr |
struct | BucSct |
struct | OctThrSct |
struct | TreSct |
Macros | |
#define | MaxItmOct 20 |
#define | MaxOctLvl 10 |
#define | MinGrdLvl 5 |
#define | ItmPerBuc 100 |
#define | MemBlkSiz 100000 |
#define | TngFlg 1 |
#define | AniFlg 2 |
#define | MaxThr 256 |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | POW(a) ((a)*(a)) |
#define | CUB(a) ((a)*(a)*(a)) |
Typedefs | |
typedef struct LnkSctPtr | LnkSct |
typedef struct MemSctPtr | MemSct |
typedef struct OctSctPtr | OctSct |
Functions | |
static void | SetMshBox (TreSct *, MshSct *) |
static void | AddVer (MshSct *, TreSct *, OctSct *, fpn *, fpn *) |
static void | AddEdg (MshSct *, TreSct *, OctSct *, fpn *, fpn *) |
static void | AddTri (MshSct *, TreSct *, OctSct *, fpn *, fpn *) |
static void | AddQad (MshSct *, TreSct *, OctSct *, fpn *, fpn *) |
static void | AddTet (MshSct *, TreSct *, OctSct *, fpn *, fpn *) |
static void | SubOct (MshSct *, TreSct *, OctSct *, fpn *, fpn *) |
static void | LnkItm (TreSct *, OctSct *, itg, itg, char) |
static OctSct * | GetCrd (OctSct *, itg, fpn *, fpn *, fpn *) |
static void | GetBox (TreSct *, OctSct *, itg, itg *, itg, itg *, char *, fpn[2][3], fpn, fpn *, fpn *, itg) |
static itg | BoxIntBox (fpn[2][3], fpn[2][3], fpn) |
static void | SetItm (MshSct *, itg, itg, itg, itg) |
static void | AniTri (MshSct *, itg) |
static void | SetSonCrd (itg, fpn *, fpn *, fpn *, fpn *) |
static void | GetOctLnk (MshSct *, itg, fpn *, itg *, fpn *, OctSct *, fpn *, fpn *, itg(void *, itg), void *, itg) |
static void | IntRayOct (TreSct *, MshSct *, fpn *, fpn *, itg *, fpn *, OctSct *, fpn *, fpn *, itg(void *, itg), void *, itg) |
static void | GetBucBox (TreSct *, BucSct *, fpn *, fpn *) |
static BucSct * | GetBucNgb (TreSct *, BucSct *, itg) |
static fpn | DisVerOct (fpn *, fpn *, fpn *) |
static itg | VerInsOct (fpn *, fpn *, fpn *) |
static char * | GetPtrItm (MshSct *, itg, itg) |
static void | BakMshItm (MshSct *) |
static void | RstMshItm (MshSct *) |
static itg | EdgIntEdg (EdgSct *, EdgSct *, VerSct *, fpn) |
static fpn | DisVerTri (MshSct *, fpn *, TriSct *) |
static fpn | DisVerQad (MshSct *, fpn *, QadSct *) |
static fpn | DisVerTet (MshSct *, fpn *, TetSct *) |
static fpn | GetTriSrf (TriSct *) |
static fpn | GetVolTet (TetSct *) |
static fpn | DisVerEdg (fpn *, EdgSct *) |
static void | GetTriVec (TriSct *, fpn *) |
static void | SetTriNrm (TriSct *) |
static void | SetTmpHex (HexSct *, fpn *, fpn *) |
static itg | VerInsTet (VerSct *, TetSct *, fpn) |
static itg | VerInsHex (VerSct *, HexSct *) |
static itg | EdgIntHex (EdgSct *, HexSct *, fpn) |
static itg | TriIntHex (TriSct *, HexSct *, fpn) |
static itg | QadIntHex (QadSct *, HexSct *, fpn) |
static itg | TetIntHex (TetSct *, HexSct *, fpn) |
static itg | EdgIntQad (HexSct *, itg, EdgSct *, VerSct *, fpn) |
static itg | EdgIntTri (TriSct *, EdgSct *, VerSct *, fpn) |
static itg | VerInsTri (TriSct *, VerSct *, fpn) |
static itg | VerInsEdg (EdgSct *, VerSct *, fpn) |
static void | SetEdgTng (EdgSct *) |
static fpn | GetTriAni (TriSct *) |
static void | PrjVerLin (fpn *, fpn *, fpn *, fpn *) |
static fpn | PrjVerPla (fpn *, fpn *, fpn *, fpn *) |
static void | LinCmbVec3 (fpn, fpn *, fpn, fpn *, fpn *) |
static void | ClrVec (fpn *) |
static void | CpyVec (fpn *, fpn *) |
static void | AddVec2 (fpn *, fpn *) |
static void | SubVec2 (fpn *, fpn *) |
static void | SubVec3 (fpn *, fpn *, fpn *) |
static void | AddScaVec1 (fpn, fpn *) |
static void | AddScaVec2 (fpn, fpn *, fpn *) |
static void | MulVec1 (fpn, fpn *) |
static void | MulVec2 (fpn, fpn *, fpn *) |
static void | NrmVec (fpn *) |
static void | CrsPrd (fpn *, fpn *, fpn *) |
static fpn | DotPrd (fpn *, fpn *) |
static fpn | dis (fpn *, fpn *) |
static fpn | DisPow (fpn *, fpn *) |
static fpn | DisVerPla (fpn *, fpn *, fpn *) |
static fpn | GetNrmVec (fpn *) |
static fpn | VerInsBox (fpn *, fpn *, fpn *, fpn) |
static itg | LinIntBox (fpn *, fpn *, fpn *, fpn *, fpn) |
static void | LinIntPla (fpn *, fpn *, fpn *, fpn *, fpn *) |
static void * | NewMem (TreSct *, size_t) |
static void | FreAllMem (TreSct *) |
int64_t | LolNewOctree (itg NmbVer, fpn *PtrCrd1, fpn *PtrCrd2, itg NmbEdg, itg *PtrEdg1, itg *PtrEdg2, itg NmbTri, itg *PtrTri1, itg *PtrTri2, itg NmbQad, itg *PtrQad1, itg *PtrQad2, itg NmbTet, itg *PtrTet1, itg *PtrTet2, itg NmbPyr, itg *PtrPyr1, itg *PtrPyr2, itg NmbPri, itg *PtrPri1, itg *PtrPri2, itg NmbHex, itg *PtrHex1, itg *PtrHex2, itg BasIdx, itg NmbThr) |
size_t | LolFreeOctree (int64_t OctIdx) |
itg | LolGetBoundingBox (int64_t OctIdx, itg typ, itg MaxItm, itg *ItmTab, fpn MinCrd[3], fpn MaxCrd[3], itg ThrIdx) |
static OctSct * | GetCrd (OctSct *oct, itg MaxLvl, fpn VerCrd[3], fpn MinCrd[3], fpn MaxCrd[3]) |
static void | GetBox (TreSct *tre, OctSct *oct, itg typ, itg *NmbItm, itg MaxItm, itg *ItmTab, char *FlgTab, fpn box[2][3], fpn eps, fpn MinCrd[3], fpn MaxCrd[3], itg ThrIdx) |
itg | LolGetNearest (int64_t OctIdx, itg typ, fpn *VerCrd, fpn *MinDis, fpn MaxDis, itg(UsrPrc)(void *, itg), void *UsrDat, itg ThrIdx) |
itg | LolIntersectSurface (int64_t OctIdx, fpn *VerCrd, fpn *VerTng, fpn *MinDis, fpn MaxDis, itg(UsrPrc)(void *, itg), void *UsrDat, itg ThrIdx) |
itg | LolProjectVertex (int64_t OctIdx, fpn *VerCrd, itg typ, itg MinItm, fpn *MinCrd, itg ThrIdx) |
static void | GetBucBox (TreSct *tre, BucSct *buc, fpn MinCrd[3], fpn MaxCrd[3]) |
static fpn | DisVerOct (fpn VerCrd[3], fpn MinCrd[3], fpn MaxCrd[3]) |
static void | GetOctLnk (MshSct *msh, itg typ, fpn VerCrd[3], itg *MinItm, fpn *MinDis, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3], itg(UsrPrc)(void *, itg), void *UsrDat, itg ThrIdx) |
static void | IntRayOct (TreSct *tre, MshSct *msh, fpn *crd, fpn *tng, itg *MinItm, fpn *MinDis, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3], itg(UsrPrc)(void *, itg), void *UsrDat, itg ThrIdx) |
static void | AddVer (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3]) |
static void | AddEdg (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3]) |
static void | AddTri (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3]) |
static void | AddQad (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3]) |
static void | AddTet (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3]) |
static void | SubOct (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3]) |
static void | SetSonCrd (itg SonIdx, fpn SonMin[3], fpn SonMax[3], fpn MinCrd[3], fpn MaxCrd[3]) |
static itg | VerInsOct (fpn VerCrd[3], fpn MinCrd[3], fpn MaxCrd[3]) |
static void | SetTmpHex (HexSct *hex, fpn MinCrd[3], fpn MaxCrd[3]) |
static fpn | DisVerTri (MshSct *msh, fpn VerCrd[3], TriSct *tri) |
static fpn | DisVerQad (MshSct *msh, fpn VerCrd[3], QadSct *qad) |
static fpn | DisVerEdg (fpn VerCrd[3], EdgSct *edg) |
static void | GetTriVec (TriSct *tri, fpn w[3]) |
static void | PrjVerLin (fpn VerCrd[3], fpn LinCrd[3], fpn LinTng[3], fpn ImgCrd[3]) |
static fpn | PrjVerPla (fpn VerCrd[3], fpn PlaCrd[3], fpn PlaNrm[3], fpn ImgCrd[3]) |
static fpn | DisVerPla (fpn VerCrd[3], fpn PlaCrd[3], fpn PlaNrm[3]) |
static fpn | dis (fpn a[3], fpn b[3]) |
static fpn | DisPow (fpn a[3], fpn b[3]) |
static void | SubVec2 (fpn u[3], fpn v[3]) |
static void | SubVec3 (fpn u[3], fpn v[3], fpn w[3]) |
static void | NrmVec (fpn u[3]) |
static fpn | DotPrd (fpn u[3], fpn v[3]) |
static void | CrsPrd (fpn u[3], fpn v[3], fpn w[3]) |
static void | LinCmbVec3 (fpn w1, fpn v1[3], fpn w2, fpn v2[3], fpn v3[3]) |
static void | ClrVec (fpn u[3]) |
static void | CpyVec (fpn u[3], fpn v[3]) |
static void | AddVec2 (fpn u[3], fpn v[3]) |
static void | AddScaVec1 (fpn s, fpn u[3]) |
static void | AddScaVec2 (fpn s, fpn u[3], fpn v[3]) |
static void | MulVec1 (const fpn w, fpn u[3]) |
static void | MulVec2 (fpn w, fpn u[3], fpn v[3]) |
static fpn | GetNrmVec (fpn u[3]) |
int64_t call() | lolnewoctree (itg *NmbVer, fpn *VerTab1, fpn *VerTab2, itg *NmbEdg, itg *EdgTab1, itg *EdgTab2, itg *NmbTri, itg *TriTab1, itg *TriTab2, itg *NmbQad, itg *QadTab1, itg *QadTab2, itg *NmbTet, itg *TetTab1, itg *TetTab2, itg *NmbPyr, itg *PyrTab1, itg *PyrTab2, itg *NmbPri, itg *PriTab1, itg *PriTab2, itg *NmbHex, itg *HexTab1, itg *HexTab2, itg *BasIdx, itg *NmbThr) |
int64_t call() | lolfreeoctree (int64_t *OctIdx) |
itg call() | lolgetboundingbox (int64_t *OctIdx, itg *typ, itg *MaxItm, itg *ItmTab, fpn *MinCrd, fpn *MaxCrd, itg *ThrIdx) |
itg call() | lolgetnearest (int64_t *OctIdx, itg *typ, fpn *MinCrd, fpn *MinDis, fpn *MaxDis, void *UsrPrc, void *UsrDat, itg *ThrIdx) |
Variables | |
static const itg | TetEdg [6][2] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} } |
static const itg | TetFac [4][3] = { {1,2,3}, {2,0,3}, {3,0,1}, {0,2,1} } |
static const itg | TetFacEdg [4][3] = { {5,4,3}, {2,5,1}, {0,4,2}, {3,1,0} } |
static const itg | tvpe [12][2] |
static const itg | tvpf [6][4] |
|
static |
|
static |
Referenced by DisVerTet(), EdgIntEdg(), EdgIntQad(), EdgIntTri(), GetCrd(), LolProjectVertex(), SetItm(), and SetMshBox().
Referenced by DisVerTri(), GetTriVec(), and VerInsTri().
Referenced by SurfaceProjector::closestPoint(), DisVerEdg(), EdgIntEdg(), and LolProjectVertex().
Referenced by DisVerEdg(), DisVerOct(), DisVerTet(), DisVerTri(), GetOctLnk(), GetTriAni(), IntRayOct(), and VerInsEdg().
Referenced by GetOctLnk(), LolGetNearest(), and LolIntersectSurface().
Referenced by EdgIntQad(), EdgIntTri(), and TriIntHex().
Definition at line 2601 of file libol1.c.
Referenced by GetOctLnk().
Referenced by DisVerPla(), DisVerTri(), IntRayOct(), LinIntPla(), PrjVerLin(), PrjVerPla(), VerInsEdg(), and VerInsTri().
Definition at line 2462 of file libol1.c.
Referenced by EdgIntQad(), and EdgIntTri().
Definition at line 2267 of file libol1.c.
Referenced by EdgIntHex(), TetIntHex(), and TriIntHex().
Definition at line 2340 of file libol1.c.
Referenced by TetIntHex(), and TriIntHex().
|
static |
Definition at line 3008 of file libol1.c.
Referenced by LolFreeOctree().
Referenced by LolGetNearest(), and LolIntersectSurface().
Definition at line 1091 of file libol1.c.
Referenced by LolGetNearest(), and LolIntersectSurface().
Definition at line 1428 of file libol1.c.
Referenced by GetOctLnk(), LolProjectVertex(), SetItm(), and SetMshBox().
Definition at line 2628 of file libol1.c.
Referenced by GetTriAni().
Definition at line 2642 of file libol1.c.
Referenced by VerInsTet().
Referenced by EdgIntEdg(), EdgIntQad(), EdgIntTri(), GetCrd(), LinIntPla(), PrjVerLin(), SetMshBox(), and SetSonCrd().
Definition at line 1970 of file libol1.c.
Referenced by IntRayOct(), and LolIntersectSurface().
|
static |
Definition at line 2001 of file libol1.c.
Referenced by IntRayOct(), and LinIntBox().
int64_t call() lolfreeoctree | ( | int64_t * | OctIdx | ) |
size_t LolFreeOctree | ( | int64_t | OctIdx | ) |
Definition at line 623 of file libol1.c.
Referenced by SurfaceProjector::clear(), lolfreeoctree(), and libOLwrapper::~libOLwrapper().
itg LolGetBoundingBox | ( | int64_t | OctIdx, |
itg | typ, | ||
itg | MaxItm, | ||
itg * | ItmTab, | ||
fpn | MinCrd[3], | ||
fpn | MaxCrd[3], | ||
itg | ThrIdx | ||
) |
Definition at line 639 of file libol1.c.
Referenced by libOLwrapper::elementsInsideBoundingBox(), and lolgetboundingbox().
itg LolGetNearest | ( | int64_t | OctIdx, |
itg | typ, | ||
fpn * | VerCrd, | ||
fpn * | MinDis, | ||
fpn | MaxDis, | ||
itg(UsrPrc)(void *, itg) | , | ||
void * | UsrDat, | ||
itg | ThrIdx | ||
) |
Definition at line 786 of file libol1.c.
Referenced by SurfaceProjector::closestPoint(), and lolgetnearest().
int64_t call() lolnewoctree | ( | itg * | NmbVer, |
fpn * | VerTab1, | ||
fpn * | VerTab2, | ||
itg * | NmbEdg, | ||
itg * | EdgTab1, | ||
itg * | EdgTab2, | ||
itg * | NmbTri, | ||
itg * | TriTab1, | ||
itg * | TriTab2, | ||
itg * | NmbQad, | ||
itg * | QadTab1, | ||
itg * | QadTab2, | ||
itg * | NmbTet, | ||
itg * | TetTab1, | ||
itg * | TetTab2, | ||
itg * | NmbPyr, | ||
itg * | PyrTab1, | ||
itg * | PyrTab2, | ||
itg * | NmbPri, | ||
itg * | PriTab1, | ||
itg * | PriTab2, | ||
itg * | NmbHex, | ||
itg * | HexTab1, | ||
itg * | HexTab2, | ||
itg * | BasIdx, | ||
itg * | NmbThr | ||
) |
int64_t LolNewOctree | ( | itg | NmbVer, |
fpn * | PtrCrd1, | ||
fpn * | PtrCrd2, | ||
itg | NmbEdg, | ||
itg * | PtrEdg1, | ||
itg * | PtrEdg2, | ||
itg | NmbTri, | ||
itg * | PtrTri1, | ||
itg * | PtrTri2, | ||
itg | NmbQad, | ||
itg * | PtrQad1, | ||
itg * | PtrQad2, | ||
itg | NmbTet, | ||
itg * | PtrTet1, | ||
itg * | PtrTet2, | ||
itg | NmbPyr, | ||
itg * | PtrPyr1, | ||
itg * | PtrPyr2, | ||
itg | NmbPri, | ||
itg * | PtrPri1, | ||
itg * | PtrPri2, | ||
itg | NmbHex, | ||
itg * | PtrHex1, | ||
itg * | PtrHex2, | ||
itg | BasIdx, | ||
itg | NmbThr | ||
) |
Definition at line 343 of file libol1.c.
Referenced by SurfaceProjector::initialize(), libOLwrapper::libOLwrapper(), and lolnewoctree().
|
static |
Definition at line 2987 of file libol1.c.
Referenced by LnkItm(), LolNewOctree(), and SubOct().
|
static |
Referenced by DisVerEdg(), EdgIntEdg(), LolProjectVertex(), and VerInsEdg().
Referenced by DisVerTri(), LolProjectVertex(), and VerInsTri().
|
static |
|
static |
Definition at line 2719 of file libol1.c.
Referenced by EdgIntQad(), EdgIntTri(), SetItm(), and VerInsTri().
Definition at line 1302 of file libol1.c.
Referenced by GetBox(), GetOctLnk(), IntRayOct(), LolNewOctree(), LolProjectVertex(), and SubOct().
Definition at line 1438 of file libol1.c.
Referenced by LolNewOctree().
Referenced by AddEdg(), AddQad(), AddTet(), AddTri(), AddVer(), GetCrd(), GetOctLnk(), IntRayOct(), and SubOct().
|
static |
Referenced by DisVerPla(), DisVerTri(), GetTriVec(), LinIntPla(), PrjVerLin(), PrjVerPla(), SetEdgTng(), VerInsEdg(), and VerInsTri().
Definition at line 2016 of file libol1.c.
Referenced by LinIntBox().
Definition at line 2515 of file libol1.c.
Referenced by EdgIntEdg(), LolProjectVertex(), and VerInsTri().
Definition at line 2248 of file libol1.c.
Referenced by EdgIntHex(), EdgIntQad(), GetBox(), TetIntHex(), and TriIntHex().
Definition at line 2208 of file libol1.c.
Referenced by DisVerTet(), and TetIntHex().
Definition at line 2411 of file libol1.c.
Referenced by EdgIntTri(), IntRayOct(), LolProjectVertex(), and VerInsTet().
|
static |
Definition at line 330 of file libol1.c.
Referenced by LolNewOctree(), and VerInsTet().
|
static |
Definition at line 331 of file libol1.c.
Referenced by LolNewOctree(), and VerInsTet().
|
static |
Definition at line 332 of file libol1.c.
Referenced by LolNewOctree().
|
static |
Definition at line 333 of file libol1.c.
Referenced by LolNewOctree().
|
static |
Definition at line 335 of file libol1.c.
Referenced by LolNewOctree().