Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to parry2d #251

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/rustbca_compile_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ jobs:
cargo run --release 0D examples/boron_nitride_0D.toml
./target/release/RustBCA 0D examples/titanium_dioxide_0D.toml
./target/release/RustBCA 1D examples/layered_geometry_1D.toml
cat 2000.0eV_0.0001deg_He_TiO2_Al_Sisummary.output
echo "layered geometry 1D:"; cat 2000.0eV_0.0001deg_He_TiO2_Al_Sisummary.output
./target/release/RustBCA examples/layered_geometry.toml
cat 2000.0eV_0.0001deg_He_TiO2_Al_Sisummary.output
echo "layered geometry 2D:"; cat 2000.0eV_0.0001deg_He_TiO2_Al_Sisummary.output
./target/release/RustBCA SPHERE examples/boron_nitride_sphere.toml
cargo run --release --features parry3d TRIMESH examples/tungsten_twist_trimesh.toml
./target/release/RustBCA examples/boron_nitride_wire.toml
cat boron_nitride_summary.output
echo "boron nitride 2D:"; cat boron_nitride_summary.output
./target/release/RustBCA HOMOGENEOUS2D examples/boron_nitride_wire_homogeneous.toml
cat boron_nitride_h_summary.output
echo "boron nitride 2D Homogeneous:"; cat boron_nitride_h_summary.output
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ default-run = "RustBCA"
authors = ["Jon Drobny <drobny2@illinois.edu>", "Jon Drobny <jdrobny@tae.com>"]
edition = "2021"



[[bin]]
name = "RustBCA"
path = "src/main.rs"
Expand All @@ -21,13 +23,13 @@ toml = "0.7.4"
anyhow = "1.0.71"
itertools = "0.10.5"
rayon = "1.7.0"
geo = {version = "0.25", optional = false}
indicatif = {version = "0.15.0", features=["rayon"]}
serde = { version = "1.0.163", features = ["derive"] }
hdf5 = {version = "0.7.1", optional = true}
rcpr = { git = "https://github.com/drobnyjt/rcpr", optional = true}
ndarray = {version = "0.14.0", features = ["serde"], optional = true}
parry3d-f64 = {optional = true, version="0.2.0"}
parry2d-f64 = {optional = false, version="*"}

[dependencies.pyo3]
version = "0.19.0"
Expand All @@ -41,7 +43,7 @@ float-cmp = "0.8.0"
lto = "fat"
codegen-units = 1
opt-level = 3
debug = false
debug = 1

[features]
hdf5_input = ["hdf5"]
Expand Down
5 changes: 3 additions & 2 deletions examples/layered_geometry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Use with 2D geometry option only
[options]
name = "2000.0eV_0.0001deg_He_TiO2_Al_Si"
track_trajectories = false
track_trajectories = true
track_recoils = true
track_recoil_trajectories = false
write_buffer_size = 8000
Expand Down Expand Up @@ -54,7 +54,8 @@ points = [[0.0, -0.5], [0.01, -0.5], [0.04, -0.5], [0.5, -0.5], [0.5, 0.5], [0.0
triangles = [[0, 1, 6], [0, 6, 7], [1, 2, 5], [1, 5, 6], [2, 3, 4], [2, 4, 5]]
densities = [ [ 3.0e+10, 6.0e+10, 0.0, 0.0,], [ 3.0e+10, 6.0e+10, 0.0, 0.0,], [ 0.0, 0.0, 6.026e+10, 0.0,], [ 0.0, 0.0, 6.026e+10, 0.0,], [ 0.0, 0.0, 0.0, 4.996e+10,], [ 0.0, 0.0, 0.0, 4.996e+10,],]
boundary = [0, 3, 4, 7]
simulation_boundary_points = [ [ 0.6, -0.6,], [ -0.1, -0.6,], [ -0.1, 0.6,], [ 0.6, 0.6,], [ 0.6, -0.6,],]
#simulation_boundary_points = [ [ 0.6, -0.6,], [ -0.1, -0.6,], [ -0.1, 0.6,], [ 0.6, 0.6,],]
simulation_boundary_points = [[0.6, 0.6], [-0.1, 0.6], [-0.1, -0.6], [0.6, -0.6]]
electronic_stopping_correction_factors = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
energy_barrier_thickness = 2.2E-4

Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_interaction_potentials.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ length_unit = "MICRON"
triangles = [ [ 0.0, 0.01, 0.0, 0.5, 0.5, -0.5,], [ 0.0, 0.01, 0.01, -0.5, 0.5, -0.5,], [ 0.01, 0.01, 0.04, -0.5, 0.5, -0.5,], [ 0.01, 0.04, 0.04, 0.5, 0.5, -0.5,], [ 0.04, 0.5, 0.04, 0.5, 0.5, -0.5,], [ 0.04, 0.5, 0.5, -0.5, 0.5, -0.5,],]
densities = [ [ 3.0e+10, 6.0e+10, 0.0, 0.0,], [ 3.0e+10, 6.0e+10, 0.0, 0.0,], [ 0.0, 0.0, 6.026e+10, 0.0,], [ 0.0, 0.0, 6.026e+10, 0.0,], [ 0.0, 0.0, 0.0, 4.996e+10,], [ 0.0, 0.0, 0.0, 4.996e+10,],]
material_boundary_points = [ [ 0.0, 0.5,], [ 0.5, 0.5,], [ 0.5, -0.5,], [ 0.0, -0.5,],]
simulation_boundary_points = [ [ 0.6, -0.6,], [ -0.1, -0.6,], [ -0.1, 0.6,], [ 0.6, 0.6,], [ 0.6, -0.6,],]
simulation_boundary_points = [ [ 0.6, -0.6,], [ -0.1, -0.6,], [ -0.1, 0.6,], [ 0.6, 0.6,],]
electronic_stopping_correction_factors = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]

[material_parameters]
Expand Down
4 changes: 2 additions & 2 deletions src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ use super::*;
pub enum MaterialType {
MESH0D(material::Material<geometry::Mesh0D>),
MESH1D(material::Material<geometry::Mesh1D>),
MESH2D(material::Material<geometry::Mesh2D>),
MESH2D(material::Material<geometry::ParryMesh2D>),
SPHERE(material::Material<sphere::Sphere>),
#[cfg(feature = "parry3d")]
BALL(material::Material<parry::ParryBall>),
#[cfg(feature = "parry3d")]
TRIMESH(material::Material<parry::ParryTriMesh>),
HOMOGENEOUS2D(material::Material<geometry::HomogeneousMesh2D>)
HOMOGENEOUS2D(material::Material<geometry::ParryHomogeneousMesh2D>)
}

#[derive(Deserialize, PartialEq, Clone, Copy)]
Expand Down
Loading
Loading