Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CGALSamplePointContainer Class Reference

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// More...

#include <sample_point_container.h>

+ Inheritance diagram for CGALSamplePointContainer:

Public Member Functions

 CGALSamplePointContainer (SamplePointContainerParameters *sample_point_container_parameters_pt)
 Constructor. More...
 
 CGALSamplePointContainer (const CGALSamplePointContainer &data)=delete
 Broken copy constructor. More...
 
void operator= (const CGALSamplePointContainer &)=delete
 Broken assignment operator. More...
 
virtual ~CGALSamplePointContainer ()
 Virtual destructor. More...
 
unsigned & first_sample_point_to_actually_lookup_during_locate_zeta ()
 When searching through sample points only actually do the locate_zeta calls when when the counter exceeds this value. More...
 
unsigned & last_sample_point_to_actually_lookup_during_locate_zeta ()
 When searching through sample points only actually do the locate_zeta calls when when the counter is less than this value. More...
 
unsigned & multiplier_for_max_sample_point_to_actually_lookup_during_locate_zeta ()
 Every time we've completed a "spiral", visiting a finite number of sample points in a deterministic order, use this multiplier to increase the max. number of sample points to be visited. Using a multiplier rather than a constant increment increases the amount of (more and more unlikely to yield anything!) work done locally before doing another costly mpi round trip when we're already far from the point we're trying to find. More...
 
unsigned & initial_last_sample_point_to_actually_lookup_during_locate_zeta ()
 When searching through sample points only actually do the locate_zeta calls when when the counter exceeds this value. This is the initial value when starting the spiral based search. 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 limited_locate_zeta (const Vector< double > &zeta, const unsigned &max_sample_points_for_newton_based_search, GeomObject *&sub_geom_object_pt, Vector< double > &s)
 Find the sub geometric object and local coordinate therein that corresponds to the intrinsic coordinate zeta, using up to the specified number of sample points as initial guess for the Newton-based search. If this fails, return the nearest sample point. More...
 
unsigned ndim_zeta () const
 Dimension of the zeta ( = dim of local coordinate of elements) More...
 
unsigned total_number_of_sample_points_computed_recursively () const
 Compute total number of sample points in sample point container. More...
 
- Public Member Functions inherited from 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)
 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 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...
 
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...
 

Private Types

typedef CGAL::Cartesian_d< double > Kernel_d
 typedefs for cgal stuff More...
 
typedef Kernel_d::Point_d Point_d
 
typedef boost::tuple< Point_d, SamplePoint * > Point_d_and_pointer
 
typedef CGAL::Search_traits_d< Kernel_dTraits_base_d
 
typedef CGAL::Search_traits_adapter< Point_d_and_pointer, CGAL::Nth_of_tuple_property_map< 0, Point_d_and_pointer >, Traits_base_dTraits_d
 
typedef CGAL::Orthogonal_k_neighbor_search< Traits_dK_neighbor_search_d
 

Private Member Functions

double get_sample_points ()
 Get the sample points; return time for setup of CGAL tree. More...
 

Private Attributes

unsigned Ndim_zeta
 Dimension of the zeta ( = dim of local coordinate of elements) More...
 
Vector< Point_dCGAL_sample_point_zeta_d
 Vector containing sample point coordinates. More...
 
K_neighbor_search_d::Tree * CGAL_tree_d_pt
 Pointer to tree-based representation of sample points. More...
 
Vector< SamplePoint * > Sample_point_pt
 Vector storing pointers to sample point objects (which represent sample point in terms of number of element in its mesh and number of sample point) More...
 
unsigned First_sample_point_to_actually_lookup_during_locate_zeta
 When searching through sample points only actually do the locate_zeta calls when when the counter exceeds this value. More...
 
unsigned Last_sample_point_to_actually_lookup_during_locate_zeta
 When searching through sample points only actually do the locate_zeta calls when when the counter is less than this value. More...
 
unsigned Multiplier_for_max_sample_point_to_actually_lookup_during_locate_zeta
 Every time we've completed a "spiral", visiting a finite number of sample points in a deterministic order, use this multiplier to increase the max. number of sample points to be visited. Using a multiplier rather than a constant increment increases the amount of (more and more unlikely to yield anything!) work done locally before doing another costly mpi round trip when we're already far from the point we're trying to find. More...
 
unsigned Initial_last_sample_point_to_actually_lookup_during_locate_zeta
 When searching through sample points only actually do the locate_zeta calls when when the counter exceeds this value. This is the initial value when starting the "spiral based" search. More...
 

Additional Inherited Members

- Static Public Attributes inherited from SamplePointContainer
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 inherited from SamplePointContainer
void setup_min_and_max_coordinates ()
 Helper function to compute the min and max coordinates for the mesh, in each dimension. More...
 
- Protected Attributes inherited from SamplePointContainer
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

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

CGAL-based SamplePointContainer

Definition at line 1039 of file sample_point_container.h.

Member Typedef Documentation

◆ K_neighbor_search_d

typedef CGAL::Orthogonal_k_neighbor_search<Traits_d> CGALSamplePointContainer::K_neighbor_search_d
private

Definition at line 1146 of file sample_point_container.h.

◆ Kernel_d

typedef CGAL::Cartesian_d<double> CGALSamplePointContainer::Kernel_d
private

typedefs for cgal stuff

Definition at line 1137 of file sample_point_container.h.

◆ Point_d

typedef Kernel_d::Point_d CGALSamplePointContainer::Point_d
private

Definition at line 1138 of file sample_point_container.h.

◆ Point_d_and_pointer

Definition at line 1139 of file sample_point_container.h.

◆ Traits_base_d

typedef CGAL::Search_traits_d<Kernel_d> CGALSamplePointContainer::Traits_base_d
private

Definition at line 1140 of file sample_point_container.h.

◆ Traits_d

typedef CGAL::Search_traits_adapter< Point_d_and_pointer, CGAL::Nth_of_tuple_property_map<0, Point_d_and_pointer>, Traits_base_d> CGALSamplePointContainer::Traits_d
private

Definition at line 1145 of file sample_point_container.h.

Constructor & Destructor Documentation

◆ CGALSamplePointContainer() [1/2]

CGALSamplePointContainer::CGALSamplePointContainer ( SamplePointContainerParameters *  sample_point_container_parameters_pt)

◆ CGALSamplePointContainer() [2/2]

CGALSamplePointContainer::CGALSamplePointContainer ( const CGALSamplePointContainer data)
delete

Broken copy constructor.

◆ ~CGALSamplePointContainer()

virtual CGALSamplePointContainer::~CGALSamplePointContainer ( )
inlinevirtual

Virtual destructor.

Definition at line 1053 of file sample_point_container.h.

References CGAL_tree_d_pt, i, and Sample_point_pt.

Member Function Documentation

◆ first_sample_point_to_actually_lookup_during_locate_zeta()

unsigned & CGALSamplePointContainer::first_sample_point_to_actually_lookup_during_locate_zeta ( )
inline

When searching through sample points only actually do the locate_zeta calls when when the counter exceeds this value.

Definition at line 1067 of file sample_point_container.h.

References First_sample_point_to_actually_lookup_during_locate_zeta.

Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), and locate_zeta().

◆ get_sample_points()

double CGALSamplePointContainer::get_sample_points ( )
private

◆ initial_last_sample_point_to_actually_lookup_during_locate_zeta()

unsigned & CGALSamplePointContainer::initial_last_sample_point_to_actually_lookup_during_locate_zeta ( )
inline

When searching through sample points only actually do the locate_zeta calls when when the counter exceeds this value. This is the initial value when starting the spiral based search.

Definition at line 1095 of file sample_point_container.h.

References Initial_last_sample_point_to_actually_lookup_during_locate_zeta.

Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction().

◆ last_sample_point_to_actually_lookup_during_locate_zeta()

unsigned & CGALSamplePointContainer::last_sample_point_to_actually_lookup_during_locate_zeta ( )
inline

When searching through sample points only actually do the locate_zeta calls when when the counter is less than this value.

Definition at line 1074 of file sample_point_container.h.

References Last_sample_point_to_actually_lookup_during_locate_zeta.

Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), and locate_zeta().

◆ limited_locate_zeta()

void CGALSamplePointContainer::limited_locate_zeta ( const Vector< double > &  zeta,
const unsigned &  max_sample_points_for_newton_based_search,
GeomObject *&  sub_geom_object_pt,
Vector< double > &  s 
)

◆ locate_zeta()

void CGALSamplePointContainer::locate_zeta ( const Vector< double > &  zeta,
GeomObject *&  sub_geom_object_pt,
Vector< double > &  s 
)
virtual

◆ multiplier_for_max_sample_point_to_actually_lookup_during_locate_zeta()

unsigned & CGALSamplePointContainer::multiplier_for_max_sample_point_to_actually_lookup_during_locate_zeta ( )
inline

Every time we've completed a "spiral", visiting a finite number of sample points in a deterministic order, use this multiplier to increase the max. number of sample points to be visited. Using a multiplier rather than a constant increment increases the amount of (more and more unlikely to yield anything!) work done locally before doing another costly mpi round trip when we're already far from the point we're trying to find.

Definition at line 1087 of file sample_point_container.h.

References Multiplier_for_max_sample_point_to_actually_lookup_during_locate_zeta.

Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction().

◆ ndim_zeta()

unsigned CGALSamplePointContainer::ndim_zeta ( ) const
inlinevirtual

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

Implements SamplePointContainer.

Definition at line 1121 of file sample_point_container.h.

References Ndim_zeta.

Referenced by get_sample_points(), limited_locate_zeta(), and locate_zeta().

◆ operator=()

void CGALSamplePointContainer::operator= ( const CGALSamplePointContainer )
delete

Broken assignment operator.

◆ total_number_of_sample_points_computed_recursively()

unsigned CGALSamplePointContainer::total_number_of_sample_points_computed_recursively ( ) const
virtual

Compute total number of sample points in sample point container.

Implements SamplePointContainer.

Definition at line 3593 of file sample_point_container.cc.

References Sample_point_pt.

Referenced by oomph::Multi_domain_functions::aux_setup_multi_domain_interaction(), and CGALSamplePointContainer().

Member Data Documentation

◆ CGAL_sample_point_zeta_d

Vector<Point_d> CGALSamplePointContainer::CGAL_sample_point_zeta_d
private

Vector containing sample point coordinates.

Definition at line 1149 of file sample_point_container.h.

Referenced by get_sample_points().

◆ CGAL_tree_d_pt

K_neighbor_search_d::Tree* CGALSamplePointContainer::CGAL_tree_d_pt
private

Pointer to tree-based representation of sample points.

Definition at line 1152 of file sample_point_container.h.

Referenced by get_sample_points(), limited_locate_zeta(), locate_zeta(), and ~CGALSamplePointContainer().

◆ First_sample_point_to_actually_lookup_during_locate_zeta

unsigned CGALSamplePointContainer::First_sample_point_to_actually_lookup_during_locate_zeta
private

When searching through sample points only actually do the locate_zeta calls when when the counter exceeds this value.

Definition at line 1161 of file sample_point_container.h.

Referenced by CGALSamplePointContainer(), and first_sample_point_to_actually_lookup_during_locate_zeta().

◆ Initial_last_sample_point_to_actually_lookup_during_locate_zeta

unsigned CGALSamplePointContainer::Initial_last_sample_point_to_actually_lookup_during_locate_zeta
private

When searching through sample points only actually do the locate_zeta calls when when the counter exceeds this value. This is the initial value when starting the "spiral based" search.

Definition at line 1180 of file sample_point_container.h.

Referenced by CGALSamplePointContainer(), and initial_last_sample_point_to_actually_lookup_during_locate_zeta().

◆ Last_sample_point_to_actually_lookup_during_locate_zeta

unsigned CGALSamplePointContainer::Last_sample_point_to_actually_lookup_during_locate_zeta
private

When searching through sample points only actually do the locate_zeta calls when when the counter is less than this value.

Definition at line 1165 of file sample_point_container.h.

Referenced by CGALSamplePointContainer(), and last_sample_point_to_actually_lookup_during_locate_zeta().

◆ Multiplier_for_max_sample_point_to_actually_lookup_during_locate_zeta

unsigned CGALSamplePointContainer::Multiplier_for_max_sample_point_to_actually_lookup_during_locate_zeta
private

Every time we've completed a "spiral", visiting a finite number of sample points in a deterministic order, use this multiplier to increase the max. number of sample points to be visited. Using a multiplier rather than a constant increment increases the amount of (more and more unlikely to yield anything!) work done locally before doing another costly mpi round trip when we're already far from the point we're trying to find.

Definition at line 1175 of file sample_point_container.h.

Referenced by CGALSamplePointContainer(), and multiplier_for_max_sample_point_to_actually_lookup_during_locate_zeta().

◆ Ndim_zeta

unsigned CGALSamplePointContainer::Ndim_zeta
private

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

Definition at line 1134 of file sample_point_container.h.

Referenced by CGALSamplePointContainer(), and ndim_zeta().

◆ Sample_point_pt

Vector<SamplePoint*> CGALSamplePointContainer::Sample_point_pt
private

Vector storing pointers to sample point objects (which represent sample point in terms of number of element in its mesh and number of sample point)

Definition at line 1157 of file sample_point_container.h.

Referenced by get_sample_points(), limited_locate_zeta(), locate_zeta(), total_number_of_sample_points_computed_recursively(), and ~CGALSamplePointContainer().


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