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

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// 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)=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...
 

Detailed Description

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

Base class for all sample point containers

Definition at line 205 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 209 of file sample_point_container.h.

References Max_search_radius.

◆ SamplePointContainer() [2/3]

SamplePointContainer::SamplePointContainer ( )
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.

◆ SamplePointContainer() [3/3]

SamplePointContainer::SamplePointContainer ( const SamplePointContainer data)
delete

Broken copy constructor.

◆ ~SamplePointContainer()

virtual SamplePointContainer::~SamplePointContainer ( )
inlinevirtual

Virtual destructor.

Definition at line 248 of file sample_point_container.h.

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 327 of file sample_point_container.h.

References Max_search_radius.

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 275 of file sample_point_container.h.

References Mesh_pt.

◆ min_and_max_coordinates() [1/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 290 of file sample_point_container.h.

References Min_and_max_coordinates.

Referenced by RefineableBinArray::output_neighbouring_bins().

◆ min_and_max_coordinates() [2/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 282 of file sample_point_container.h.

References i, and Min_and_max_coordinates.

Referenced by oomph::RefineableGmshTetMesh< ELEMENT >::adapt().

◆ 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 314 of file sample_point_container.h.

References Nsample_points_generated_per_element.

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

◆ operator=()

void SamplePointContainer::operator= ( const SamplePointContainer )
delete

Broken assignment operator.

◆ 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 684 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 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().

◆ 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 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().

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 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().

◆ Enable_timing_of_setup

bool SamplePointContainer::Enable_timing_of_setup = false
static

◆ Ignore_halo_elements_during_locate_zeta_search

bool SamplePointContainer::Ignore_halo_elements_during_locate_zeta_search
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().

◆ 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 389 of file sample_point_container.h.

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

◆ 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

◆ Percentage_offset

double SamplePointContainer::Percentage_offset = 5.0
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().

◆ 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 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().

◆ Visited_sample_points_file

std::ofstream SamplePointContainer::Visited_sample_points_file
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().


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