5 #ifndef HGRIDOPTIMIZER_H
6 #define HGRIDOPTIMIZER_H
122 void calcDfDx(std::vector<double>& hGridCellSizes, std::vector<double>& dfdx,
HGridMethod method,
int verbosity);
127 double checkLimit(std::vector<double>& hGridCellSizes, std::vector<double>& dfdx,
int verbosity);
132 void applyStep(std::vector<double>& hGridCellSizes, std::vector<double>& dfdx,
double stepsize,
int verbosity);
138 goldenSectionSearch(std::vector<double>& startHGridCellSizes, std::vector<double>& searchDirection,
double min,
int i
Definition: BiCGSTAB_step_by_step.cpp:9
HGridMethod
Enum class that indicates how particles in different levels (cross level checking) of the HGrid are c...
Definition: MercuryBase.h:23
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: HGridOptimiser.h:16
double pdfInt(double start, double end, int power)
Definition: HGridOptimiser.cc:203
double diffStartExpectedCellsIntegral(double start, double end, int p, double h)
Definition: HGridOptimiser.cc:332
double goldenSectionSearch(std::vector< double > &startHGridCellSizes, std::vector< double > &searchDirection, double min, double cur, double max, HGridMethod method, int verbosity)
Definition: HGridOptimiser.cc:963
unsigned int dimension_
The dimension of the system, usually 3, sometimes 2 or 1.
Definition: HGridOptimiser.h:185
double checkLimit(std::vector< double > &hGridCellSizes, std::vector< double > &dfdx, int verbosity)
Definition: HGridOptimiser.cc:881
unsigned int numCells_
Number of cells, usually called levels in the HGrid.
Definition: HGridOptimiser.h:156
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,...
Definition: HGridOptimiser.cc:240
double expectedCellsIntegral(double start, double end, int p, double h)
Definition: HGridOptimiser.cc:302
double diffEndExpectedCellsIntegral(double start, double end, int p, double h)
Definition: HGridOptimiser.cc:373
double expectedCellsIntegralCellNumerator(double start, double end, unsigned int i, int p, double h)
Definition: HGridOptimiser.cc:254
double diffHExpectedCellsIntegral(double start, double end, int p, double h)
Definition: HGridOptimiser.cc:413
void calcDfDx(std::vector< double > &hGridCellSizes, std::vector< double > &dfdx, HGridMethod method, int verbosity)
Definition: HGridOptimiser.cc:857
double rMax_
Radius of the largest particle, "rounded" to the smallest double that is larger than the radius of ea...
Definition: HGridOptimiser.h:166
void histNumberParticlesPerCell(std::vector< double > &hGridCellSizes)
Definition: HGridOptimiser.cc:1074
std::vector< double > intCellN
Definition: HGridOptimiser.h:191
double diffHExpectedCellsIntegralCellNumerator(double start, double end, unsigned int i, int p, double h)
Definition: HGridOptimiser.cc:269
void initialisePolyFunc(double omega, std::vector< double > &coeff, unsigned int numberOfCells, int verbosity)
Definition: HGridOptimiser.cc:89
double pdfIntCell(double start, double end, unsigned int i, int p)
Definition: HGridOptimiser.cc:192
std::vector< double > cellN_
Definition: HGridOptimiser.h:190
double cell2Min(unsigned int i)
Computes the left bound of the cell with given ordinal number.
Definition: HGridOptimiser.cc:179
void getOptimalDistribution(std::vector< double > &hGridCellSizes, unsigned int numberOfLevels, HGridMethod method, int verbosity)
Definition: HGridOptimiser.cc:1022
double cellCheckOverContactCheckRatio_
The ratio of the time required for a single geometric contact detection over the time required to ret...
Definition: HGridOptimiser.h:181
double calculateWork(std::vector< double > &hGridCellSizes, HGridMethod method, int verbosity)
The amount of work that has to be done to run a simulation using the HGrid, in steps.
Definition: HGridOptimiser.cc:707
double cell2Max(unsigned int i)
Computes the right bound of the cell with given ordinal number.
Definition: HGridOptimiser.cc:187
void calculateDiffWork(std::vector< double > &hGridCellSizes, std::vector< double > &dfdx, HGridMethod method, int verbosity)
Definition: HGridOptimiser.cc:442
double length_
The weighted length of the domain.
Definition: HGridOptimiser.h:174
double rMin_
Radius of the smallest particle, "rounded" to the largest double that is smaller than the radius of e...
Definition: HGridOptimiser.h:161
void applyStep(std::vector< double > &hGridCellSizes, std::vector< double > &dfdx, double stepsize, int verbosity)
Definition: HGridOptimiser.cc:945
unsigned int radius2Cell(double r)
Assigns a BaseParticle of given radius to a certain cell.
Definition: HGridOptimiser.cc:144
void initialise(const MercuryBase &problem, unsigned int numberOfCells, int verbosity)
Definition: HGridOptimiser.cc:12
double expectedCellsIntegralCellDenominator(double start, double end, unsigned int i)
Definition: HGridOptimiser.cc:291
unsigned int radius2IntCell(double r)
Definition: HGridOptimiser.cc:152
double intCell2Min(unsigned int i)
Definition: HGridOptimiser.cc:160
double intCell2Max(unsigned int i)
Definition: HGridOptimiser.cc:168
This is the base class for both Mercury2D and Mercury3D. Note the actually abstract grid is defined i...
Definition: MercuryBase.h:105
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
static constexpr lastp1_t end
Definition: IndexedViewHelper.h:79
Vector::Scalar omega(const Vector &t, const Vector &s, RealScalar angle)
Definition: IDRS.h:36
void start(const unsigned &i)
(Re-)start i-th timer
Definition: oomph_utilities.cc:243
list x
Definition: plotDoE.py:28
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213