Пример #1
0
 protected override void ProcessBeforeFrame(IUniverse uni)
 {
     initialMomentums = uni.BodiesWithin(Volume).ToDictionary(b => b, b => b.Dynamics.P);
 }
Пример #2
0
 public T TakeMeasurement(IUniverse uni) => FinalizeFunc(uni.BodiesWithin(Volume).Aggregate(default(T), AccumulationFunc));
Пример #3
0
 public int TakeMeasurement(IUniverse uni) => uni.BodiesWithin(Volume).Count();
 public ContinuousDistribution TakeMeasurement(IUniverse uni) => new ContinuousDistribution(uni.BodiesWithin(Volume).Select(b => b.Dynamics.Kinematics.V.Magnitude));
Пример #5
0
        protected override double ProcessAfterFrame(IUniverse uni)
        {
            double massAfter = uni.BodiesWithin(Volume).Sum(b => b.Dynamics.Mass);

            return(massAfter - massBefore);
        }
Пример #6
0
 protected override void ProcessBeforeFrame(IUniverse uni)
 {
     massBefore = uni.BodiesWithin(Volume).Sum(b => b.Dynamics.Mass);
 }