Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SamplePointContainer Class Referenceabstract

Base class for all sample point containers. More...

#include <sample_point_container.h>

+ Inheritance diagram for SamplePointContainer:

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)
 Broken copy constructor. More...
 
void operator= (const SamplePointContainer &)
 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. 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. 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
 
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...
 

Detailed Description

Base class for all sample point containers.

Definition at line 222 of file sample_point_container.h.

Constructor & Destructor Documentation

◆ SamplePointContainer() [1/3]

SamplePointContainer::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 
)
inline

Constructor.

Definition at line 229 of file sample_point_container.h.

◆ SamplePointContainer() [2/3]

SamplePointContainer::SamplePointContainer ( )
inline

Broken default constructor; needed for broken copy constructors. Don't call. It will die.

Definition at line 251 of file sample_point_container.h.

◆ SamplePointContainer() [3/3]

SamplePointContainer::SamplePointContainer ( const SamplePointContainer data)
inline

Broken copy constructor.

Definition at line 260 of file sample_point_container.h.

References oomph::BrokenCopy::broken_copy().

◆ ~SamplePointContainer()

virtual SamplePointContainer::~SamplePointContainer ( )
inlinevirtual

Virtual destructor.

Definition at line 268 of file sample_point_container.h.

References s.

Member Function Documentation

◆ ignore_halo_elements_during_locate_zeta_search()

bool SamplePointContainer::ignore_halo_elements_during_locate_zeta_search ( ) const
inline

◆ locate_zeta()

virtual void SamplePointContainer::locate_zeta ( const Vector< double > &  zeta,
GeomObject *&  sub_geom_object_pt,
Vector< double > &  s 
)
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().

◆ max_search_radius()

double& SamplePointContainer::max_search_radius ( )
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 347 of file sample_point_container.h.

Referenced by RefineableBinArray::locate_zeta(), and oomph::LineVisualiser::setup().

◆ mesh_pt()

Mesh* SamplePointContainer::mesh_pt ( ) const
inline

Pointer to mesh from whose FiniteElements sample points are created.

Definition at line 295 of file sample_point_container.h.

◆ min_and_max_coordinates() [1/2]

const std::pair<double, double>& SamplePointContainer::min_and_max_coordinates ( const unsigned &  i) const
inline

Pair of doubles for min and maximum coordinates in i-th direction: min (first) and max. (second) coordinates.

Definition at line 302 of file sample_point_container.h.

References i.

◆ min_and_max_coordinates() [2/2]

const Vector<std::pair<double, double> >& SamplePointContainer::min_and_max_coordinates ( ) const
inline

Vector of pair of doubles for min and maximum coordinates. min (first) and max. (second) coordinates.

Definition at line 310 of file sample_point_container.h.

Referenced by RefineableBinArray::output_neighbouring_bins().

◆ ndim_zeta()

virtual unsigned SamplePointContainer::ndim_zeta ( ) const
pure virtual

Dimension of the zeta ( = dim of local coordinate of elements)

Implemented in CGALSamplePointContainer, and BinArray.

◆ nsample_points_generated_per_element()

unsigned& SamplePointContainer::nsample_points_generated_per_element ( )
inline

"Measure of" number of sample points generated in each element

Definition at line 334 of file sample_point_container.h.

Referenced by CGALSamplePointContainer::limited_locate_zeta(), and CGALSamplePointContainer::locate_zeta().

◆ operator=()

void SamplePointContainer::operator= ( const SamplePointContainer )
inline

Broken assignment operator.

Definition at line 264 of file sample_point_container.h.

References oomph::BrokenCopy::broken_assign().

◆ setup_min_and_max_coordinates()

void SamplePointContainer::setup_min_and_max_coordinates ( )
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 694 of file sample_point_container.cc.

References e, and i.

Referenced by CGALSamplePointContainer::CGALSamplePointContainer(), NonRefineableBinArray::NonRefineableBinArray(), and RefineableBinArray::RefineableBinArray().

◆ total_number_of_sample_points_computed_recursively()

virtual unsigned SamplePointContainer::total_number_of_sample_points_computed_recursively ( ) const
pure virtual

Total number of sample points in sample point container, possibly computed recursively.

Implemented in CGALSamplePointContainer, NonRefineableBinArray, and RefineableBinArray.

◆ total_number_of_sample_points_visited_during_locate_zeta_from_top_level()

virtual unsigned& SamplePointContainer::total_number_of_sample_points_visited_during_locate_zeta_from_top_level ( )
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 281 of file sample_point_container.h.

Referenced by CGALSamplePointContainer::limited_locate_zeta(), NonRefineableBinArray::locate_zeta(), and CGALSamplePointContainer::locate_zeta().

◆ use_eulerian_coordinates_during_setup()

bool SamplePointContainer::use_eulerian_coordinates_during_setup ( ) const
inline

Use Eulerian coordinates (i.e. interpolated_x) rather than zeta itself (i.e. interpolated_zeta) to identify point.

Definition at line 328 of file sample_point_container.h.

Referenced by CGALSamplePointContainer::limited_locate_zeta(), NonRefineableBinArray::locate_zeta(), and CGALSamplePointContainer::locate_zeta().

Member Data Documentation

◆ Always_fail_elemental_locate_zeta

bool SamplePointContainer::Always_fail_elemental_locate_zeta =false
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 359 of file sample_point_container.h.

Referenced by RefineableBin::get_bin_boundaries(), RefineableBin::locate_zeta(), RefineableBinArray::locate_zeta(), and NonRefineableBinArray::locate_zeta().

◆ Enable_timing_of_setup

bool SamplePointContainer::Enable_timing_of_setup =false
static

Time setup?

Definition at line 366 of file sample_point_container.h.

Referenced by RefineableBin::get_bin_boundaries().

◆ Ignore_halo_elements_during_locate_zeta_search

bool SamplePointContainer::Ignore_halo_elements_during_locate_zeta_search
protected

Ignore halo elements?

Definition at line 393 of file sample_point_container.h.

Referenced by NonRefineableBinArray::locate_zeta().

◆ Max_search_radius

double SamplePointContainer::Max_search_radius
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 409 of file sample_point_container.h.

Referenced by CGALSamplePointContainer::limited_locate_zeta(), NonRefineableBinArray::locate_zeta(), and CGALSamplePointContainer::locate_zeta().

◆ Mesh_pt

Mesh* SamplePointContainer::Mesh_pt
protected

◆ Min_and_max_coordinates

Vector<std::pair<double, double> > SamplePointContainer::Min_and_max_coordinates
protected

◆ Nsample_points_generated_per_element

unsigned SamplePointContainer::Nsample_points_generated_per_element
protected

"Measure of" number of sample points generated in each element

Definition at line 398 of file sample_point_container.h.

Referenced by RefineableBinArray::fill_bin_array(), NonRefineableBinArray::fill_bin_array(), and CGALSamplePointContainer::get_sample_points().

◆ Percentage_offset

double SamplePointContainer::Percentage_offset =5.0
static

Offset of sample point container boundaries beyond max/min coords.

Definition at line 369 of file sample_point_container.h.

Referenced by RefineableBin::get_bin_boundaries().

◆ Total_number_of_sample_points_visited_during_locate_zeta_from_top_level

unsigned SamplePointContainer::Total_number_of_sample_points_visited_during_locate_zeta_from_top_level
protected

◆ Use_equally_spaced_interior_sample_points

bool SamplePointContainer::Use_equally_spaced_interior_sample_points =true
static

◆ Use_eulerian_coordinates_during_setup

bool SamplePointContainer::Use_eulerian_coordinates_during_setup
protected

Use Eulerian coordinates (i.e. interpolated_x) rather than zeta itself (i.e. interpolated_zeta) to identify point.

Definition at line 388 of file sample_point_container.h.

Referenced by RefineableBinArray::fill_bin_array(), NonRefineableBinArray::fill_bin_array(), CGALSamplePointContainer::get_sample_points(), and NonRefineableBinArray::output_bins().

◆ Visited_sample_points_file

std::ofstream SamplePointContainer::Visited_sample_points_file
static

File to record sequence of visited sample points in.

File to record sequence of visited sample points in. Used for debugging/ illustration of search procedures.

SamplePointContainer base class

Definition at line 355 of file sample_point_container.h.

Referenced by RefineableBin::get_bin_boundaries(), RefineableBin::locate_zeta(), and NonRefineableBinArray::locate_zeta().


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