ToFuProject / tofu

Project for an open-source python library for synthetic diagnostics and tomography for Fusion devices
https://tofuproject.github.io/tofu/index.html
MIT License
72 stars 11 forks source link

Solid angles particle - M points no unit vector - cython for large plasma sub-domain toroidal integral #73

Closed Didou09 closed 3 years ago

Didou09 commented 5 years ago

Cython is necessary here for memory / speed performance.

We will intergate toroidally over a potentially large plasma sub-domain (or the whole domain). It implies:

Important : for each point, only compute solid angle if there is no vignetting due to structral elements! i.e.: use algorithms for LOS_intersection where appropriate ! (to be discussed)

The output should be a 2D (R,Z) map of toroidally integrated solid angles (one map for each M point on the trajectory, so in fact the output should be a (M,R,Z) array).

The question of where to put the loop on the M points remains to be determined. Maybe inside (innermost loop) so the parallelization is done on R ?

lasofivec commented 3 years ago

With "sub domain" you mean there should be a vignetting done right ?

Didou09 commented 3 years ago

"Sub-domain" refers to the fact that the plasma volume is defined like for the plasma volume sampling routines: from sub-domains (intervals in R, Z, phi) or from indices. See for example tofu.geom._GG._Ves_Vmesh_Tor_SubFromD_cython() The idea is realy to re-use what you've done already, same philosophy.

And yes, there should be some vignetting done from structural elements. An example of that (optional blocking/vignetting) is in tofu.geom._comp_solidangles.calc_solidangle_particle()