26 #ifndef HGRIDOptimiser_H
27 #define HGRIDOptimiser_H
39 double pdfInt(
double start,
double end,
int power);
47 void calcDfDx(std::vector<double>& hGridCellSizes, std::vector<double>& dfdx,
HGridMethod method,
int verbosity);
48 double checkLimit(std::vector<double>& hGridCellSizes, std::vector<double>& dfdx,
int verbosity);
49 void applyStep(std::vector<double>& hGridCellSizes, std::vector<double>& dfdx,
double stepsize,
int verbosity);
50 double goldenSectionSearch(std::vector<double>& startHGridCellSizes, std::vector<double>& searchDirection,
double min,
double cur,
double max,
HGridMethod method,
int verbosity);
double goldenSectionSearch(std::vector< double > &startHGridCellSizes, std::vector< double > &searchDirection, double min, double cur, double max, HGridMethod method, int verbosity)
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)
This is the base class for both HGRID_2D and HGRID_3D.
void Initialise(HGRID_base &problem, int verbosity)
double calculateWork(std::vector< double > &hGridCellSizes, HGridMethod method, int verbosity)
double diffStartExpectedCellsIntegral(double start, double end, int p, double h)
void getOptimalDistribution(std::vector< double > &hGridCellSizes, int numberOfLevels, HGridMethod method, int verbosity)
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...
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)
int radius2Cell(double r)
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 diffHExpectedCellsIntegral(double start, double end, int p, double h)
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) ...
double diffEndExpectedCellsIntegral(double start, double end, int p, double h)