![]() |
|
Base class for all bin arrays. More...
#include <sample_point_container.h>
Public Member Functions | |
BinArray (Mesh *mesh_pt, const Vector< std::pair< double, double >> &min_and_max_coordinates, const Vector< unsigned > &dimensions_of_bin_array, const bool &use_eulerian_coordinates_during_setup, const bool &ignore_halo_elements_during_locate_zeta_search, const unsigned &nsample_points_generated_per_element) | |
Constructor. More... | |
BinArray () | |
BinArray (const BinArray &data)=delete | |
Broken copy constructor. More... | |
void | operator= (const BinArray &)=delete |
Broken assignment operator. More... | |
virtual | ~BinArray () |
Virtual destructor. More... | |
void | get_neighbouring_bins_helper (const unsigned &bin_index, const unsigned &radius, Vector< unsigned > &neighbouring_bin_index, const bool &use_old_version=true) |
void | profile_get_neighbouring_bins_helper () |
unsigned | coords_to_bin_index (const Vector< double > &zeta) |
void | coords_to_vectorial_bin_index (const Vector< double > &zeta, Vector< unsigned > &bin_index) |
Get "coordinates" of bin that contains specified zeta. More... | |
virtual void | output_bins (std::ofstream &outfile)=0 |
Output bins (boundaries and number of sample points in them) More... | |
virtual void | output_bin_vertices (std::ofstream &outfile)=0 |
Output bin vertices (allowing display of bin boundaries as zones). More... | |
virtual unsigned | nbin () const =0 |
unsigned | max_bin_dimension () const |
Max. bin dimension (number of bins in coordinate directions) More... | |
unsigned | ndim_zeta () const |
Dimension of the zeta ( = dim of local coordinate of elements) More... | |
unsigned | dimension_of_bin_array (const unsigned &i) const |
Number of bins in coordinate direction i. More... | |
Vector< unsigned > | dimensions_of_bin_array () const |
unsigned | dimensions_of_bin_array (const unsigned &i) const |
Number of bins in specified coordinate direction. More... | |
![]() | |
SamplePointContainer (Mesh *mesh_pt, const Vector< std::pair< double, double >> &min_and_max_coordinates, const bool &use_eulerian_coordinates_during_setup, const bool &ignore_halo_elements_during_locate_zeta_search, const unsigned &nsample_points_generated_per_element) | |
Constructor. More... | |
SamplePointContainer () | |
SamplePointContainer (const SamplePointContainer &data)=delete | |
Broken copy constructor. More... | |
void | operator= (const SamplePointContainer &)=delete |
Broken assignment operator. More... | |
virtual | ~SamplePointContainer () |
Virtual destructor. More... | |
virtual void | locate_zeta (const Vector< double > &zeta, GeomObject *&sub_geom_object_pt, Vector< double > &s)=0 |
virtual unsigned & | total_number_of_sample_points_visited_during_locate_zeta_from_top_level () |
virtual unsigned | total_number_of_sample_points_computed_recursively () const =0 |
Mesh * | mesh_pt () const |
Pointer to mesh from whose FiniteElements sample points are created. More... | |
const std::pair< double, double > & | min_and_max_coordinates (const unsigned &i) const |
const Vector< std::pair< double, double > > & | min_and_max_coordinates () const |
bool | use_eulerian_coordinates_during_setup () const |
unsigned & | nsample_points_generated_per_element () |
"Measure of" number of sample points generated in each element More... | |
double & | max_search_radius () |
Protected Attributes | |
Vector< unsigned > | Dimensions_of_bin_array |
Number of bins in each coordinate direction. More... | |
![]() | |
Mesh * | Mesh_pt |
Pointer to mesh from whose FiniteElements sample points are created. More... | |
Vector< std::pair< double, double > > | Min_and_max_coordinates |
bool | Use_eulerian_coordinates_during_setup |
unsigned | Nsample_points_generated_per_element |
"Measure of" number of sample points generated in each element More... | |
unsigned | Total_number_of_sample_points_visited_during_locate_zeta_from_top_level |
double | Max_search_radius |
Additional Inherited Members | |
![]() | |
static std::ofstream | Visited_sample_points_file |
File to record sequence of visited sample points in. More... | |
static bool | Always_fail_elemental_locate_zeta = false |
Boolean flag to make to make locate zeta fail. More... | |
static bool | Use_equally_spaced_interior_sample_points = true |
static bool | Enable_timing_of_setup = false |
Time setup? More... | |
static double | Percentage_offset = 5.0 |
Offset of sample point container boundaries beyond max/min coords. More... | |
![]() | |
void | setup_min_and_max_coordinates () |
Setup the min and max coordinates for the mesh, in each dimension. More... | |
Base class for all bin arrays.
///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
|
inline |
Constructor.
|
inline |
Broken default constructor; needed for broken copy constructors. Don't call. It will die.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
delete |
Broken copy constructor.
Get (linearly enumerated) bin index of bin that contains specified zeta
Update the coef and the bin index
References dimensions_of_bin_array(), Eigen::bfloat16_impl::floor(), int(), min, SamplePointContainer::Min_and_max_coordinates, ndim_zeta(), and Eigen::zeta().
Referenced by RefineableBinArray::add_sample_point(), RefineableBinArray::fill_bin_array(), RefineableBinArray::locate_zeta(), and profile_get_neighbouring_bins_helper().
void BinArray::coords_to_vectorial_bin_index | ( | const Vector< double > & | zeta, |
Vector< unsigned > & | bin_index | ||
) |
Get "coordinates" of bin that contains specified zeta.
References dimensions_of_bin_array(), Eigen::bfloat16_impl::floor(), int(), min, SamplePointContainer::Min_and_max_coordinates, ndim_zeta(), and Eigen::zeta().
Referenced by RefineableBinArray::locate_zeta(), and profile_get_neighbouring_bins_helper().
Number of bins in coordinate direction i.
References Dimensions_of_bin_array, and i.
Referenced by RefineableBinArray::get_bin_boundaries().
|
inline |
Number of bins in coordinate directions. Const vector-based version
References Dimensions_of_bin_array.
Referenced by coords_to_bin_index(), and coords_to_vectorial_bin_index().
Number of bins in specified coordinate direction.
References Dimensions_of_bin_array, and i.
void BinArray::get_neighbouring_bins_helper | ( | const unsigned & | bin_index, |
const unsigned & | radius, | ||
Vector< unsigned > & | neighbouring_bin_index, | ||
const bool & | use_old_version = true |
||
) |
Helper function for computing the bin indices of neighbouring bins at a given "radius" of the specified bin. Final, optional boolean (default: true) chooses to use the old version which appears to be faster than Louis' new one after all (in the few cases where this functionality is still used – not all if we have cgal!)
Helper function for computing the bin indices of neighbouring bins at a given "radius" of the specified bin
References Dimensions_of_bin_array, i, j, k, ndim_zeta(), UniformPSDSelfTest::radius, and row().
Referenced by NonRefineableBinArray::fill_bin_by_diffusion(), RefineableBinArray::locate_zeta(), NonRefineableBinArray::locate_zeta(), RefineableBinArray::output_neighbouring_bins(), and profile_get_neighbouring_bins_helper().
unsigned BinArray::max_bin_dimension | ( | ) | const |
Max. bin dimension (number of bins in coordinate directions)
Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), check_locate_zeta(), and NonRefineableBinArray::NonRefineableBinArray().
|
pure virtual |
Number of bins (not taking recursion into account for refineable versions)
Implemented in NonRefineableBinArray, and RefineableBinArray.
|
inlinevirtual |
Dimension of the zeta ( = dim of local coordinate of elements)
Implements SamplePointContainer.
References Dimensions_of_bin_array.
Referenced by coords_to_bin_index(), coords_to_vectorial_bin_index(), RefineableBinArray::fill_bin_array(), NonRefineableBinArray::fill_bin_array(), NonRefineableBinArray::get_bin(), RefineableBinArray::get_bin_boundaries(), NonRefineableBinArray::get_bin_vertices(), get_neighbouring_bins_helper(), RefineableBinArray::locate_zeta(), NonRefineableBinArray::locate_zeta(), NonRefineableBinArray::min_distance(), NonRefineableBinArray::nbin(), NonRefineableBinArray::output_bin_vertices(), NonRefineableBinArray::output_bins(), RefineableBinArray::output_neighbouring_bins(), and profile_get_neighbouring_bins_helper().
|
delete |
Broken assignment operator.
|
pure virtual |
Output bin vertices (allowing display of bin boundaries as zones).
Implemented in NonRefineableBinArray, and RefineableBinArray.
|
pure virtual |
Output bins (boundaries and number of sample points in them)
Implemented in NonRefineableBinArray, and RefineableBinArray.
Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction().
void BinArray::profile_get_neighbouring_bins_helper | ( | ) |
Profiling function to compare performance of two different versions of the get_neighbouring_bins_helper(...) function
References coords_to_bin_index(), coords_to_vectorial_bin_index(), Dimensions_of_bin_array, get_neighbouring_bins_helper(), i, k, max, SamplePointContainer::Min_and_max_coordinates, ndim_zeta(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, UniformPSDSelfTest::radius, and Eigen::zeta().
|
protected |
Number of bins in each coordinate direction.
Referenced by dimension_of_bin_array(), dimensions_of_bin_array(), NonRefineableBinArray::fill_bin_array(), NonRefineableBinArray::get_bin(), RefineableBinArray::get_bin_boundaries(), NonRefineableBinArray::get_bin_vertices(), get_neighbouring_bins_helper(), RefineableBinArray::locate_zeta(), NonRefineableBinArray::locate_zeta(), NonRefineableBinArray::nbin(), ndim_zeta(), NonRefineableBinArray::NonRefineableBinArray(), NonRefineableBinArray::output_bin_vertices(), NonRefineableBinArray::output_bins(), profile_get_neighbouring_bins_helper(), and RefineableBinArray::RefineableBinArray().