|
GLAMERDOC++
Gravitational Lensing Code Library
|
TreeQuadParticles is a class for calculating the deflection, kappa and gamma by tree method. More...
#include <quadTree.h>
Public Member Functions | |
| TreeQuadParticles (PType *xpt, IndexType Npoints, float mass_fixed=-1, float size_fixed=-1, PosType my_inv_area=0, int bucket=5, PosType theta_force=0.1, bool my_periodic_buffer=false, PosType my_inv_screening_scale=0, PosType maximum_range=-1) | |
| Constructor meant for point particles, simulation particles. More... | |
| ~TreeQuadParticles () | |
| Particle positions and other data are not destroyed. | |
| void | force2D (PosType const *ray, PosType *alpha, KappaType *kappa, KappaType *gamma, KappaType *phi) const |
| void | force2D_recur (const PosType *ray, PosType *alpha, KappaType *kappa, KappaType *gamma, KappaType *phi) |
| void | neighbors (PosType ray[], PosType rmax, std::list< IndexType > &neighbors) const |
| find all points within rmax of ray in 2D | |
| void | printParticlesInBranch (unsigned long number) |
| void | printBranchs (int level=-1) |
Protected Member Functions | |
| void | BuildQTreeNB (PType *xp, IndexType Nparticles) |
| void | _BuildQTreeNB (IndexType nparticles, IndexType *particles) |
| tree must be created and first branch must be set before start | |
| short | WhichQuad (PosType *x, QBranchNB &branch) |
| returns an index for which of the four quadrangles of the branch the point x[] is in | |
| bool | inbox (const PosType *ray, const PosType *p1, const PosType *p2) |
| void | CalcMoments () |
| void | rotate_coordinates (PosType **coord) |
| simple rotates the coordinates in the xp array | |
| PosType | alpha_h (PosType r2s2, PosType sigma) const |
| PosType | kappa_h (PosType r2s2, PosType sigma) const |
| PosType | gamma_h (PosType r2s2, PosType sigma) const |
| PosType | phi_h (PosType r2s2, PosType sigma) const |
| void | b_spline_profile (PosType *xcm, PosType r, PosType Mass, PosType size, PosType *alpha, KappaType *kappa, KappaType *gamma, KappaType *phi) const |
| void | exponential_profile (PosType *xcm, PosType rcm2, PosType Mass, PosType size, PosType *alpha, KappaType *kappa, KappaType *gamma, KappaType *phi) const |
| void | cuttoffscale (QTreeNB< PType > *tree, PosType *theta) |
| void | walkTree_recur (QBranchNB *branch, PosType const *ray, PosType *alpha, KappaType *kappa, KappaType *gamma, KappaType *phi) |
| void | walkTree_iter (QBiterator< PType > &treeit, PosType const *ray, PosType *alpha, KappaType *kappa, KappaType *gamma, KappaType *phi) const |
Protected Attributes | |
| PType * | xxp |
| bool | MultiMass |
| double | mass_fixed = 0.0 |
| bool | MultiRadius |
| double | size_fixed = 0.0 |
| double | inv_area |
| IndexType | Nparticles |
| int | Nbucket |
| PosType | force_theta |
| PosType | max_range |
| std::unique_ptr< QTreeNB< PType > > | tree |
| std::vector< IndexType > | index |
| std::vector< PosType > | workspace |
| PosType | realray [2] |
| int | incell |
| int | incell2 |
| bool | periodic_buffer |
| if true there is one layer of peridic buffering | |
| PosType | inv_screening_scale2 |
| PosType | original_xl |
| PosType | original_yl |
| PosType | phiintconst |
TreeQuadParticles is a class for calculating the deflection, kappa and gamma by tree method.
Created on: Oct 14, 2011 Author: bmetcalf
TreeQuadParticles is evolved from TreeSimple and TreeForce. It splits each cell into four equal area subcells instead of being a binary tree like TreeSimple. When the "particles" are given sizes the tree is built in such a way that the large particles are stored in branches that are no smaller than their size. In this way particles are stored on all levels of the tree and not just in the leaves. This improves efficiency when particles of a wide range of sizes overlap in 2D.
The default value of theta = 0.1 generally gives better than 1% accuracy on alpha. The shear and kappa are always more accurate than the deflection.
Parameters:
inv_area - If not zero, there is an effective uniform negative mass sheet that compensates for the positive mass.
This should be set to the area in Mpc^-2 over which the integral of the surface density should be zero.
* | TreeQuadParticles< PType >::TreeQuadParticles | ( | PType * | xpt, |
| IndexType | Npoints, | ||
| float | mass_fixed = -1, |
||
| float | size_fixed = -1, |
||
| PosType | my_inv_area = 0, |
||
| int | bucket = 5, |
||
| PosType | theta_force = 0.1, |
||
| bool | my_periodic_buffer = false, |
||
| PosType | my_inv_screening_scale = 0, |
||
| PosType | maximum_range = -1 |
||
| ) |
Constructor meant for point particles, simulation particles.
| my_inv_area | if the total mass in field is meant to be zero this should be set to the inverse of the area of the region in Mpc^-2 |
| my_periodic_buffer | if true a periodic buffer will be imposed in the force calulation. See documentation on TreeQuadParticles::force2D() for details. See note for TreeQuadParticles::force2D_recur(). |
| my_inv_screening_scale | the inverse of the square of the sreening length. See note for TreeQuadParticles::force2D_recur(). |
| maximum_range | if set this will cause the tree not be fully construct down to the bucket size outside this range |
1.8.18