adda icon indicating copy to clipboard operation
adda copied to clipboard

More accurate calculation of minimal computational box around the particle

Open GoogleCodeExporter opened this issue 9 years ago • 5 comments

This is a continuation of issue 123. Now the computational is determined before 
the full generation of the shape based on its proportions. In certain cases 
this can overestimate the actual dimensions of set of occupied dipoles. This 
doesn't effect the accuracy of the results, but the time of the simulation 
would decrease if minimal box enclosing the particle is used. 

So after the particle generation (filling of all non-void dipoles) the particle 
should be analyzed to derive the minimal enclosing box. This probably can be 
done during transition from arrays position_tmp, etc. to arrays position, etc. 
in MakeParticle().

This would also decrease the amount of problems for external routines 
processing shape files.

#123

Original issue reported on code.google.com by yurkin on 16 Feb 2011 at 3:11

GoogleCodeExporter avatar Aug 12 '15 07:08 GoogleCodeExporter

Original comment by yurkin on 16 Feb 2011 at 6:10

  • Changed title: More accurate calculation of minimal computational box around the particle

GoogleCodeExporter avatar Aug 12 '15 07:08 GoogleCodeExporter

Original comment by yurkin on 28 Apr 2013 at 3:52

  • Added labels: Priority-High
  • Removed labels: Milestone-1.2, Priority-Medium

GoogleCodeExporter avatar Aug 12 '15 07:08 GoogleCodeExporter

The next step would be to allow the rotation of the bounding box to get the minimal-volume box. There are algorithms for that, including based on voxel representation - "oriented bounding box". But that is probably relevant only for shapes read from file, and will introduce some distortions - related to #171.

myurkin avatar Jun 12 '18 09:06 myurkin

When this is implemented, it makes sense to produce warning if the real grid is smaller than given in the command line, at least, when -save_geom is used. The reason is that the user may rely on the specified grid for further processing (e.g., by using this file and this grid in further ADDA runs).

/cc @alkichigin

myurkin avatar Feb 21 '22 12:02 myurkin

This issue also affects the potential errors when the particle boundary crosses the substrate, while no real dipoles does. Commit 761d12ae0d8b6b0046e7e93401b45a397a842530 adds the test for all dipoles on the grid (even those not occupied) to have their centers above the substrate, since otherwise the Sommerfeld integrals will try to be evaluated for negative Z (though not used further), leading to unpredictable errors.

When this issue is fixed, this test should never be true (unless the grid is overridden), which is, however, not necessarily the rationale behavior, since it will allow larger intersection of the particle with the substrate than is possible now.

myurkin avatar Oct 23 '22 06:10 myurkin