GithubHelp home page GithubHelp logo

yuanliumaker / gpu_cdt_refine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenzhenghai/gpu_cdt_refine

0.0 0.0 0.0 41.76 MB

A 2D CDT Refinement Software on GPU

License: Other

C++ 71.05% C 7.99% Cuda 20.96%

gpu_cdt_refine's Introduction

GPU_CDT_Refine

A 2D CDT Refinement Software on GPU

Project Website: https://www.comp.nus.edu.sg/~tants/gqm.html

Paper: Computing Delaunay Refinement Using the GPU. Z. Chen, M. Qi, and T.S. Tan. The 2017 ACM Symposium on Interactive 3D Graphics and Games, 25-27 Feb, San Francisco, CA, USA. (PDF)

  • A NVIDIA GPU is required since this project is implemented using CUDA
  • The development environment: Visual Studio 2010 and CUDA 7.5 (Need to include both CUDA SDK and Sample. The later is for timing routines. Changes for paths might be needed for Visual Studio project setting. Please use x64 and Release mode.)

Refinement Routine (located in refine.h and refine.cu):
void GPU_Refine_Quality(
     triangulateio *input,
     triangulateio *result,
     double theta,
     InsertPolicy insertpolicy,
     DeletePolicy deletepolicy,
     int mode,
     int debug_iter,
     PStatus **ps_debug,
     TStatus **ts_debug)

triangulateio *input:
Input is a constrained Delaunay triangulation. Use the same data type "triangulateio" as Triangle software (https://www.cs.cmu.edu/~quake/triangle.html), see triangle.h and triangle.cpp for more information. GenerateRandomInput routine in mesh.h and mesh.cpp is able to generate a random point set and a random segment set, then compute the CDT of them as an input. You can make your own input as well. Some input samples are also given in input folder.

triangulateio *result:
A pointer. Make sure it is not NULL. Its pointlist, trianglelist and segmentlist form the final refined CDT.

double theta:
Minimum allowable angle. Theoretically, it cannot be smaller than 20.7 degree. The triangle in final mesh wouldn't contain angle smaller than theta.

InsertPolicy insertpolicy:
Enumeration type defined in refine.h. It has two possible values: Circumcenter and Offcenter, which correspond to two different types of center to be inserted.

DeletePolicy deletepolicy:
Enumeration type defined in refine.h. It has not yet been used.

int mode:
Refinement mode. When mode is 1, Ruppert's mode is used, otherwise, Chew's.

int debug_iter:
Debug iteration number. For debug only.

PStatus **ps_debug:
The debug pointer of the status of point. For debug only.

TStatus **ts_debug:
The debug pointer of the status of triangle. For debug only.


Proceed to main.cpp to check how to call gpu refinement routine properly.

gpu_cdt_refine's People

Contributors

chenzhenghai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.