Giter Site home page Giter Site logo

skhayrulin / x_engine Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 140 KB

I'm planning collect here all my work on rewrote version of Sibernetic engine

License: MIT License

C 3.39% C++ 95.78% Makefile 0.58% Python 0.25%
cpp cpp11 cpp14 engine opencl sibernetic simulation

x_engine's Introduction

Hello World

x_engine's People

Contributors

kuyantsev-vp avatar skhayrulin avatar

Watchers

 avatar  avatar

Forkers

kuyantsev-vp

x_engine's Issues

Add unit tests

Tests list:

  • Check configuration test not correct number of particles not different amount of position and velocity of particles should give me an error.
  • Not right type for particles position in file and
  • Error with cl code
    ....

Add throwing an exception here

If there were some problems during compiling the kernel source (we fall into the initialize_ocl in line 37), no ocl_solvers would be created, but execution would be continued. As a result, we would fall into make_partition and get division by zero in line 90 (in sph_model.hpp).

std::cout << ex.what() << std::endl;

Should variable size_t end be minus 1 ?

May be this line should be like this:
partitions.push_back(partition{0, static_cast<size_t>(size() - 1)});
?

If we have one device and we are trying to get last the last element in partition, it's desirable to write
model->get_particles().at(p.end);
which results in seg fault.
May be I'm wrong?

partitions.push_back(partition{0, static_cast<size_t>(size())});

swap these lines: size_t cell_id; size_t type_;

size_t cell_id;

In the structure particle (in particle.h) the sequence of feilds is:

container pos;
container vel;
size_t type;
size_t cell_id;
size_t get_dim() const { return dim; }
T density;
T pressure;

In the structure particle_f (and also in particle_d) the sequence of feilds is:

float4 pos;
float4 vel;
size_t cell_id;
size_t type_;
float density;
float pressure;

As you can see, the feilds cell_id and type are written in a different order. That is the reason of data consistency problem.

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.