RefineableBin class. Contains sample points and is embedded in a RefineableBinArray. May itself be represented by a RefineableBinArray to make it recursive. More...
#include <sample_point_container.h>
Public Member Functions | |
RefineableBin (RefineableBinArray *bin_array_pt, const unsigned &bin_index_in_bin_array) | |
Constructor. Pass pointer to bin array that contains this bin and the index of the newly created bin in that RefineableBinArray. More... | |
RefineableBin (const RefineableBin &data)=delete | |
Broken copy constructor. More... | |
void | operator= (const RefineableBin &)=delete |
Broken assignment operator. More... | |
~RefineableBin () | |
Destructor. More... | |
unsigned | total_number_of_sample_points_computed_recursively () const |
Compute total number of sample points recursively. More... | |
void | add_sample_point (SamplePoint *new_sample_point_pt, const Vector< double > &zeta_coordinates) |
Add a new sample point to RefineableBin. More... | |
void | locate_zeta (const Vector< double > &zeta, GeomObject *&sub_geom_object_pt, Vector< double > &s) |
Find sub-GeomObject (finite element) and the local coordinate s within it that contains point with global coordinate zeta. sub_geom_object_pt=0 if point can't be found. More... | |
void | output (std::ofstream &outfile, const bool &don_t_recurse=false) |
Output bin; x,[y,[z]],n_sample_points. More... | |
void | output_bins (std::ofstream &outfile) |
Output bin vertices (allowing display of bins as zones). More... | |
void | output_bin_vertices (std::ofstream &outfile) |
Output bin vertices (allowing display of bins as zones). More... | |
unsigned | nsample_points_in_bin () |
Number of sample points stored in bin. More... | |
Protected Member Functions | |
void | make_sub_bin_array (const Vector< std::pair< double, double >> &min_and_max_coordinates) |
Method for building a new subbin_array (called when the Bin size is greater than the Max_number_of_sample_point_per_bin (and the Bin is recursive). Pass in the extremal coordinates of the bin which is being subdivided. Redistributes all existing sample points to newly made sub-bin-array and empties its own storage. Pass Max./min. coordinates of new bin array for efficiency. More... | |
void | get_bin_boundaries (Vector< std::pair< double, double >> &min_and_max_coordinates) |
Boundaries of bin in each coordinate direction. *.first = min; *.second = max. More... | |
Protected Attributes | |
Vector< SamplePoint * > * | Sample_point_pt |
Container of SamplePoints. Pointer to vector because it's shorter than an empty vector! (Not all RefineableBins have sample points – the ones that are subdivided don't!) More... | |
RefineableBinArray * | Sub_bin_array_pt |
Pointer to a possible sub-BinArray. Null by default. More... | |
RefineableBinArray * | Bin_array_pt |
Pointer to the bin array which "owns" this RefineableBin. More... | |
unsigned | Bin_index_in_bin_array |
Index of bin in its bin array. More... | |
RefineableBin class. Contains sample points and is embedded in a RefineableBinArray. May itself be represented by a RefineableBinArray to make it recursive.
Definition at line 106 of file sample_point_container.h.
|
inline |
Constructor. Pass pointer to bin array that contains this bin and the index of the newly created bin in that RefineableBinArray.
Definition at line 112 of file sample_point_container.h.
|
delete |
Broken copy constructor.
RefineableBin::~RefineableBin | ( | ) |
Destructor.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// Destructor
Definition at line 42 of file sample_point_container.cc.
References i.
void RefineableBin::add_sample_point | ( | SamplePoint * | new_sample_point_pt, |
const Vector< double > & | zeta_coordinates | ||
) |
Add a new sample point to RefineableBin.
Add a SamplePoint* to a RefineableBin object.
Definition at line 392 of file sample_point_container.cc.
|
protected |
Boundaries of bin in each coordinate direction. *.first = min; *.second = max.
Definition at line 603 of file sample_point_container.cc.
void RefineableBin::locate_zeta | ( | const Vector< double > & | zeta, |
GeomObject *& | sub_geom_object_pt, | ||
Vector< double > & | s | ||
) |
Find sub-GeomObject (finite element) and the local coordinate s within it that contains point with global coordinate zeta. sub_geom_object_pt=0 if point can't be found.
Definition at line 438 of file sample_point_container.cc.
References SamplePointContainer::Always_fail_elemental_locate_zeta, i, s, SamplePointContainer::Use_equally_spaced_interior_sample_points, and SamplePointContainer::Visited_sample_points_file.
|
protected |
Method for building a new subbin_array (called when the Bin size is greater than the Max_number_of_sample_point_per_bin (and the Bin is recursive). Pass in the extremal coordinates of the bin which is being subdivided. Redistributes all existing sample points to newly made sub-bin-array and empties its own storage. Pass Max./min. coordinates of new bin array for efficiency.
Function called for making a sub bin array in a given RefineableBin. Pass the vector of min and max coordinates of the NEW bin array.
Definition at line 91 of file sample_point_container.cc.
|
inline |
Number of sample points stored in bin.
Definition at line 155 of file sample_point_container.h.
References Sample_point_pt.
|
delete |
Broken assignment operator.
void RefineableBin::output | ( | std::ofstream & | outfile, |
const bool & | don_t_recurse = false |
||
) |
Output bin; x,[y,[z]],n_sample_points.
Definition at line 181 of file sample_point_container.cc.
References oomph::oomph_info.
void RefineableBin::output_bin_vertices | ( | std::ofstream & | outfile | ) |
Output bin vertices (allowing display of bins as zones).
Output bin; x,[y,[z]].
Definition at line 291 of file sample_point_container.cc.
References oomph::oomph_info.
void RefineableBin::output_bins | ( | std::ofstream & | outfile | ) |
Output bin vertices (allowing display of bins as zones).
unsigned RefineableBin::total_number_of_sample_points_computed_recursively | ( | ) | const |
Compute total number of sample points recursively.
Definition at line 65 of file sample_point_container.cc.
|
protected |
Pointer to the bin array which "owns" this RefineableBin.
Definition at line 177 of file sample_point_container.h.
|
protected |
Index of bin in its bin array.
Definition at line 180 of file sample_point_container.h.
|
protected |
Container of SamplePoints. Pointer to vector because it's shorter than an empty vector! (Not all RefineableBins have sample points – the ones that are subdivided don't!)
Definition at line 171 of file sample_point_container.h.
Referenced by nsample_points_in_bin().
|
protected |
Pointer to a possible sub-BinArray. Null by default.
Definition at line 174 of file sample_point_container.h.