Giter VIP home page Giter VIP logo

pink-fluid's People

Contributors

emiax avatar kallekrantz avatar

Watchers

 avatar  avatar

pink-fluid's Issues

getCell sometimes returns nan-values when looping velocity field

Failes with the following error

Assertion failed: (x >= genType(0)), function sqrt, 
file /Users/kallekrantz/Code/pink-fluid/build/external/glm/external/glm/src/
glm/glm/detail/func_exponential.inl, 
line 149.
fish: Job 1, 'and ./pink-fluid' terminated by signal SIGABRT (Abort)

Find the closest positions

Find the closest positions to the surface. This is done when initialising the algorithm. The book and separate papers are unclear on how to sweep for the initialising grid. The naive way to find this, would be to use an O(n^2) algorithm.

However, that would leave the rest of the algorithm pointless.

Moving the level set (Interpolation improvement)

In order to fully utilise the Level set, we need to be able to advect it like any other quantity. The book recommends using a better interpolation scheme for this (Catmull Rom or better).

We do not currently have this possibility. And this improvement would give higher precision results in all parts of the simulation. Issues are however the implementation in 2d vs 1d. As most examples and implementations are in 1d are.

Related wikipedia link: Catmull Rom Spline

Implement loop order.

There are two possible loop schemes, one is called fast march, the other is fast sweep.

Fast sweep has better time complexity in a naive implementation (O(n) compared to O(n*log(n) for fast march). However, fast march allows for better optimisations later on. Fast march does need a priority queue in order to work.

Implement main algorithm

    • Find the closest locations on the surface #4
    • Set these to their signed distance
    • Set the rest to unknown
    • Loop through the entire grid using a chosen method (Fast march or Fast sweep), resulting point is i,j,k #3
    • Find the neighbours signed distance to the surface, if Xi,j,k is closer than any neighbour, set Xi,j,k to unknown.
    • Otherwise, set Xi,j,k to the smallest distance of the neighbours and set Xi,j,k to inside the surface or outside the surface.

There are some other issues related to this, for example, moving the level set (Requires better interpolation scheme for the advection #5 ) and solid boundary conditions.

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.