Coder Social home page Coder Social logo

dynamecs's People

Contributors

andlon avatar w1th0utnam3 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

dynamecs's Issues

Avoid using `any::type_name()`

Currently we use type_name() for identifying systems. However, this has several issues. For one, it's not necessarily unique for two different types T1, T2. However, a potentially bigger problem is that the same type could technically produce different names when type_name() is called from different locations in a program. Certainly there are no guarantees here.

It appears a better way might be to make a tag available in the Component trait, which can be used to produce storage tags. I'm thinking something like domain.ComponentName. Then we can provide a derive(Component) macro which allows you to specify domain and derives ComponentName from the type name.

Move Entity creation to Universe

This is necessary so that Systems that use entities as references consistently work with the same entity no matter if the universe was initialized by the scenario initializer or restored from a checkpoint.

Store more than just universe in checkpoints

We also need to store scenario config, maybe app settings etc. in the serialized checkpoint data.

Should also warn or even outright refuse to continue if there are mismatches.

Best idea so far: Refuse to run, but add CLI flag to override this behavior and run anyway (but log the mismatch with a warning).

Provide convenience register_insert_components functions and similar

Currently inserting several components for the same entity is very verbose:

universe.register_insert_component(obj, Name::from("box"));
universe.register_insert_component(obj, initial_state);
universe.register_insert_component(
    obj,
    MassDistribution::for_mesh_with_uniform_density(&mesh, density),
);
universe.register_insert_component(
    obj,
    ElasticSolidMaterial::for_mesh_with_uniform_parameters(&mesh, NeoHookeanMaterial, lame),
);
universe.register_insert_component(obj, FiniteElementDomain { mesh });

We could provide [register_]insert_components functions that allow you to simplify the above to

universe.register_insert_components(obj, (
    Name::from("box"),
    initial_state,
    MassDistribution::for_mesh_with_uniform_density(&mesh, density),
    ElasticSolidMaterial::for_mesh_with_uniform_parameters(&mesh, NeoHookeanMaterial, lame),
    FiniteElementDomain { mesh }
));

Make sure to log panics

Need to install a custom panic handler that logs panics (and possibly flushes log writers if necessary)

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.