sample_point_parameters.h
Go to the documentation of this file.
1 // LIC// ====================================================================
2 // LIC// This file forms part of oomph-lib, the object-oriented,
3 // LIC// multi-physics finite-element library, available
4 // LIC// at http://www.oomph-lib.org.
5 // LIC//
6 // LIC// Copyright (C) 2006-2022 Matthias Heil and Andrew Hazel
7 // LIC//
8 // LIC// This library is free software; you can redistribute it and/or
9 // LIC// modify it under the terms of the GNU Lesser General Public
10 // LIC// License as published by the Free Software Foundation; either
11 // LIC// version 2.1 of the License, or (at your option) any later version.
12 // LIC//
13 // LIC// This library is distributed in the hope that it will be useful,
14 // LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // LIC// Lesser General Public License for more details.
17 // LIC//
18 // LIC// You should have received a copy of the GNU Lesser General Public
19 // LIC// License along with this library; if not, write to the Free Software
20 // LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 // LIC// 02110-1301 USA.
22 // LIC//
23 // LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 // LIC//
25 // LIC//====================================================================
26 #ifndef SAMPLE_POINT_PARAMETERS_HEADER
27 #define SAMPLE_POINT_PARAMETERS_HEADER
28 
29 
30 // oomph-lib includes
31 #include "elements.h"
32 #include "mesh.h"
33 
34 namespace oomph
35 {
36  //=========================================================
38  //=========================================================
40  {
43 #ifdef OOMPH_HAS_CGAL
44  ,
45  UseCGALSamplePointContainer = 3
46 #endif
47  };
48 
49 
53 
54 
55  // Forward references
56  class RefineableBinArray;
58 
59 
63 
64 
65  //=========================================================================
68  //=========================================================================
70  {
71  public:
74  friend class BinArrayParameters;
77 #ifdef OOMPH_HAS_CGAL
78  friend class CGALSamplePointContainerParameters;
79 #endif
80 
83  delete;
84 
87 
90 
92  Mesh* mesh_pt() const
93  {
94  return Mesh_pt;
95  }
96 
102  {
104  }
105 
111  {
113  }
114 
118  {
120  }
121 
124  {
126  }
127 
131  {
133  }
134 
138  {
140  }
141 
145  {
147  }
148 
151  {
153  }
154 
157  {
159  }
160 
163  {
165  }
166 
169 
170  protected:
173 
179 
182 
187 
194 
195 
196  private:
201  : Mesh_pt(mesh_pt),
206  {
207  }
208 
212  {
213  // Throw the error
214  throw OomphLibError("Broken default constructor. Don't call this!",
217  }
218  };
219 
220 
224 
225 #ifdef OOMPH_HAS_CGAL
226 
227  //=========================================================================
230  //=========================================================================
231  class CGALSamplePointContainerParameters
232  : public virtual SamplePointContainerParameters
233  {
234  public:
236  CGALSamplePointContainerParameters(Mesh* mesh_pt)
237  : SamplePointContainerParameters(mesh_pt)
238  {
239  }
240 
241 
243  CGALSamplePointContainerParameters(
244  const CGALSamplePointContainerParameters& data) = delete;
245 
247  void operator=(const CGALSamplePointContainerParameters&) = delete;
248  };
249 
250 #endif
251 
255 
256 
257  //=========================================================================
260  //=========================================================================
262  {
263  public:
267 
270 
272  void operator=(const BinArrayParameters&) = delete;
273 
275  virtual ~BinArrayParameters() {}
276 
279  {
281  }
282 
285  {
287  }
288 
289  protected:
292 
293  private:
297  {
298  }
299 
303  {
304  // Throw the error
305  throw OomphLibError("Broken default constructor. Don't call this!",
308  }
309  };
310 
311 
315 
316 
317  //=========================================================================
320  //=========================================================================
322  {
323  public:
329  Depth(0),
334  {
335  }
336 
339  delete;
340 
343 
346 
347 
350  {
351  return Bin_array_is_recursive;
352  }
353 
356  {
357  Bin_array_is_recursive = true;
358  }
359 
362  {
363  Bin_array_is_recursive = false;
364  }
365 
367  unsigned& depth()
368  {
369  return Depth;
370  }
371 
374  unsigned depth() const
375  {
376  return Depth;
377  }
378 
380  unsigned& max_depth()
381  {
382  return Max_depth;
383  }
384 
387  unsigned max_depth() const
388  {
389  return Max_depth;
390  }
391 
395  {
397  }
398 
402  {
404  }
405 
408  {
409  return Root_bin_array_pt;
410  }
411 
414  {
415  return Root_bin_array_pt;
416  }
417 
419  static unsigned Default_max_depth;
420 
423 
424  private:
428 
432  unsigned Depth;
433 
435  unsigned Max_depth;
436 
440 
443  };
444 
445 
449 
450 
451  //=========================================================================
454  //=========================================================================
456  {
457  public:
463  {
464  }
465 
468  const NonRefineableBinArrayParameters& data) = delete;
469 
472 
475 
479  unsigned nspiral_chunk() const
480  {
481  return Nspiral_chunk;
482  }
485  unsigned& nspiral_chunk()
486  {
487  return Nspiral_chunk;
488  }
489 
492  static unsigned Default_nspiral_chunk;
493 
494  private:
497  unsigned Nspiral_chunk;
498  };
499 
500 } // namespace oomph
501 
502 #endif
int data[]
Definition: Map_placement_new.cpp:1
NonRefineableBinArray class.
Definition: sample_point_container.h:819
RefineableBinArray class.
Definition: sample_point_container.h:521
Definition: sample_point_parameters.h:262
BinArrayParameters()
Definition: sample_point_parameters.h:302
virtual ~BinArrayParameters()
Empty destructor.
Definition: sample_point_parameters.h:275
void operator=(const BinArrayParameters &)=delete
Broken assignment operator.
BinArrayParameters(const BinArrayParameters &data)=delete
Broken copy constructor.
Vector< unsigned > dimensions_of_bin_array() const
Number of bins in each coordinate direction. Const version.
Definition: sample_point_parameters.h:284
Vector< unsigned > & dimensions_of_bin_array()
Number of bins in each coordinate direction.
Definition: sample_point_parameters.h:278
BinArrayParameters(Mesh *mesh_pt)
Definition: sample_point_parameters.h:296
Vector< unsigned > Dimensions_of_bin_array
Number of bins in each coordinate direction.
Definition: sample_point_parameters.h:291
Definition: mesh.h:67
Definition: sample_point_parameters.h:456
static unsigned Default_nspiral_chunk
Definition: sample_point_parameters.h:492
virtual ~NonRefineableBinArrayParameters()
Empty destructor.
Definition: sample_point_parameters.h:474
void operator=(const NonRefineableBinArrayParameters &)=delete
Broken assignment operator.
unsigned Nspiral_chunk
Definition: sample_point_parameters.h:497
unsigned & nspiral_chunk()
Definition: sample_point_parameters.h:485
NonRefineableBinArrayParameters(Mesh *mesh_pt)
Constructor: Pass mesh.
Definition: sample_point_parameters.h:459
NonRefineableBinArrayParameters(const NonRefineableBinArrayParameters &data)=delete
Broken copy constructor.
unsigned nspiral_chunk() const
Definition: sample_point_parameters.h:479
Definition: oomph_definitions.h:222
Definition: sample_point_parameters.h:322
unsigned max_number_of_sample_point_per_bin() const
Definition: sample_point_parameters.h:401
bool bin_array_is_recursive() const
Is bin recursive?
Definition: sample_point_parameters.h:349
static unsigned Default_max_number_of_sample_point_per_bin
Default value for max. number of sample points before refinement.
Definition: sample_point_parameters.h:422
unsigned depth() const
Definition: sample_point_parameters.h:374
bool Bin_array_is_recursive
Definition: sample_point_parameters.h:427
RefineableBinArray * root_bin_array_pt() const
Pointer to root bin array; const version.
Definition: sample_point_parameters.h:413
unsigned Depth
Definition: sample_point_parameters.h:432
RefineableBinArray *& root_bin_array_pt()
Pointer to root bin array.
Definition: sample_point_parameters.h:407
unsigned Max_depth
Max. depth value of the bin_array.
Definition: sample_point_parameters.h:435
unsigned & depth()
Variable which stores the Depth value of the bin_array.
Definition: sample_point_parameters.h:367
static unsigned Default_max_depth
Default value for max. depth.
Definition: sample_point_parameters.h:419
unsigned max_depth() const
Definition: sample_point_parameters.h:387
unsigned & max_depth()
Max. depth value of the bin_array.
Definition: sample_point_parameters.h:380
RefineableBinArrayParameters(Mesh *mesh_pt)
Constructor: Pass mesh.
Definition: sample_point_parameters.h:325
unsigned & max_number_of_sample_point_per_bin()
Definition: sample_point_parameters.h:394
void operator=(const RefineableBinArrayParameters &)=delete
Broken assignment operator.
RefineableBinArray * Root_bin_array_pt
Pointer to root bin array.
Definition: sample_point_parameters.h:442
void enable_bin_array_is_recursive()
Enable recursiveness.
Definition: sample_point_parameters.h:355
RefineableBinArrayParameters(const RefineableBinArrayParameters &data)=delete
Broken copy constructor.
void disable_bin_array_is_recursive()
Disable recursiveness.
Definition: sample_point_parameters.h:361
unsigned Max_number_of_sample_point_per_bin
Definition: sample_point_parameters.h:439
virtual ~RefineableBinArrayParameters()
Empty destructor.
Definition: sample_point_parameters.h:345
Definition: sample_point_parameters.h:70
SamplePointContainerParameters(Mesh *mesh_pt)
Definition: sample_point_parameters.h:200
bool ignore_halo_elements_during_locate_zeta_search() const
Ignore halo elements? (MPI only)
Definition: sample_point_parameters.h:150
SamplePointContainerParameters()
Definition: sample_point_parameters.h:211
virtual ~SamplePointContainerParameters()
Empty destructor.
Definition: sample_point_parameters.h:89
unsigned & nsample_points_generated_per_element()
"Measure of" number of sample points generated in each element
Definition: sample_point_parameters.h:123
void enable_ignore_halo_elements_during_locate_zeta_search()
Enable Ignore halo elements? (MPI only)
Definition: sample_point_parameters.h:156
unsigned Nsample_points_generated_per_element
"Measure of" number of sample points generated in each element
Definition: sample_point_parameters.h:181
unsigned nsample_points_generated_per_element() const
Definition: sample_point_parameters.h:117
SamplePointContainerParameters(const SamplePointContainerParameters &data)=delete
Broken copy constructor.
void operator=(const SamplePointContainerParameters &)=delete
Broken assignment operator.
void enable_use_eulerian_coordinates_during_setup()
Definition: sample_point_parameters.h:137
Mesh * Mesh_pt
Pointer to mesh from whose FiniteElements sample points are created.
Definition: sample_point_parameters.h:172
Mesh * mesh_pt() const
Pointer to mesh from whose FiniteElements sample points are created.
Definition: sample_point_parameters.h:92
bool use_eulerian_coordinates_during_setup() const
Definition: sample_point_parameters.h:130
Vector< std::pair< double, double > > Min_and_max_coordinates
Definition: sample_point_parameters.h:178
void disable_use_eulerian_coordinates_during_setup()
Definition: sample_point_parameters.h:144
bool Use_eulerian_coordinates_during_setup
Definition: sample_point_parameters.h:186
Vector< std::pair< double, double > > min_and_max_coordinates() const
Definition: sample_point_parameters.h:110
bool Ignore_halo_elements_during_locate_zeta_search
Definition: sample_point_parameters.h:193
static unsigned Default_nsample_points_generated_per_element
Default for "measure of" number of sample points per element.
Definition: sample_point_parameters.h:168
void disable_ignore_halo_elements_during_locate_zeta_search()
Disable Ignore halo elements? (MPI only)
Definition: sample_point_parameters.h:162
Vector< std::pair< double, double > > & min_and_max_coordinates()
Definition: sample_point_parameters.h:101
Definition: oomph-lib/src/generic/Vector.h:58
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
Sample_Point_Container_Type
Enumeration to identify type of sample point container.
Definition: sample_point_parameters.h:40
@ UseRefineableBinArray
Definition: sample_point_parameters.h:41
@ UseNonRefineableBinArray
Definition: sample_point_parameters.h:42
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86