Skip to content

refactor Probes and Interactors

Hkorb requested to merge irmb/uppsala/VirtualFluids_dev:RefactorProbe into develop

As discussed in #185 (closed), para had two vectors, actuators and probes, that contained PreCollisionInteractors. To better differentiate probes and actuators, this MR separates all classes that belong into the probes vector into a new base class called Sampler (Not all classes inherit from Probe, so I had to introduce another layer). The mebers of para have been renamed interactors and samplers, and the getter and setter methods have been renamed accordingly.

The second point of #185 (closed), the incomplete initialization of PreCollisionInteractors is also fixed in this MR. That means that all classes inheriting from PreCollisionInteractor and Sampler need to set a reference to para and the cudaMemoryManager in their constructor.

I also included some cleanup in this MR. I changed the computation of the averages to a more stable version, resulting in failing regression tests. I have gone through them and everything looks okay, initially the differences are on the order of 10^-5, i.e. machine precision. (but then accumulate, leading to large differences in the variances in some cases)

This also includes a fix for #150 (closed)

This MR also refactors the probes. PointProbe and PlaneProbe have been removed and the functionality was moved to Probe. Both points and planes can be added. The behvaiour for points has changed: instead of trilinear interpolation to the exact point coordinate provided, the sample point snaps to the next point in BSW direction. I dont think this functionality was really used by anyone.

Edited by Hkorb

Merge request reports

Loading