MercuryDPM
0.10
|
#include <HGridOptimiser.h>
Public Member Functions | |
void | Initialise (HGRID_base &problem, int verbosity) |
int | radius2Cell (double r) |
double | cell2Min (int i) |
double | cell2Max (int i) |
double | pdfInt (double start, double end, int power) |
This function calculates: int(f(r)*r^power*dr,r=start..end)/int(f(r)*dr,r=0..omega) More... | |
double | diffPdfInt (double x, int power) |
diff(int(f(r)*r^power*dr,r=s..e)/int(f(r)*dr,r=0..omega),e)=f(e)*e^power/int(f(r)*dr,r=0..omega) More... | |
double | expectedCellsIntegral (double start, double end, int p, double h) |
This function calculates: int((2*r/h+2)^d f(r) dr,r=s..e)/int(f(r) dr,r=s..e)+ Used to calculated the expected number of cells to check at the level with maximum size h for particle radius between start and end. More... | |
double | diffStartExpectedCellsIntegral (double start, double end, int p, double h) |
double | diffEndExpectedCellsIntegral (double start, double end, int p, double h) |
double | diffHExpectedCellsIntegral (double start, double end, int p, double h) |
double | calculateWork (std::vector< double > &hGridCellSizes, HGridMethod method, int verbosity) |
void | calculateDiffWork (std::vector< double > &hGridCellSizes, std::vector< double > &dfdx, HGridMethod method, int verbosity) |
void | calcDfDx (std::vector< double > &hGridCellSizes, std::vector< double > &dfdx, HGridMethod method, int verbosity) |
double | checkLimit (std::vector< double > &hGridCellSizes, std::vector< double > &dfdx, int verbosity) |
void | applyStep (std::vector< double > &hGridCellSizes, std::vector< double > &dfdx, double stepsize, int verbosity) |
double | goldenSectionSearch (std::vector< double > &startHGridCellSizes, std::vector< double > &searchDirection, double min, double cur, double max, HGridMethod method, int verbosity) |
void | getOptimalDistribution (std::vector< double > &hGridCellSizes, int numberOfLevels, HGridMethod method, int verbosity) |
Private Attributes | |
int | NCells |
int | NParticles |
double | rMin |
double | rMax |
double | length |
double | k |
int | dimension |
std::vector< int > | CellN |
Definition at line 32 of file HGridOptimiser.h.
void HGridOptimiser::applyStep | ( | std::vector< double > & | hGridCellSizes, |
std::vector< double > & | dfdx, | ||
double | stepsize, | ||
int | verbosity | ||
) |
Definition at line 727 of file HGridOptimiser.cc.
Referenced by getOptimalDistribution(), and goldenSectionSearch().
void HGridOptimiser::calcDfDx | ( | std::vector< double > & | hGridCellSizes, |
std::vector< double > & | dfdx, | ||
HGridMethod | method, | ||
int | verbosity | ||
) |
Definition at line 641 of file HGridOptimiser.cc.
References calculateWork().
void HGridOptimiser::calculateDiffWork | ( | std::vector< double > & | hGridCellSizes, |
std::vector< double > & | dfdx, | ||
HGridMethod | method, | ||
int | verbosity | ||
) |
Definition at line 281 of file HGridOptimiser.cc.
References BOTTOMUP, diffEndExpectedCellsIntegral(), diffHExpectedCellsIntegral(), diffPdfInt(), diffStartExpectedCellsIntegral(), dimension, expectedCellsIntegral(), k, length, pdfInt(), and TOPDOWN.
Referenced by getOptimalDistribution().
double HGridOptimiser::calculateWork | ( | std::vector< double > & | hGridCellSizes, |
HGridMethod | method, | ||
int | verbosity | ||
) |
Definition at line 533 of file HGridOptimiser.cc.
References BOTTOMUP, dimension, expectedCellsIntegral(), k, length, pdfInt(), and TOPDOWN.
Referenced by calcDfDx(), getOptimalDistribution(), and goldenSectionSearch().
double HGridOptimiser::cell2Max | ( | int | i | ) |
Definition at line 90 of file HGridOptimiser.cc.
References NCells, rMax, and rMin.
Referenced by diffEndExpectedCellsIntegral(), diffHExpectedCellsIntegral(), diffPdfInt(), diffStartExpectedCellsIntegral(), expectedCellsIntegral(), Initialise(), and pdfInt().
double HGridOptimiser::cell2Min | ( | int | i | ) |
Definition at line 86 of file HGridOptimiser.cc.
References NCells, rMax, and rMin.
Referenced by diffEndExpectedCellsIntegral(), diffHExpectedCellsIntegral(), diffPdfInt(), diffStartExpectedCellsIntegral(), expectedCellsIntegral(), Initialise(), and pdfInt().
double HGridOptimiser::checkLimit | ( | std::vector< double > & | hGridCellSizes, |
std::vector< double > & | dfdx, | ||
int | verbosity | ||
) |
Definition at line 664 of file HGridOptimiser.cc.
Referenced by getOptimalDistribution().
double HGridOptimiser::diffEndExpectedCellsIntegral | ( | double | start, |
double | end, | ||
int | p, | ||
double | h | ||
) |
Definition at line 214 of file HGridOptimiser.cc.
References cell2Max(), cell2Min(), CellN, and radius2Cell().
Referenced by calculateDiffWork().
double HGridOptimiser::diffHExpectedCellsIntegral | ( | double | start, |
double | end, | ||
int | p, | ||
double | h | ||
) |
Definition at line 246 of file HGridOptimiser.cc.
References cell2Max(), cell2Min(), CellN, and radius2Cell().
Referenced by calculateDiffWork().
double HGridOptimiser::diffPdfInt | ( | double | x, |
int | power | ||
) |
diff(int(f(r)*r^power*dr,r=s..e)/int(f(r)*dr,r=0..omega),e)=f(e)*e^power/int(f(r)*dr,r=0..omega)
Definition at line 137 of file HGridOptimiser.cc.
References cell2Max(), cell2Min(), CellN, NCells, and radius2Cell().
Referenced by calculateDiffWork().
double HGridOptimiser::diffStartExpectedCellsIntegral | ( | double | start, |
double | end, | ||
int | p, | ||
double | h | ||
) |
Definition at line 182 of file HGridOptimiser.cc.
References cell2Max(), cell2Min(), CellN, and radius2Cell().
Referenced by calculateDiffWork().
double HGridOptimiser::expectedCellsIntegral | ( | double | start, |
double | end, | ||
int | p, | ||
double | h | ||
) |
This function calculates: int((2*r/h+2)^d f(r) dr,r=s..e)/int(f(r) dr,r=s..e)+ Used to calculated the expected number of cells to check at the level with maximum size h for particle radius between start and end.
Definition at line 152 of file HGridOptimiser.cc.
References cell2Max(), cell2Min(), CellN, and radius2Cell().
Referenced by calculateDiffWork(), and calculateWork().
void HGridOptimiser::getOptimalDistribution | ( | std::vector< double > & | hGridCellSizes, |
int | numberOfLevels, | ||
HGridMethod | method, | ||
int | verbosity | ||
) |
Definition at line 801 of file HGridOptimiser.cc.
References applyStep(), calculateDiffWork(), calculateWork(), checkLimit(), goldenSectionSearch(), rMax, and rMin.
double HGridOptimiser::goldenSectionSearch | ( | std::vector< double > & | startHGridCellSizes, |
std::vector< double > & | searchDirection, | ||
double | min, | ||
double | cur, | ||
double | max, | ||
HGridMethod | method, | ||
int | verbosity | ||
) |
Definition at line 743 of file HGridOptimiser.cc.
References applyStep(), and calculateWork().
Referenced by getOptimalDistribution().
void HGridOptimiser::Initialise | ( | HGRID_base & | problem, |
int | verbosity | ||
) |
Definition at line 33 of file HGridOptimiser.cc.
References BaseHandler< T >::begin(), cell2Max(), cell2Min(), CellN, dimension, BaseHandler< T >::end(), MD::get_dim(), BaseParticle::get_InteractionRadius(), MD::get_xmax(), MD::get_xmin(), MD::get_ymax(), MD::get_ymin(), MD::get_zmax(), MD::get_zmin(), ParticleHandler::getLargestParticle(), BaseHandler< T >::getNumberOfObjects(), MD::getParticleHandler(), ParticleHandler::getSmallestParticle(), k, length, NCells, NParticles, radius2Cell(), rMax, and rMin.
double HGridOptimiser::pdfInt | ( | double | start, |
double | end, | ||
int | power | ||
) |
This function calculates: int(f(r)*r^power*dr,r=start..end)/int(f(r)*dr,r=0..omega)
Definition at line 97 of file HGridOptimiser.cc.
References cell2Max(), cell2Min(), CellN, NCells, radius2Cell(), rMax, and rMin.
Referenced by calculateDiffWork(), and calculateWork().
int HGridOptimiser::radius2Cell | ( | double | r | ) |
Definition at line 79 of file HGridOptimiser.cc.
References NCells, rMax, and rMin.
Referenced by diffEndExpectedCellsIntegral(), diffHExpectedCellsIntegral(), diffPdfInt(), diffStartExpectedCellsIntegral(), expectedCellsIntegral(), Initialise(), and pdfInt().
|
private |
Definition at line 61 of file HGridOptimiser.h.
Referenced by diffEndExpectedCellsIntegral(), diffHExpectedCellsIntegral(), diffPdfInt(), diffStartExpectedCellsIntegral(), expectedCellsIntegral(), Initialise(), and pdfInt().
|
private |
Definition at line 60 of file HGridOptimiser.h.
Referenced by calculateDiffWork(), calculateWork(), and Initialise().
|
private |
Definition at line 59 of file HGridOptimiser.h.
Referenced by calculateDiffWork(), calculateWork(), and Initialise().
|
private |
Definition at line 58 of file HGridOptimiser.h.
Referenced by calculateDiffWork(), calculateWork(), and Initialise().
|
private |
Definition at line 55 of file HGridOptimiser.h.
Referenced by cell2Max(), cell2Min(), diffPdfInt(), Initialise(), pdfInt(), and radius2Cell().
|
private |
Definition at line 55 of file HGridOptimiser.h.
Referenced by Initialise().
|
private |
Definition at line 57 of file HGridOptimiser.h.
Referenced by cell2Max(), cell2Min(), getOptimalDistribution(), Initialise(), pdfInt(), and radius2Cell().
|
private |
Definition at line 56 of file HGridOptimiser.h.
Referenced by cell2Max(), cell2Min(), getOptimalDistribution(), Initialise(), pdfInt(), and radius2Cell().