RefineableBin Class Reference

#include <sample_point_container.h>

Public Member Functions

 RefineableBin (RefineableBinArray *bin_array_pt, const unsigned &bin_index_in_bin_array)
 
 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)
 
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)
 
void get_bin_boundaries (Vector< std::pair< double, double >> &min_and_max_coordinates)
 

Protected Attributes

Vector< SamplePoint * > * Sample_point_pt
 
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.

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

114  : Sample_point_pt(0),
115  Sub_bin_array_pt(0),
116  Bin_array_pt(bin_array_pt),
117  Bin_index_in_bin_array(bin_index_in_bin_array)
118  {
119  }
RefineableBinArray * Sub_bin_array_pt
Pointer to a possible sub-BinArray. Null by default.
Definition: sample_point_container.h:174
unsigned Bin_index_in_bin_array
Index of bin in its bin array.
Definition: sample_point_container.h:180
Vector< SamplePoint * > * Sample_point_pt
Definition: sample_point_container.h:171
RefineableBinArray * Bin_array_pt
Pointer to the bin array which "owns" this RefineableBin.
Definition: sample_point_container.h:177

◆ RefineableBin() [2/2]

RefineableBin::RefineableBin ( const RefineableBin data)
delete

Broken copy constructor.

◆ ~RefineableBin()

RefineableBin::~RefineableBin ( )

Destructor.

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

43  {
44  if (Sub_bin_array_pt != 0)
45  {
46  delete Sub_bin_array_pt;
47  }
48  Sub_bin_array_pt = 0;
49 
50  if (Sample_point_pt != 0)
51  {
52  unsigned n = Sample_point_pt->size();
53  for (unsigned i = 0; i < n; i++)
54  {
55  delete (*Sample_point_pt)[i];
56  }
57  delete Sample_point_pt;
58  }
59  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11

References i, and n.

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.

394  {
395  // If the bin is a "leaf" (ie no sub bin array)
396  if (Sub_bin_array_pt == 0)
397  {
398  // if there is no Sample_point_pt create it
399  if (Sample_point_pt == 0)
400  {
401  Sample_point_pt = new Vector<SamplePoint*>;
402  }
403  this->Sample_point_pt->push_back(new_sample_point_pt);
404 
405  // If we are recursive (ie not at the maximum depth or not
406  // in fill bin by diffusion configuration) and if the number
407  // of elements there are in the RefineableBin is bigger than the maximum
408  // one
410  (Sample_point_pt->size() >
413  {
414  // Get min and max coordinates of current bin...
415  Vector<std::pair<double, double>> min_and_max_coordinates(
417  get_bin_boundaries(min_and_max_coordinates);
418 
419  // ...and use them as the boundaries for new sub-bin-array
420  // (this transfers all the new points into the new sub-bin-array
421  this->make_sub_bin_array(min_and_max_coordinates);
422  }
423  }
424  else // if the bin has a sub bin array
425  {
426  // we call the corresponding method of the sub bin array
427  this->Sub_bin_array_pt->add_sample_point(new_sample_point_pt,
428  zeta_coordinates);
429  }
430  }
unsigned ndim_zeta() const
Dimension of the zeta ( = dim of local coordinate of elements)
Definition: sample_point_container.h:480
unsigned depth() const
Depth of the hierarchical bin_array.
Definition: sample_point_container.h:641
unsigned max_depth() const
Max depth of the hierarchical bin_array; const version.
Definition: sample_point_container.h:647
bool bin_array_is_recursive() const
Is the BinArray recursive?
Definition: sample_point_container.h:659
void add_sample_point(SamplePoint *new_sample_point_pt, const Vector< double > &zeta)
Add specified SamplePoint to RefineableBinArray.
Definition: sample_point_container.h:612
unsigned max_number_of_sample_point_per_bin() const
Definition: sample_point_container.h:666
void get_bin_boundaries(Vector< std::pair< double, double >> &min_and_max_coordinates)
Definition: sample_point_container.cc:603
void make_sub_bin_array(const Vector< std::pair< double, double >> &min_and_max_coordinates)
Definition: sample_point_container.cc:91

◆ 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

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

605  {
606  unsigned n_bin = Bin_index_in_bin_array;
607 
608  // temporary storage for the eulerian dim
609  unsigned current_dim = Bin_array_pt->ndim_zeta();
610  min_and_max_coordinates.resize(current_dim);
611  for (unsigned u = 0; u < current_dim; u++)
612  {
613  // The number of bins there are according to the u-th dimension
614  double nbin_in_dir = n_bin % Bin_array_pt->dimension_of_bin_array(u);
616 
617  // The range between the maximum and minimum u-th coordinates of a bin
618  double range = (Bin_array_pt->min_and_max_coordinates(u).second -
621 
622  // Now updating the minimum and maximum u-th coordinates for this bin.
623  min_and_max_coordinates[u].first =
624  Bin_array_pt->min_and_max_coordinates(u).first + nbin_in_dir * range;
625  min_and_max_coordinates[u].second =
626  min_and_max_coordinates[u].first + range;
627  }
628  }
unsigned dimension_of_bin_array(const unsigned &i) const
Number of bins in coordinate direction i.
Definition: sample_point_container.h:486
const std::pair< double, double > & min_and_max_coordinates(const unsigned &i) const
Definition: sample_point_container.h:282

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

441  {
442  // Haven't found zeta yet!
443  sub_geom_object_pt = 0;
444 
445  // Descend?
446  if (Sub_bin_array_pt != 0)
447  {
448  Sub_bin_array_pt->locate_zeta(zeta, sub_geom_object_pt, s);
449  }
450  else
451  {
452  // Do we have to look into any sample points in this bin?
453  // NOTE: There's some slight potential for overlap/duplication
454  // because we always search through all the sample points in a bin
455  // (unless we find the required point in which case we stop).
456  bool do_it = true;
457  if (
462  {
463  // oomph_info << "Not doing it (ref-bin) because counter less than
464  // first" << std::endl;
465  do_it = false;
466  }
467  if (
472  {
473  // oomph_info << "Not doing it (ref-bin) because counter more than last"
474  // << std::endl;
475  do_it = false;
476  }
477  double max_search_radius =
479  bool dont_do_it_because_of_radius = false;
480  if (max_search_radius < DBL_MAX)
481  {
482  // Base "radius" of bin on centre of gravity
483  unsigned n = zeta.size();
484  double dist_squared = 0.0;
485  double cog = 0.0;
486  double aux = 0.0;
487  Vector<std::pair<double, double>> min_and_max_coordinates(n);
488  get_bin_boundaries(min_and_max_coordinates);
489  for (unsigned i = 0; i < n; i++)
490  {
491  cog = 0.5 * (min_and_max_coordinates[i].first +
492  min_and_max_coordinates[i].second);
493  aux = (cog - zeta[i]);
494  dist_squared += aux * aux;
495  }
496  if (dist_squared > max_search_radius * max_search_radius)
497  {
498  do_it = false;
499  dont_do_it_because_of_radius = true;
500  }
501  }
502 
503  if (!do_it)
504  {
505  if (!dont_do_it_because_of_radius)
506  {
507  // Skip all the sample points in this bin
510  Sample_point_pt->size();
511  }
512  return;
513  }
514 
515 
516  // Now search through (at most) all the sample points in this bin
517  unsigned n_sample_point = Sample_point_pt->size();
518  unsigned i = 0;
519  while ((i < n_sample_point) && (sub_geom_object_pt == 0))
520  {
521  // Get the corresponding finite element
522  FiniteElement* el_pt = Bin_array_pt->mesh_pt()->finite_element_pt(
523  (*Sample_point_pt)[i]->element_index_in_mesh());
524 
525 #ifdef OOMPH_HAS_MPI
526  // We only look at the sample point if it isn't halo
527  // if we are set up to ignore the halo elements
528  if ((Bin_array_pt->ignore_halo_elements_during_locate_zeta_search()) &&
529  (el_pt->is_halo()))
530  {
531  // Halo
532  }
533  else
534  {
535 #endif
536  // Provide initial guess for Newton search using local coordinate
537  // of sample point
538  bool use_equally_spaced_interior_sample_points =
540  unsigned j = (*Sample_point_pt)[i]->sample_point_index_in_element();
541  el_pt->get_s_plot(
542  j,
544  s,
545  use_equally_spaced_interior_sample_points);
546 
547 
548  // History of sample points visited
550  {
551  unsigned cached_dim_zeta = Bin_array_pt->ndim_zeta();
552  Vector<double> zeta_sample(cached_dim_zeta);
554  {
555  el_pt->interpolated_x(s, zeta_sample);
556  }
557  else
558  {
559  el_pt->interpolated_zeta(s, zeta_sample);
560  }
561  double dist = 0.0;
562  for (unsigned ii = 0; ii < cached_dim_zeta; ii++)
563  {
564  BinArray::Visited_sample_points_file << zeta_sample[ii] << " ";
565  dist +=
566  (zeta[ii] - zeta_sample[ii]) * (zeta[ii] - zeta_sample[ii]);
567  }
571  << " " << sqrt(dist) << std::endl;
572  }
573 
574 
575  // Bump counter
578 
579  bool use_coordinate_as_initial_guess = true;
580  el_pt->locate_zeta(
581  zeta, sub_geom_object_pt, s, use_coordinate_as_initial_guess);
582 
583  // Always fail? (Used for debugging, e.g. to trace out
584  // spiral path)
586  {
587  sub_geom_object_pt = 0;
588  }
589 
590 #ifdef OOMPH_HAS_MPI
591  }
592 #endif
593  // Next one please
594  i++;
595  }
596  }
597  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
void locate_zeta(const Vector< double > &zeta, GeomObject *&sub_geom_object_pt, Vector< double > &s)
Definition: sample_point_container.cc:2002
unsigned & total_number_of_sample_points_visited_during_locate_zeta_from_top_level()
Definition: sample_point_container.h:696
RefineableBinArray * root_bin_array_pt() const
Root bin array.
Definition: sample_point_container.h:547
unsigned & first_sample_point_to_actually_lookup_during_locate_zeta()
Definition: sample_point_container.h:712
unsigned & last_sample_point_to_actually_lookup_during_locate_zeta()
Definition: sample_point_container.h:720
static bool Always_fail_elemental_locate_zeta
Boolean flag to make to make locate zeta fail.
Definition: sample_point_container.h:339
unsigned & nsample_points_generated_per_element()
"Measure of" number of sample points generated in each element
Definition: sample_point_container.h:314
bool use_eulerian_coordinates_during_setup() const
Definition: sample_point_container.h:308
static std::ofstream Visited_sample_points_file
File to record sequence of visited sample points in.
Definition: sample_point_container.h:335
double & max_search_radius()
Definition: sample_point_container.h:327
Mesh * mesh_pt() const
Pointer to mesh from whose FiniteElements sample points are created.
Definition: sample_point_container.h:275
static bool Use_equally_spaced_interior_sample_points
Definition: sample_point_container.h:343
RealScalar s
Definition: level1_cplx_impl.h:130
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References SamplePointContainer::Always_fail_elemental_locate_zeta, i, j, n, s, sqrt(), SamplePointContainer::Use_equally_spaced_interior_sample_points, SamplePointContainer::Visited_sample_points_file, and Eigen::zeta().

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

93  {
94  // Setup parameters for sub-bin
95  RefineableBinArrayParameters* ref_bin_array_parameters_pt =
96  new RefineableBinArrayParameters(Bin_array_pt->mesh_pt());
97 
98  // Pass coordinates and dimensions
99  ref_bin_array_parameters_pt->min_and_max_coordinates() =
100  min_and_max_coordinates;
101 
102  ref_bin_array_parameters_pt->dimensions_of_bin_array() =
104 
105  // Eulerian coordinates or zeta?
107  {
108  ref_bin_array_parameters_pt
109  ->enable_use_eulerian_coordinates_during_setup();
110  }
111  else
112  {
113  ref_bin_array_parameters_pt
114  ->disable_use_eulerian_coordinates_during_setup();
115  }
116 
117 
118 #ifdef OOMPH_HAS_MPI
119 
120  // How do we handle halo elements?
121  if (Bin_array_pt->ignore_halo_elements_during_locate_zeta_search())
122  {
123  ref_bin_array_parameters_pt
124  ->enable_ignore_halo_elements_during_locate_zeta_search();
125  }
126  else
127  {
128  ref_bin_array_parameters_pt
129  ->disable_ignore_halo_elements_during_locate_zeta_search();
130  }
131 
132 #endif
133 
134  // "Measure of" number of sample points per element
135  ref_bin_array_parameters_pt->nsample_points_generated_per_element() =
137 
138 
139  // Is it recursive?
141  {
142  ref_bin_array_parameters_pt->enable_bin_array_is_recursive();
143  }
144  else
145  {
146  ref_bin_array_parameters_pt->disable_bin_array_is_recursive();
147  }
148 
149  // Depth
150  ref_bin_array_parameters_pt->depth() = Bin_array_pt->depth() + 1;
151 
152  // Max. depth
153  ref_bin_array_parameters_pt->max_depth() = Bin_array_pt->max_depth();
154 
155  // Max. number of sample points before it's subdivided
156  ref_bin_array_parameters_pt->max_number_of_sample_point_per_bin() =
158 
159  // Root bin array
160  ref_bin_array_parameters_pt->root_bin_array_pt() =
162 
163  // We first construct a new bin array, providing the right parameters
164  BinArrayParameters* bin_array_parameters_pt = ref_bin_array_parameters_pt;
165  Sub_bin_array_pt = new RefineableBinArray(bin_array_parameters_pt);
166  delete ref_bin_array_parameters_pt;
167 
168  // Fill it
170 
171  // Now deleting Sample_point_pt, we no longer need it; note that
172  // sample points themselves stay alive!
173  delete Sample_point_pt;
174  Sample_point_pt = 0;
175  }
Vector< unsigned > dimensions_of_bin_array() const
Definition: sample_point_container.h:494
RefineableBinArray class.
Definition: sample_point_container.h:521
void fill_bin_array(const Vector< SamplePoint * > &sample_point_pt)
Fill the bin array with specified SamplePoints.
Definition: sample_point_container.h:574

◆ nsample_points_in_bin()

unsigned RefineableBin::nsample_points_in_bin ( )
inline

Number of sample points stored in bin.

156  {
157  if (Sample_point_pt == 0)
158  {
159  return 0;
160  }
161  else
162  {
163  return Sample_point_pt->size();
164  }
165  }

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.

182  {
183  // Recurse?
184  if ((Sub_bin_array_pt != 0) && (!don_t_recurse))
185  {
186  Sub_bin_array_pt->output_bins(outfile);
187  }
188  else
189  {
190  unsigned n_lagr = Bin_array_pt->ndim_zeta();
191  Vector<std::pair<double, double>> min_and_max_coordinates(n_lagr);
192  get_bin_boundaries(min_and_max_coordinates);
193 
194  // How many sample points do we have in this bin?
195  unsigned n_sample_points = 0;
196  if (Sample_point_pt != 0)
197  {
198  n_sample_points = Sample_point_pt->size();
199  }
200 
201  switch (n_lagr)
202  {
203  case 1:
204  outfile << "ZONE I=2\n"
205  << min_and_max_coordinates[0].first << " " << n_sample_points
206  << std::endl
207  << min_and_max_coordinates[0].second << " " << n_sample_points
208  << std::endl;
209  break;
210 
211  case 2:
212 
213  outfile << "ZONE I=2, J=2\n"
214  << min_and_max_coordinates[0].first << " "
215  << min_and_max_coordinates[1].first << " " << n_sample_points
216  << "\n"
217 
218  << min_and_max_coordinates[0].second << " "
219  << min_and_max_coordinates[1].first << " " << n_sample_points
220  << "\n"
221 
222  << min_and_max_coordinates[0].first << " "
223  << min_and_max_coordinates[1].second << " " << n_sample_points
224  << "\n"
225 
226  << min_and_max_coordinates[0].second << " "
227  << min_and_max_coordinates[1].second << " " << n_sample_points
228  << "\n";
229  break;
230 
231  case 3:
232 
233 
234  outfile << "ZONE I=2, J=2, K=2\n"
235  << min_and_max_coordinates[0].first << " "
236  << min_and_max_coordinates[1].first << " "
237  << min_and_max_coordinates[2].first << " " << n_sample_points
238  << "\n"
239 
240  << min_and_max_coordinates[0].second << " "
241  << min_and_max_coordinates[1].first << " "
242  << min_and_max_coordinates[2].first << " " << n_sample_points
243  << "\n"
244 
245  << min_and_max_coordinates[0].first << " "
246  << min_and_max_coordinates[1].second << " "
247  << min_and_max_coordinates[2].first << " " << n_sample_points
248  << "\n"
249 
250  << min_and_max_coordinates[0].second << " "
251  << min_and_max_coordinates[1].second << " "
252  << min_and_max_coordinates[2].first << " " << n_sample_points
253  << "\n"
254 
255  << min_and_max_coordinates[0].first << " "
256  << min_and_max_coordinates[1].first << " "
257  << min_and_max_coordinates[2].second << " " << n_sample_points
258  << "\n"
259 
260  << min_and_max_coordinates[0].second << " "
261  << min_and_max_coordinates[1].first << " "
262  << min_and_max_coordinates[2].second << " " << n_sample_points
263  << "\n"
264 
265  << min_and_max_coordinates[0].first << " "
266  << min_and_max_coordinates[1].second << " "
267  << min_and_max_coordinates[2].second << " " << n_sample_points
268  << "\n"
269 
270  << min_and_max_coordinates[0].second << " "
271  << min_and_max_coordinates[1].second << " "
272  << min_and_max_coordinates[2].second << " " << n_sample_points
273  << "\n";
274 
275  break;
276 
277  default:
278 
279  oomph_info << "n_lagr=" << n_lagr << std::endl;
280  throw OomphLibError("Wrong dimension",
283  }
284  }
285  }
void output_bins(std::ofstream &outfile)
Output bins.
Definition: sample_point_container.h:672
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and 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]].

292  {
293  // Recurse?
294  if (Sub_bin_array_pt != 0)
295  {
297  }
298  else
299  {
300  unsigned n_lagr = Bin_array_pt->ndim_zeta();
301  Vector<std::pair<double, double>> min_and_max_coordinates(n_lagr);
302  get_bin_boundaries(min_and_max_coordinates);
303 
304  switch (n_lagr)
305  {
306  case 1:
307  outfile << "ZONE I=2\n"
308  << min_and_max_coordinates[0].first << std::endl
309  << min_and_max_coordinates[0].second << std::endl;
310  break;
311 
312  case 2:
313 
314  outfile << "ZONE I=2, J=2\n"
315  << min_and_max_coordinates[0].first << " "
316  << min_and_max_coordinates[1].first << " "
317  << "\n"
318 
319  << min_and_max_coordinates[0].second << " "
320  << min_and_max_coordinates[1].first << " "
321  << "\n"
322 
323  << min_and_max_coordinates[0].first << " "
324  << min_and_max_coordinates[1].second << " "
325  << "\n"
326 
327  << min_and_max_coordinates[0].second << " "
328  << min_and_max_coordinates[1].second << " "
329  << "\n";
330  break;
331 
332  case 3:
333 
334 
335  outfile << "ZONE I=2, J=2, K=2\n"
336  << min_and_max_coordinates[0].first << " "
337  << min_and_max_coordinates[1].first << " "
338  << min_and_max_coordinates[2].first << " "
339  << "\n"
340 
341  << min_and_max_coordinates[0].second << " "
342  << min_and_max_coordinates[1].first << " "
343  << min_and_max_coordinates[2].first << " "
344  << "\n"
345 
346  << min_and_max_coordinates[0].first << " "
347  << min_and_max_coordinates[1].second << " "
348  << min_and_max_coordinates[2].first << " "
349  << "\n"
350 
351  << min_and_max_coordinates[0].second << " "
352  << min_and_max_coordinates[1].second << " "
353  << min_and_max_coordinates[2].first << " "
354  << "\n"
355 
356  << min_and_max_coordinates[0].first << " "
357  << min_and_max_coordinates[1].first << " "
358  << min_and_max_coordinates[2].second << " "
359  << "\n"
360 
361  << min_and_max_coordinates[0].second << " "
362  << min_and_max_coordinates[1].first << " "
363  << min_and_max_coordinates[2].second << " "
364  << "\n"
365 
366  << min_and_max_coordinates[0].first << " "
367  << min_and_max_coordinates[1].second << " "
368  << min_and_max_coordinates[2].second << " "
369  << "\n"
370 
371  << min_and_max_coordinates[0].second << " "
372  << min_and_max_coordinates[1].second << " "
373  << min_and_max_coordinates[2].second << " "
374  << "\n";
375 
376  break;
377 
378  default:
379 
380  oomph_info << "n_lagr=" << n_lagr << std::endl;
381  throw OomphLibError("Wrong dimension",
384  }
385  }
386  }
void output_bin_vertices(std::ofstream &outfile)
Output bin vertices (allowing display of bins as zones).
Definition: sample_point_container.cc:1027

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and 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.

67  {
68  unsigned count = 0;
69 
70  // Recurse?
71  if (Sub_bin_array_pt != 0)
72  {
73  count =
75  }
76  else
77  {
78  if (Sample_point_pt != 0)
79  {
80  count = Sample_point_pt->size();
81  }
82  }
83  return count;
84  }
unsigned total_number_of_sample_points_computed_recursively() const
Compute total number of sample points recursively.
Definition: sample_point_container.cc:1820

Member Data Documentation

◆ Bin_array_pt

RefineableBinArray* RefineableBin::Bin_array_pt
protected

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

◆ Bin_index_in_bin_array

unsigned RefineableBin::Bin_index_in_bin_array
protected

Index of bin in its bin array.

◆ 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!)

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.


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