Code Monkey home page Code Monkey logo

geometryprimitives.jl's Introduction

GeometryPrimitives

CI Codecov

This package provides a set of geometric primitive types (balls, cuboids, cylinders, and so on) and operations on them designed to enable piecewise definition of functions, especially for finite-difference and finite-element simulations, in the Julia language.

For example, suppose that you are discretizing a PDE like the Poisson equation ∇⋅c∇u = f, and you want to provide a simple user interface for the user to specify the function c(x). In many applications, c will be piecewise constant, and you want to be able to specify c = 1 in one box, c = 2 in some cylinders, etcetera. The GeometryPrimitives package allows the user to provide a list of shapes with associated data (in this case, the value of c) to define such a c(x).

Furthermore, the application to discretized simulations imposes a couple of additional requirements:

  • One needs to be able to evaluate c(x) a huge number of times (once for every point on a grid). So, we provide a fast O(log n) K-D tree data structure for rapid searching of shapes.

  • Often, one wants to compute the average of c(x) over a voxel, so we provide routines for rapid approximate voxel averages.

  • Often, one needs not only the value c(x) but the normal vector to the nearest shape, so we provide normal-vector computation.

This package was inspired by the geometry utilities in Steven G. Johnson's [Libctl] (http://ab-initio.mit.edu/wiki/index.php/Libctl) package.

geometryprimitives.jl's People

Contributors

stevengj avatar wsshin avatar

Watchers

 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.