All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Betweenstruct.SimdInteraction,ReduceSimdInteraction,BarnesHutInteractionandTreeInteractiontraits.SequentialCompute,ParallelComputeandGpuComputetraits.sequential::Interactionsandsequential::Interactionsiterator structs.AccelerationandAccelerationSoftenedstructs.PositionandMasstraits.ToSimd,TreeData,AccelerationAt,AccelerationPairedandAccelerationGPUhelper traits for the implementation ofxInterationtraits forAccelerationandAccelerationSoftenedstructs.glam,ultravioletandnalgebrafeatures, required to enable implementations using these libraries.
- Renamed
ComputeMethodtrait toInteraction. - Built-in algorithms (
BruteForce,BarnesHut, ...) now generic over the interaction to compute which allows them to be more unified.BruteForceScalaris now named simplyBruteForceand can compute over scalar or simd types.BruteForceSimdconverts scalar types to simd types before computing interactions. - Renamed
ParticleTreetoRootedOrthtree,ParticleOrderedtoOrdered, andParticleReorderedtoReordered. These storages are also generic over their particles. - Renamed
PointMasstoGravitationalFieldand renamed fieldmasstom. Removed most methods which are now implemented with the helper traits. - Moved
sequential,parallelandgpumodules to the root of the crate.
Particletrait, replaced by thePositionandMasstraits.mathmodule and its traits.accelerationsmethod on iterators. This method implicitly collected the particles in aReorderedstorage, which is now required to be explicit.ParticleSystemstruct.BruteForceSoftenedvariants. Softening information is now carried by the interaction.
0.7.0 - 2024-03-21
ParticleSystem,ParticleTree,ParticleOrderedandParticleReorderedstructs used for storages in built-in compute methods.Array,Zero,One,Infinty,FloatOps,Float,IntoArray,FloatVectorOps,FloatVector,SIMD,SIMDElement,Reduce,FromPrimitiveandAsPrimitivetraits for math operation abstractions.force_scalar,force_simdmethods and various constructors forPointMass.ScalarArraytrait to bind aFloatVectorand an array forParticletoPointMassconversion.- Marker
ReorderedComputetrait. Softenedvariants for all compute methods.GpuResourcesstruct used forgpu::BruteForce.compute_shared.wgslcompute shader.MemoryStrategyto allow user selection between shared and global memory for massive particles within the compute shader used forgpu::BruteForce.
- Built-in compute methods implemented with the different provided storage structs.
ComputeMethodno longer generic overV.- Renamed
WgpuDatatoWgpuResourcesandwgpu_datamodule togpu_compute. gpu_compute(internals ofgpu::BruteForce) is public.gpu::BruteForceholds a reference to awgpu::Device,wgpu::Queueand a mutable reference to aGpuResources.write_particle_dataandread_accelerationsnot generic and useultraviolet::Vec3.read_accelerationsis async.- Update
wgputo 0.17 - Renamed
BruteForcecompute methods toBruteForceScalarfor better differentiation with simd variants. BruteForceSIMDgeneric over the lane count.build_nodetakespositionandcomputefunctions instead of using traits and computes a squareBoundingBox. Usebuild_node_withto provide a specificBoundingBox.Particletrait only has theArrayassociated type andpositionexpects this array type.- Deriving
Particlerequires#[dim]attribute. accelerationsreturns an iterator of arrays.- Merge
algorithmsandcompute_methodin one module with the name of the latter. - The size of
SizedOrthantis no longer generic and is instead aBoundingBox - 3D f32 vectors now fully scalar (unlike
glam::Vec3A). UseBruteForceSIMDcompute methods for simd benefits.
glamdependency.BruteForcePairsAltandBruteForcePairsCorecompute methods.MassiveAffected,MassiveAffectedSIMDandParticleSetstructs.Storage,Compute,TreeData,PositionableandBarnesHutTreetraits.acceleration_*andtotal_acceleration_*methods forPointMass.vectormodule and its members.
0.6.1 - 2023-07-19
acceleration_*andtotal_acceleration_*methods forPointMassto calculate the acceleration between particles of vectors implementingsimdandinternal.
- Built-in compute methods use
total_acceleration_*methods when applicable. sequential::BruteForcePairsis more efficient with less allocations.
0.6.0 - 2023-07-14
sequential::BruteForcePairsAltcompute method.parallel::BruteForceSIMDandsequential::BruteForceSIMDcompute methods making use of explicit SIMD instructions for major performance benefits on compatible platforms using ultraviolet.Tree,Node,SizedOrthant,BoundingBoxstructs andTreeData,Subdivide,Positionable,BarnesHutTreetraits backing BarnesHut compute methods.PointMassstruct representing a particle for built-in storages.internal::Scalarandinternal::Vectortraits to help genericity of built-in non-SIMD compute methods.simd::IntoVectorElement,simd::SIMD,simd::Scalar,simd::Vectorandsimd::ReduceAddtraits to help genericity of built-in SIMD compute methods.MassiveAffectedandParticleSetstructs implementingStoragebacking non-SIMD compute methods.MassiveAffectedSIMDstruct implementingStoragebacking SIMD compute methods.Storagetrait for inputs ofComputeMethod::compute.Computetrait extendingIteratorwith acomputemethod used by theAccelerationstrait.algorithmsmodule.
- renamed
sequential::BruteForcetosequential::BruteForcePairs.sequential::BruteForceis changed to a naive implementation iterating over all pairs. Computetrait renamed toAccelerations, no longer generic and only returns the computed accelerations. Zip its output with your collection instead.ComputeMethodgeneric over a storage and output type.ComputeMethod::computeexpects a storage type.ComputeMethodhasOutputassociated type returned byComputeMethod::compute.Vectortrait renamed toIntoVectorArrayand its associated type toVectorand moved tointernalsubmodule.InternalVectortrait renamed toVectorand moved withScalartrait tointernalsubmodule.compute_methodno longer glob imported in prelude.treemodule and submodules made public.vectormodule made public and part ofalgorithms.- Built-in compute methods moved to
algorithmsmodule.
Accelerationsiterator.MapComputetrait.
0.5.2 - 2023-05-16
- Use clone instead of copy for tuple particles.
NaNacceleration output when particles are in a certain mass order forgpu::BruteForce.
0.5.1 - 2023-03-22
iteratorsmodule renamed toiterator.
- Panic when
BarnesHuttree is empty.
0.5.0 - 2023-03-22
BarnesHutcompute method available for 2D and 3D float vectors. Available in sequential and parallel versions (only force computation is parallelized).- Tuples of a position and a gravitational parameter implement
Particle. accelerationsmethod for iterators of particles that returns the particle and its computed acceleration.map_accelerationsmethod for all iterators that returns the item and its computed acceleration using the mapped value (that implementsParticle).Accelerationsiterator obtained through theaccelerationsandmap_accelerationsmethods available on iterators.
ComputeMethod::computetakes slice of all the particles instead of two vectors, massive and massless.- Generic brute-force compute methods implemented directly using
Normedtrait for internal vectors. Vectortrait generic over full array type instead of dimension and scalar.- 2D f32 vectors use
glam::Vec2instead ofglam::Vec3A. gpu::BruteForceonly available for 3D f32 vectors.
ParticleSet. Useaccelerationsandmap_accelerationsmethods on iterators instead.
0.4.0 - 2023-02-22
result_mutmethod ofParticleSetthat returns mutable references and acceleration.ComputeMethodtrait defining how the acceleration of particles is computed.- Sequential, parallel and GPU
BruteForceComputeMethod implementations (structs in their respective modules). Scalartrait to represent components of a vector and the type of thegravitational parameter.
resultmethod ofParticleSetreturns immutable references. Useresult_mutinstead for mutable references.Vectortrait is now generic with a scalar to represent vector types of any float.- A dimension is no longer required to be bound to a given vector by the user.
resultandaccelerationsmethods ofParticleSettake aComputeMethodas a parameter.- Associated type
VectorofParticledoes not need to be wrapped inVectorDescriptor. Particleimplementations require associated typeScalar.
- #[dim] attribute and
particleattribute macro. Descriptor,IntoVectorandFromVectortraits.VectorDescriptorwrapper.
0.3.1 - 2022-11-26
- Improve documentation.
0.3.0 - 2022-10-01
- New useful methods for iterating over the
ParticleSet. particleattribute macro to deriveParticle. Its argument is the dimension of the vector type used for the position.Descriptortrait for the type of an arbitrary vector.VectorDescriptorstruct for an arbitrary vector and its dimension.FromVectorandIntoVectortraits to convert between an arbitrary vector and a SIMD vector for computations.
- Return tuple of
resultinParticleSetis reversed. - Associated type
VectorofParticlenow requires vector type to be wrapped with aVectorDescriptor, binding a dimension to it. - Deriving
Particlerequires #[dim] attribute to associate a dimension to the vector type used for the position. Vectortrait is now generic with a constant and only cares about From & Into arrays implementations.
VectorandNormedVectortraits.- Features
glam,nalgebraandcgmath. normed_vector!macro.
0.2.0 - 2022-09-17
VectorandNormedVectortraits to describe generic vectors.- Features
glam(default feature),nalgebraandcgmathimplementsVectorandNormedVectorfor their vector types. normed_vector!macro to easily implement (recommended)VectorandNormedVectorfor a user-defined vector.
Particlenow generic regarding its position type to allow for any vector to be used (any dimension, SIMD, ...). Uses newVectorandNormedVectortraits.
- Initial release.