Skip to content

Conversation

drobnyjt
Copy link
Collaborator

…en created. First steps towards geometry agnosticism.

Fixes #75 #77 #80

Description

This is a major rewrite of all the geometry routines. The plan is as follows;

  1. write traits Mesh and MeshElement that do not explicitly have a dimensionality.
  2. make Material use the generic Mesh and MeshElement traits to separate the kind of geometry from the Material declaration
  3. Add either feature flags or input options to change the geometry. The first version should have 0D (Tridyn/SRIM with homogeneous target), 1D layers, 2D triangles, and one 3D geometry, likely spherical
  4. Write documentation and instructions for adding new geometries or potentially FFIs to call geometry routines from, say, a C library

Tests

cargo test and layered_geometry.toml have been run on this first commit.

drobnyjt and others added 14 commits February 27, 2021 09:45
…en created. First steps towards geometry agnosticism.
…on of the default input) to Material<T: Mesh> or Material<Mesh2D> where necessary. From now on, any struct that implements the Mesh trait can be used to create a Material. Neat!
…duces correct distributions, reflection coefficients, and sputtering yield.
… 3D. Removed old commented out code throughout, and added a couple why-comments.
…. This was very difficult, and it's not in an amazing state, but it works and it compiles. The worst offender is not knowing how to share associated types between traits, so to make the material I have to clone and use the entire input file to avoid a circular reference between the InputFile and Geometry traits.
…e that it works and reproduces equivalent results from Mesh2D. 3D targets are now possible (with a lot of dev work)!
added mesh_0D input file
… with the 0D feature, you just give the code an additional flag.
@drobnyjt
Copy link
Collaborator Author

drobnyjt commented Mar 2, 2021

This feature is now complete. Changes from last commit:

  1. Added new examples that use the 0D geometry
  2. Switched 0D geometry from a compile flag to a command-line argument (e.g., cargo run --release 0D examples/boron_nitride_0D.toml)
  3. abstracted out the entire physics loop from main() so that all main does is look at input arguments and then immediate go into a match to choose which geometry to run.

@drobnyjt drobnyjt merged commit c7402b3 into master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Triangle lists should follow GetDP-like structure

1 participant