mesh_as_geometric_object.cc
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// Version 1.0; svn revision $LastChangedRevision$
7 //LIC//
8 //LIC// $LastChangedDate$
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 // Templated functions for MeshAsGeomObject
31 // Config header generated by autoconfig
32 #ifdef HAVE_CONFIG_H
33  #include <oomph-lib-config.h>
34 #endif
35 
36 //oomph-lib headers
37 #include "mesh.h"
39 #include "multi_domain.h"
40 
41 #include <cstdio>
42 namespace oomph
43 {
44 
45 
46 
47 
48 ////////////////////////////////////////////////////////////////////////
49 ////////////////////////////////////////////////////////////////////////
50 ////////////////////////////////////////////////////////////////////////
51 
52 //========================================================================
53 /// Helper namespace for MeshAsGeomObject -- its only function creates
54 /// SamplePointContainerParameters of the right type for the default
55 /// sample point container
56 //========================================================================
57 namespace MeshAsGeomObject_Helper
58 {
59 
60  /// \short Default sample point container type. Must currently be one of
61  /// UseCGALSamplePointContainer, UseRefineableBinArray or
62  /// UseNonRefineableBinArray
63 #ifdef OOMPH_HAS_CGAL
65 #else
66  unsigned Default_sample_point_container_version=UseRefineableBinArray;
67 #endif
68 
69  /// \short "Factory" for SamplePointContainerParameters of the
70  /// right type as selected
71  /// by Default_sample_point_container_version
74  sample_point_container_parameters_pt)
75  {
76  switch (Default_sample_point_container_version)
77  {
79  sample_point_container_parameters_pt=new RefineableBinArrayParameters(mesh_pt);
80 
81  break;
82 
84  sample_point_container_parameters_pt=new NonRefineableBinArrayParameters(mesh_pt);
85 
86  break;
87 
88 #ifdef OOMPH_HAS_CGAL
89 
91  sample_point_container_parameters_pt=new CGALSamplePointContainerParameters(mesh_pt);
92 
93  break;
94 
95 #endif
96 
97  default:
98 
99  throw OomphLibError("Wrong sample_point_container_parameters_pt",
100  OOMPH_CURRENT_FUNCTION,
101  OOMPH_EXCEPTION_LOCATION);
102 
103  }
104  }
105 
106 }
107 
108 ////////////////////////////////////////////////////////////////////////
109 ////////////////////////////////////////////////////////////////////////
110 ////////////////////////////////////////////////////////////////////////
111 
112 
113 
114 }
Helper object for dealing with the parameters used for the SamplePointContainer objects.
void create_sample_point_container_parameters(Mesh *mesh_pt, SamplePointContainerParameters *&sample_point_container_parameters_pt)
"Factory" for SamplePointContainerParameters of the right type as selected by Default_sample_point_co...
Helper object for dealing with the parameters used for the NonRefineableBinArray objects.
Helper object for dealing with the parameters used for the CGALSamplePointContainer objects...
Helper object for dealing with the parameters used for the RefineableBinArray objects.
unsigned Default_sample_point_container_version
Default sample point container type. Must currently be one of UseCGALSamplePointContainer, UseRefineableBinArray or UseNonRefineableBinArray.
A general mesh class.
Definition: mesh.h:74