Trait nyx_space::io::gravity::GravityPotentialStor[][src]

pub trait GravityPotentialStor where
    Self: Clone + Sized + Sync
{ fn max_degree_n(&self) -> usize;
fn max_order_m(&self) -> usize;
fn cs_nm(&self, degree: usize, order: usize) -> (f64, f64); }
Expand description

All gravity potential storage backends must implement this trait in order to be used in the provided dynamics. Currently, only a HashMap based storage is provided. However, the use of this trait enables any application from storing the gravity potential in another way, such as a remote database.

Required methods

Returns the maximum degree of this gravity potential storage (Jn=J2,J3…)

Returns the maximum order of this gravity potential storage (Jnm=Jn2,Jn3…)

Returns the C_nm and S_nm for the provided order and degree.

WARNING: It’s up to the caller to ensure that no degree or order greater than stored in this GravityPotentialStor is requested. Depending on the implementor, this call might panic!.

Implementors