///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// More...
#include <sample_point_container.h>
Public Member Functions | |
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 () | |
Broken default constructor; needed for broken copy constructors. Don't call. It will die. More... | |
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 |
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... | |
virtual unsigned & | total_number_of_sample_points_visited_during_locate_zeta_from_top_level () |
Counter to keep track of how many sample points we've visited during top level call to locate_zeta. Virtual so it can be overloaded for different versions. More... | |
virtual unsigned | total_number_of_sample_points_computed_recursively () const =0 |
Total number of sample points in sample point container, possibly computed recursively. More... | |
virtual unsigned | ndim_zeta () const =0 |
Dimension of the zeta ( = dim of local coordinate of elements) More... | |
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 |
Pair of doubles for min and maximum coordinates in i-th direction: min (first) and max. (second) coordinates. More... | |
const Vector< std::pair< double, double > > & | min_and_max_coordinates () const |
Vector of pair of doubles for min and maximum coordinates. min (first) and max. (second) coordinates. More... | |
bool | ignore_halo_elements_during_locate_zeta_search () const |
Ignore halo elements? More... | |
bool | use_eulerian_coordinates_during_setup () const |
Use Eulerian coordinates (i.e. interpolated_x) rather than zeta itself (i.e. interpolated_zeta) to identify point. More... | |
unsigned & | nsample_points_generated_per_element () |
"Measure of" number of sample points generated in each element More... | |
double & | max_search_radius () |
Set maximum search radius for locate zeta. This is initialised do DBL_MAX so we brutally search through the entire bin structure, no matter how big it is until we've found the required point (or failed to do so. This can be VERY costly with fine meshes. Here the user takes full responsibility and states that we have no chance in hell to find the required point in a bin whose closest vertex is further than the specified max search radius. More... | |
Static Public Attributes | |
static std::ofstream | Visited_sample_points_file |
File to record sequence of visited sample points in. Used for debugging/ illustration of search procedures. More... | |
static bool | Always_fail_elemental_locate_zeta = false |
Boolean flag to make to make locate zeta fail. Used for debugging/ illustration of search procedures. More... | |
static bool | Use_equally_spaced_interior_sample_points = true |
Use equally spaced sample points? (otherwise vertices are sampled repeatedly. More... | |
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... | |
Protected Member Functions | |
void | setup_min_and_max_coordinates () |
Helper function to compute the min and max coordinates for the mesh, in each dimension. More... | |
Protected Attributes | |
Mesh * | Mesh_pt |
Pointer to mesh from whose FiniteElements sample points are created. More... | |
Vector< std::pair< double, double > > | Min_and_max_coordinates |
Vector of pairs of doubles for min and maximum coordinates. Call: Min_and_max_coordinates[j] gives me the pair of min (first) and max. (second) coordinates in the j-th coordinate direction. More... | |
bool | Use_eulerian_coordinates_during_setup |
Use Eulerian coordinates (i.e. interpolated_x) rather than zeta itself (i.e. interpolated_zeta) to identify point. More... | |
bool | Ignore_halo_elements_during_locate_zeta_search |
Ignore halo elements? More... | |
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 |
Counter to keep track of how many sample points we've visited during top level call to locate_zeta. More... | |
double | Max_search_radius |
Max radius beyond which we stop searching the bin. Initialised to DBL_MAX so keep going until the point is found or until we've searched every single bin. Overwriting this means we won't search in bins whose closest vertex is at a distance greater than Max_search_radius from the point to be located. More... | |
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
Base class for all sample point containers
Definition at line 205 of file sample_point_container.h.
|
inline |
|
inline |
Broken default constructor; needed for broken copy constructors. Don't call. It will die.
Definition at line 233 of file sample_point_container.h.
|
delete |
Broken copy constructor.
|
inlinevirtual |
Virtual destructor.
Definition at line 248 of file sample_point_container.h.
|
inline |
Ignore halo elements?
Definition at line 299 of file sample_point_container.h.
References Ignore_halo_elements_during_locate_zeta_search.
Referenced by CGALSamplePointContainer::limited_locate_zeta(), and CGALSamplePointContainer::locate_zeta().
|
pure virtual |
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.
Implemented in CGALSamplePointContainer, NonRefineableBinArray, and RefineableBinArray.
Referenced by oomph::MeshAsGeomObject::locate_zeta().
|
inline |
Set maximum search radius for locate zeta. This is initialised do DBL_MAX so we brutally search through the entire bin structure, no matter how big it is until we've found the required point (or failed to do so. This can be VERY costly with fine meshes. Here the user takes full responsibility and states that we have no chance in hell to find the required point in a bin whose closest vertex is further than the specified max search radius.
Definition at line 327 of file sample_point_container.h.
References Max_search_radius.
Referenced by RefineableBinArray::locate_zeta(), and oomph::LineVisualiser::setup().
|
inline |
Pointer to mesh from whose FiniteElements sample points are created.
Definition at line 275 of file sample_point_container.h.
References Mesh_pt.
|
inline |
Vector of pair of doubles for min and maximum coordinates. min (first) and max. (second) coordinates.
Definition at line 290 of file sample_point_container.h.
References Min_and_max_coordinates.
Referenced by RefineableBinArray::output_neighbouring_bins().
|
inline |
Pair of doubles for min and maximum coordinates in i-th direction: min (first) and max. (second) coordinates.
Definition at line 282 of file sample_point_container.h.
References i, and Min_and_max_coordinates.
Referenced by oomph::RefineableGmshTetMesh< ELEMENT >::adapt().
|
pure virtual |
Dimension of the zeta ( = dim of local coordinate of elements)
Implemented in CGALSamplePointContainer, and BinArray.
|
inline |
"Measure of" number of sample points generated in each element
Definition at line 314 of file sample_point_container.h.
References Nsample_points_generated_per_element.
Referenced by CGALSamplePointContainer::limited_locate_zeta(), and CGALSamplePointContainer::locate_zeta().
|
delete |
Broken assignment operator.
|
protected |
Helper function to compute the min and max coordinates for the mesh, in each dimension.
Setup the min and max coordinates for the mesh, in each dimension.
Definition at line 684 of file sample_point_container.cc.
Referenced by CGALSamplePointContainer::CGALSamplePointContainer(), NonRefineableBinArray::NonRefineableBinArray(), and RefineableBinArray::RefineableBinArray().
|
pure virtual |
Total number of sample points in sample point container, possibly computed recursively.
Implemented in CGALSamplePointContainer, NonRefineableBinArray, and RefineableBinArray.
|
inlinevirtual |
Counter to keep track of how many sample points we've visited during top level call to locate_zeta. Virtual so it can be overloaded for different versions.
Reimplemented in RefineableBinArray.
Definition at line 261 of file sample_point_container.h.
References Total_number_of_sample_points_visited_during_locate_zeta_from_top_level.
Referenced by CGALSamplePointContainer::limited_locate_zeta(), NonRefineableBinArray::locate_zeta(), and CGALSamplePointContainer::locate_zeta().
|
inline |
Use Eulerian coordinates (i.e. interpolated_x) rather than zeta itself (i.e. interpolated_zeta) to identify point.
Definition at line 308 of file sample_point_container.h.
References Use_eulerian_coordinates_during_setup.
Referenced by CGALSamplePointContainer::limited_locate_zeta(), NonRefineableBinArray::locate_zeta(), and CGALSamplePointContainer::locate_zeta().
|
static |
Boolean flag to make to make locate zeta fail. Used for debugging/ illustration of search procedures.
Boolean flag to make to make locate zeta fail.
Definition at line 339 of file sample_point_container.h.
Referenced by CGALSamplePointContainer::limited_locate_zeta(), RefineableBin::locate_zeta(), RefineableBinArray::locate_zeta(), NonRefineableBinArray::locate_zeta(), and CGALSamplePointContainer::locate_zeta().
|
static |
Time setup?
Definition at line 346 of file sample_point_container.h.
Referenced by CGALSamplePointContainer::CGALSamplePointContainer(), CGALSamplePointContainer::get_sample_points(), NonRefineableBinArray::NonRefineableBinArray(), and RefineableBinArray::RefineableBinArray().
|
protected |
Ignore halo elements?
Definition at line 372 of file sample_point_container.h.
Referenced by ignore_halo_elements_during_locate_zeta_search(), and NonRefineableBinArray::locate_zeta().
|
protected |
Max radius beyond which we stop searching the bin. Initialised to DBL_MAX so keep going until the point is found or until we've searched every single bin. Overwriting this means we won't search in bins whose closest vertex is at a distance greater than Max_search_radius from the point to be located.
Definition at line 389 of file sample_point_container.h.
Referenced by CGALSamplePointContainer::limited_locate_zeta(), NonRefineableBinArray::locate_zeta(), CGALSamplePointContainer::locate_zeta(), max_search_radius(), and SamplePointContainer().
|
protected |
Pointer to mesh from whose FiniteElements sample points are created.
Definition at line 357 of file sample_point_container.h.
Referenced by CGALSamplePointContainer::CGALSamplePointContainer(), RefineableBinArray::fill_bin_array(), NonRefineableBinArray::fill_bin_array(), CGALSamplePointContainer::get_sample_points(), CGALSamplePointContainer::limited_locate_zeta(), CGALSamplePointContainer::locate_zeta(), mesh_pt(), NonRefineableBinArray::NonRefineableBinArray(), and RefineableBinArray::RefineableBinArray().
|
protected |
Vector of pairs of doubles for min and maximum coordinates. Call: Min_and_max_coordinates[j] gives me the pair of min (first) and max. (second) coordinates in the j-th coordinate direction.
Definition at line 363 of file sample_point_container.h.
Referenced by CGALSamplePointContainer::CGALSamplePointContainer(), BinArray::coords_to_bin_index(), BinArray::coords_to_vectorial_bin_index(), RefineableBinArray::fill_bin_array(), NonRefineableBinArray::fill_bin_array(), NonRefineableBinArray::get_bin(), RefineableBinArray::get_bin_boundaries(), NonRefineableBinArray::get_bin_vertices(), CGALSamplePointContainer::get_sample_points(), RefineableBinArray::locate_zeta(), NonRefineableBinArray::locate_zeta(), CGALSamplePointContainer::locate_zeta(), min_and_max_coordinates(), NonRefineableBinArray::NonRefineableBinArray(), RefineableBinArray::output_neighbouring_bins(), BinArray::profile_get_neighbouring_bins_helper(), and RefineableBinArray::RefineableBinArray().
|
protected |
"Measure of" number of sample points generated in each element
Definition at line 377 of file sample_point_container.h.
Referenced by RefineableBinArray::fill_bin_array(), NonRefineableBinArray::fill_bin_array(), CGALSamplePointContainer::get_sample_points(), and nsample_points_generated_per_element().
|
static |
Offset of sample point container boundaries beyond max/min coords.
Definition at line 349 of file sample_point_container.h.
Referenced by NonRefineableBinArray::fill_bin_array().
|
protected |
Counter to keep track of how many sample points we've visited during top level call to locate_zeta.
Definition at line 382 of file sample_point_container.h.
Referenced by CGALSamplePointContainer::CGALSamplePointContainer(), CGALSamplePointContainer::limited_locate_zeta(), RefineableBinArray::locate_zeta(), NonRefineableBinArray::locate_zeta(), CGALSamplePointContainer::locate_zeta(), RefineableBinArray::RefineableBinArray(), total_number_of_sample_points_visited_during_locate_zeta_from_top_level(), and RefineableBinArray::total_number_of_sample_points_visited_during_locate_zeta_from_top_level().
|
static |
Use equally spaced sample points? (otherwise vertices are sampled repeatedly.
Definition at line 343 of file sample_point_container.h.
Referenced by RefineableBinArray::fill_bin_array(), NonRefineableBinArray::fill_bin_array(), CGALSamplePointContainer::get_sample_points(), CGALSamplePointContainer::limited_locate_zeta(), RefineableBin::locate_zeta(), and CGALSamplePointContainer::locate_zeta().
|
protected |
Use Eulerian coordinates (i.e. interpolated_x) rather than zeta itself (i.e. interpolated_zeta) to identify point.
Definition at line 367 of file sample_point_container.h.
Referenced by RefineableBinArray::fill_bin_array(), NonRefineableBinArray::fill_bin_array(), CGALSamplePointContainer::get_sample_points(), NonRefineableBinArray::output_bins(), and use_eulerian_coordinates_during_setup().
|
static |
File to record sequence of visited sample points in. Used for debugging/ illustration of search procedures.
/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// SamplePointContainer base class /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
File to record sequence of visited sample points in
Definition at line 335 of file sample_point_container.h.
Referenced by CGALSamplePointContainer::limited_locate_zeta(), RefineableBin::locate_zeta(), NonRefineableBinArray::locate_zeta(), and CGALSamplePointContainer::locate_zeta().