Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RefineableBin Class Reference

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...
 
RefineableBinArraySub_bin_array_pt
 Pointer to a possible sub-BinArray. Null by default. More...
 
RefineableBinArrayBin_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RefineableBin() [1/2]

RefineableBin::RefineableBin ( RefineableBinArray bin_array_pt,
const unsigned &  bin_index_in_bin_array 
)
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.

◆ RefineableBin() [2/2]

RefineableBin::RefineableBin ( const RefineableBin data)
delete

Broken copy constructor.

◆ ~RefineableBin()

RefineableBin::~RefineableBin ( )

Destructor.

/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// Destructor

Definition at line 42 of file sample_point_container.cc.

References i.

Member Function Documentation

◆ add_sample_point()

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.

◆ get_bin_boundaries()

void RefineableBin::get_bin_boundaries ( Vector< std::pair< double, double >> &  min_and_max_coordinates)
protected

Boundaries of bin in each coordinate direction. *.first = min; *.second = max.

Definition at line 603 of file sample_point_container.cc.

◆ locate_zeta()

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.

◆ make_sub_bin_array()

void RefineableBin::make_sub_bin_array ( const Vector< std::pair< double, double >> &  min_and_max_coordinates)
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.

◆ nsample_points_in_bin()

unsigned RefineableBin::nsample_points_in_bin ( )
inline

Number of sample points stored in bin.

Definition at line 155 of file sample_point_container.h.

References Sample_point_pt.

◆ operator=()

void RefineableBin::operator= ( const RefineableBin )
delete

Broken assignment operator.

◆ output()

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.

◆ output_bin_vertices()

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.

◆ output_bins()

void RefineableBin::output_bins ( std::ofstream &  outfile)

Output bin vertices (allowing display of bins as zones).

◆ total_number_of_sample_points_computed_recursively()

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.

Member Data Documentation

◆ Bin_array_pt

RefineableBinArray* RefineableBin::Bin_array_pt
protected

Pointer to the bin array which "owns" this RefineableBin.

Definition at line 177 of file sample_point_container.h.

◆ Bin_index_in_bin_array

unsigned RefineableBin::Bin_index_in_bin_array
protected

Index of bin in its bin array.

Definition at line 180 of file sample_point_container.h.

◆ Sample_point_pt

Vector<SamplePoint*>* RefineableBin::Sample_point_pt
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().

◆ Sub_bin_array_pt

RefineableBinArray* RefineableBin::Sub_bin_array_pt
protected

Pointer to a possible sub-BinArray. Null by default.

Definition at line 174 of file sample_point_container.h.


The documentation for this class was generated from the following files: